background image

MELSEC iQ-R Programming Manual 
(Instructions, Standard Functions/Function Blocks)

Summary of Contents for MELSEC iQ-R Series

Page 1: ...MELSEC iQ R Programming Manual Instructions Standard Functions Function Blocks ...

Page 2: ......

Page 3: ...ING CONTAINED IN MITSUBISHI S USER INSTRUCTION AND OR SAFETY MANUALS TECHNICAL BULLETINS AND GUIDELINES FOR the PRODUCT Prohibited Application Prohibited Applications include but not limited to the use of the PRODUCT in Nuclear Power Plants and any other power plants operated by Power companies and or any other cases in which the public could be affected if any problem or fault occurs in the PRODU...

Page 4: ...able for damages that could have been prevented by compliance with any applicable safety standard regulation or law 2 MELCO prohibits the use of Products with or in any application involving and MELCO shall not be liable for a default a liability for defect warranty a quality assurance negligence or other tort and a product liability in these applications a power plants b trains railway systems ai...

Page 5: ...his product please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the MELSEC iQ R series programmable controller to handle the product correctly When applying the program examples provided in this manual to an actual system ensure the applicability and confirm that it will not cause system control problems Please make sure that the...

Page 6: ... or long retentive timer device is used 57 Operations arising when the OUT SET RST and PLS PLF instructions of the same device are used 59 Restrictions on using file registers 65 PART 2 LISTS OF INSTRUCTIONS AND FUN FB CHAPTER 2 CPU MODULE INSTRUCTIONS 68 2 1 Sequence Instructions 68 2 2 Basic Instructions 72 2 3 Application Instructions 91 2 4 Built in Ethernet Function Instructions 118 2 5 PID O...

Page 7: ...8 Storing reading clearing the operation result 169 Inverting the operation result 171 Converting the operation result into a pulse 172 Converting the edge relay operation result into a pulse 173 5 3 Output Instructions 175 Out excluding the timer counter and annunciator 175 Timer 177 Long timer 181 Counter 184 Long counter 186 Annunciator 188 Setting devices excluding annunciator 189 Resetting de...

Page 8: ...btracting BCD 8 digit data 270 Multiplying BCD 4 digit data 274 Dividing BCD 4 digit data 276 Multiplying BCD 8 digit data 278 Dividing BCD 8 digit data 280 Adding 16 bit binary block data 282 Subtracting 16 bit binary block data 284 Adding 32 bit binary block data 286 Subtracting 32 bit binary block data 289 Incrementing 16 bit binary data 292 Decrementing 16 bit binary data 294 Incrementing 32 b...

Page 9: ... to 16 bit unsigned binary data 396 Converting double precision real number to 32 bit signed binary data 398 Converting double precision real number to 32 bit unsigned binary data 400 Converting 16 bit signed binary data to 16 bit unsigned binary data 402 Converting 16 bit signed binary data to 32 bit signed binary data 404 Converting 16 bit signed binary data to 32 bit unsigned binary data 406 Co...

Page 10: ...ransferring 16 bit binary data 494 Inverting and transferring 32 bit binary data 496 Shifting data in units of 4 bits 498 Inverting and transferring 1 bit data 501 Transferring 16 bit binary data block 16 bits 503 Transferring 16 bit binary data block 32 bits 505 Transferring the same 16 bit binary data block 16 bits 507 Transferring the same 16 bit binary data block 32 bits 509 Transferring the s...

Page 11: ...riting data to the specified file 616 7 7 Debugging and Failure Diagnostic Instructions 628 Resetting the error display and the annunciator display 628 Generating a continuation error 629 Generating a stop error 630 7 8 String Processing Instructions 631 Comparing string data 631 Concatenating string data 634 Transferring string data 638 Transferring Unicode string data 640 Converting 16 bit binar...

Page 12: ...r 751 Converting 16 bit unsigned binary data to double precision real number 753 Converting 32 bit signed binary data to double precision real number 755 Converting 32 bit unsigned binary data to double precision real number 757 Converting single precision real number to double precision real number 759 Converting string data to single precision real number 761 Converting BCD format data to single...

Page 13: ...f double precision real number 841 Searching the minimum value of single precision real number 843 Searching the minimum value of double precision real number 845 7 10 Random Number Instructions 847 Generating random number 847 Changing random sequence 848 7 11 Index Register Instructions 849 Saving all data of the index register 849 Returning all data of the index register 851 Saving the selected...

Page 14: ...32 Adding 16 bit binary data 934 Adding 32 bit binary data 936 Calculating the mean value of 16 bit binary data 938 Calculating the mean value of 32 bit binary data 940 Calculating the square root of 16 bit binary data 942 Calculating the square root of 32 bit binary data 943 CRC operation 944 7 21 Database Access Instructions 946 Importing data to the data base 946 Exporting data from the data ba...

Page 15: ...ecification 1049 Reading 1 word 2 word data from another module 32 bit specification 1054 Writing 1 word 2 word data to a module 32 bit specification 1058 Reading the module model name 1063 Reading module specific information 1067 7 28 Routing Information Instructions 1072 Reading routing information 1072 Registering routing information 1074 7 29 Logging Instructions 1076 Setting trigger logging 1...

Page 16: ...ber 1166 Starting the operation of specified loop number 1167 Changing the parameters of specified loop number 1168 10 3 PID Control Instructions Exact Differential 1170 Registering the PID control data to the CPU module 1172 Performing PID operation 1174 Stopping the operation of specified loop number 1177 Starting the operation of specified loop number 1178 Changing the parameters of specified l...

Page 17: ...off control 1317 Three position on off control 1323 Dead band 1330 Program setter 1332 Loop selector 1338 Bumpless transfer 1344 Analog memory 1347 11 4 Correction Operation Instructions 1350 Function generator 1350 Inverse function generator 1353 Standard filter 1356 Integration 1359 Temperature pressure correction 1361 Engineering value transformation 1364 Engineering value inverse transformatio...

Page 18: ...g data from the programmable controller on another station with notification 1461 Writing data to the programmable controller on another station 1469 Writing data to the programmable controller on another station with notification 1477 Sending data to the programmable controller on another station 1485 Receiving data from the programmable controller on another station 1492 Receiving data from the ...

Page 19: ...e Device Station 32 bit Address Specified 1615 18 5 Reading the Module Model Information of an Intelligent Device Station 1620 18 6 Reading the Module Status Information of an Intelligent Device Station 1624 18 7 Setting Parameters 1629 18 8 Setting the Station Number to Own Station 1635 18 9 Sending an SLMP Frame 1638 CHAPTER 19 CC LINK INSTRUCTIONS 1643 19 1 Reading Data from the Target Station ...

Page 20: ...ta Logger Module Instructions 1781 23 1 File Access Instructions 1781 Recipe write 1781 Recipe read 1784 CHAPTER 24 C INTELLIGENT FUNCTION MODULE INSTRUCTIONS 1787 24 1 User Function Execution Instruction 1787 PART 5 STANDARD FUNCTIONS CHAPTER 25 TYPE CONVERSION FUNCTIONS 1792 25 1 Converting BOOL to WORD 1792 25 2 Converting BOOL to DWORD 1794 25 3 Converting BOOL to INT 1795 25 4 Converting BOOL...

Page 21: ...849 25 43 Converting REAL to STRING 1851 25 44 Converting LREAL to INT 1854 25 45 Converting LREAL to DINT 1856 25 46 Converting LREAL to REAL 1858 25 47 Converting TIME to BOOL 1860 25 48 Converting TIME to WORD 1861 25 49 Converting TIME to DWORD 1862 25 50 Converting TIME to INT 1863 25 51 Converting TIME to DINT 1864 25 52 Converting TIME to STRING 1865 25 53 Converting STRING to BOOL 1867 25 ...

Page 22: ...28 BIT SHIFT FUNCTIONS 1919 28 1 Shifting Data to the Left by n Bit s 1919 28 2 Shifting Data to the Right by n Bit s 1921 28 3 Rotating Data to the Left by n Bit s 1923 28 4 Rotating Data to the Right by n Bit s 1925 CHAPTER 29 BOOLEAN FUNCTIONS 1927 29 1 AND Operation OR Operation and XOR Operation 1927 29 2 NOT Operation 1930 CHAPTER 30 SELECTION FUNCTIONS 1931 30 1 Selecting a Value 1931 30 2 ...

Page 23: ...me added to instruction processing time 2030 Appendix 2 Number of Basic Steps and Availability of Subset Processing 2031 Appendix 3 Determining Three PID Constants 2056 Appendix 4 PID Operation Program Examples 2058 Auto tuning step response method PID control program example 2059 Auto tuning step response method program example 2061 Appendix 5 PID Control Program Examples 2063 Program examples fo...

Page 24: ...22 INDEX 2092 INSTRUCTION INDEX 2093 REVISIONS 2104 WARRANTY 2105 TRADEMARKS 2106 ...

Page 25: ...Manual Instructions Standard Functions Function Blocks SH 081266ENG this manual Instructions for the CPU module dedicated instructions for the intelligent function modules and standard functions function blocks e Manual PDF MELSEC iQ R Programming Manual Program Design SH 081265ENG Program specifications ladder ST FBD LD and SFC programs and labels e Manual PDF MELSEC iQ R Programming Manual Proce...

Page 26: ...al analog converter module and high speed digital analog converter module Engineering tool The product name of the software package for the MELSEC programmable controllers Ethernet interface module with built in CC Link IE A generic term for the following modules when the Ethernet function is used RJ71EN71 CPU module Ethernet module The abbreviation for the MELSEC iQ R series CC Link IE built in E...

Page 27: ...n transfer SLMP messages Ethernet adapter module and Ethernet equipped module ST language The abbreviation for the structured text language Standby system A backup system in a redundant system System A A system that is set as system A to distinguish two systems which are connected with two tracking cables When the two systems start up at the same time this system will be a control system System sw...

Page 28: ...struction GP OPEN ZP OPEN OPEN GP CLOSE ZP CLOSE CLOSE GP BUFRCV ZP BUFRCV BUFRCV G BUFRCVS Z BUFRCVS BUFRCVS GP BUFSND ZP BUFSND BUFSND G P UINI Z P UINI UINI CC Link IE Controller Network instruction J P RRUN G P RRUN Z P RRUN RRUN J P RSTOP G P RSTOP Z P RSTOP RSTOP J P RTMRD G P RTMRD Z P RTMRD RTMRD J P RTMWR G P RTMWR Z P RTMWR RTMWR G P UINI Z P UINI UINI CC Link IE Field Network instructio...

Page 29: ...his manual pages are organized and the symbols are used as shown below How to read Part 3 and Part 4 The following illustration is for explanation purpose only and should not be referred to as an actual documentation Ò Ô Ó Õ Ö Ø Ù Ú Û ...

Page 30: ...ORPI ORFI OUT RST BKRST MOVB P CMLB P When SA T SA ST or SA C is used for instructions other than those listed below it can only be used as word data It cannot be used as bit data Instructions that can be used as bit data LD LDI AND ANI OR ORI LDP LDF ANDP ANDF ORP ORF LDPI LDFI ANDPI ANDFI ORPI ORFI OUT RST MOVB P 4 This device can be used with a network module with a network number specified 5 I...

Page 31: ...n which an error code is stored is provided in the error code column When an error code is stored in SD0 an error flag SM0 turns on The error status can be checked with the module label of the CPU module For the errors not provided here refer to the following MELSEC iQ R CPU Module User s Manual Application ...

Page 32: ...er diagram structured text language and FBD LD In the enclosed area either of the following symbol should be described Standard function Function symbol Standard function block Instance name and function block symbol Execution condition is input to EN of each standard function or function block And execution result is output from ENO of each standard function or function block The return value of ...

Page 33: ... and error details if the standard function or standard function block has any possible operation error A device in which an error code is stored is provided in the error code column When an error code is stored in SD0 an error flag SM0 turns on The error status can be checked with the module label of the CPU module For the errors not provided here refer to the following MELSEC iQ R CPU Module Use...

Page 34: ...32 MEMO ...

Page 35: ...33 PART 1 PART 1 OVERVIEW This part consists of the following chapter 1 OVERVIEW ...

Page 36: ... operation is stored in the destination area However some instructions require the data to be used in the operation to be stored before the operation Ex Binary 16 bit data addition instruction A label or device to store data must be set for the destination Type Description Constant The constant specifies a numerical value used in the operation It is set during program creation and cannot be change...

Page 37: ...m 0 to 65535 or 0 to 4294967295 can be set for the size such as the number of devices transfers or characters 1 Note however that when the size specification such as the number of devices transfers or characters is 0 the relevant instruction results in non processing 1 The setting range varies depending on the instruction For details refer to the description of each instruction Be careful when a l...

Page 38: ... data 16 bit signed binary data 16 bit unsigned binary data 32 bit data double word data 32 bit signed binary data 32 bit unsigned binary data 64 bit data quad word data 64 bit signed binary data 64 bit unsigned binary data Real number data floating point data Single precision real number data Double precision real number data BCD data BCD 4 digit data BCD 8 digit data BCD 16 digit data String dat...

Page 39: ...ther the value is signed or unsigned Word device Double word device Decimal constant Hexadecimal constant 64 bit unsigned binary BCD 4 digit BCD 4 digit data can be handled 16 bit data is divided by 4 digits and each digit is specified in 0 to 9 Word device Digit specified bit device K1 to K4 2 Decimal constant Hexadecimal constant BCD 8 digit BCD 8 digit data can be handled 32 bit data is divided...

Page 40: ...nter type label Double word unsigned bit string 32 bits DWORD Double word unsigned bit string 32 bits type label Digit specified bit type label K1 to K8 Current value of long timer long retentive timer type label Current value of long counter type label Word signed INT Word signed type label Digit specified bit type label K1 to K4 Current value of timer retentive timer type label Current value of ...

Page 41: ...NY32_S Double word signed time ANY32_U Double word unsigned bit string 32 bits ANY_REAL ANYREAL_32 Single precision real number ANYREAL_64 Double precision real number ANY_STRING ANYSTRING_SINGLE String ANYSTRING_DOUBLE Character string Unicode ANY16_OR_STRING_SINGLE ANY16_S Word signed ANY16_U Word unsigned bit string 16 bits ANYSTRING_SINGLE String ANY_DT Word signed word unsigned bit string 16 ...

Page 42: ...ollowing word devices support bit specification A bit number of a safety device used in safety programs executed by the Safety CPU can be specified in hexadecimal within the range from 0 to F For example bit 5 b5 of SA D0 is specified as SA D0 5 and bit 10 b10 of SA D0 is specified as SA D0 A The following word devices support bit specification Data name Data size Value range Bit data 1 bit 0 1 It...

Page 43: ...specification 1 Cannot be specified in ladder programs Item Data type Data types of labels which support bit specification Word signed INT type Word unsigned bit string 16 bits WORD type Current value N of timer TIMER type 1 Current value N of retentive timer RETENTIVETIMER type 1 Current value N of counter COUNTER type 1 L_INT 0 L_INT 1 0 L_STRUCT 1 S_INT 0 Bit specification Label name Bit number...

Page 44: ...ay label as 16 bit data by digit specification Data name Data size Value range Decimal notation Hexadecimal notation Signed 16 bit data 16 bits 1 word 32768 to 32767 0000H to FFFFH Unsigned 16 bit data 0 to 65535 Item Notation Example Bit device Other than link direct device K Bit device start number Number of digits Specify the number within the range of 1 to 4 K4X10 K2M113 Link direct device J K...

Page 45: ...git specification in the destination d When a digit specification is made in the destination of an instruction the number of points by the digit specification is applicable in the destination The bit devices after the number of points specified by digits remain unchanged Digit specification Decimal notation Hexadecimal notation K1 0 to 15 0H to FH K2 0 to 255 00H to FFH K3 0 to 4095 000H to FFFH K...

Page 46: ...RVIEW 1 2 Data Specification Method Handling 16 bit data with word devices labels Word device One point of word device can handle 16 bit data Word type label One point of word type label can handle 16 bit data ...

Page 47: ...e array label as 32 bit data by digit specification Data name Data size Value range Decimal notation Hexadecimal notation Signed 32 bit data 32 bits 2 word 2147483648 to 2147483647 00000000H to FFFFFFFFH Unsigned 32 bit data 0 to 4294967295 Item Notation Example Bit device Other than link direct device K8X80 K6B018 Link direct device J1 K7B30 J10 K5X128 Item Notation Example Bit device SA K8X80 SA...

Page 48: ...ts from X0 to X13 K6X0 24 points from X0 to X17 K7X0 28 points from X0 to X1B K8X0 32 points from X0 to X1F Digit specification Decimal notation Hexadecimal notation K1 0 to 15 0H to FH K2 0 to 255 00H to FFH K3 0 to 4095 000H to FFFH K4 0 to 65535 0000H to FFFFH K5 0 to 1048575 00000H to FFFFFH K6 0 to 16777215 000000H to FFFFFFH K7 0 to 268435455 0000000H to FFFFFFFH K8 Signed 32 bit data 214748...

Page 49: ...ain unchanged Handling 32 bit data with word devices labels Word device Two points of word device can handle 32 bit data Note however that one point of the following devices can handle 32 bit data Long timer LT Long retentive timer LST Long counter LC Long index register LZ Double word type label One point of double word device can handle 32 bit data Ladder example Processing 32 bit data instructi...

Page 50: ...icates a positive number or 0 1 Indicates a negative number Mantissa 23 bits A mantissa means XXXXX of 1 XXXXX 2N representing a single precision real number in binary Exponent 8 bits An exponent means N of 1 XXXXX 2N representing a single precision real number in binary The following table shows the relationships between the exponent value and N of a single precision real number Data name Data si...

Page 51: ...real number data exceeds 7 digits the 8th digit is rounded off Therefore if the rounded off value goes out of the range from 2147483648 to 2147483647 it will not be an intended value Ex When 2147483647 is set as an input value it is handled as 2147484000 because 8th digit 6 is rounded off Ex When E1 1754943562 is set as an input value it is handled as E1 175494 because 8th digit 3 is rounded off W...

Page 52: ...recision real number data 2128 single precision real number data 2 126 0 2 126 single precision real number data 2128 Double precision real number data 21024 double precision real number data 2 1022 0 2 1022 double precision real number data 21024 Do not specify 0 only the most significant bit is 1 in real number data Performing a real number operation using 0 results in an operation error 1 For t...

Page 53: ... code Shift JIS code NULL 00H Unicode character string Unicode UTF 16 little endian NULL 0000H 1 Character code string Data type Notation Example String STRING Enclose a string ASCII Shift JIS and Unicode string in double quotation marks ABC Character string Unicode WSTRING Data type Notation Example String STRING Enclose a string ASCII Shift JIS in single quotation marks Stest ABC Character strin...

Page 54: ...character strings 0 byte 1 word 1 word Odd number of bytes Number of character string bytes 1 2 words because one character is an even number of bytes Even number of bytes Number of character string bytes 2 1 words Number of characters 1 words Character string to be stored Image of storing character string data from D0 Image of storing character string data from word type label array arrayA 0 Null...

Page 55: ...ecution condition of the standard function or function block with EN refer to the details of each standard function or function block in this manual Execution condition Description 1 On An instruction is executed during on It is executed only while the precondition of the instruction is on When the precondition is off the instruction is not executed Rising edge An instruction is executed one time ...

Page 56: ...is specified in an operand apply When the label assigned to each label area is specified in an operand When the label assigned to a label area or latch label area is specified in an operand any instruction which supports subset processing performs subset processing regardless of the data type of the operand Including the cases where bit numbers or digits are specified Data type of operand Conditio...

Page 57: ...ed and W0 is assigned after D1023 in the device label memory Error content 1 Error code An I O number which is out of range other than 000H to FFFH and 3E0H to 3E3H is specified 2800H An I O number which corresponds to no module is specified 2801H An I O number of the module that cannot be specified by using the instruction is specified 2803H A network number which is out of range 1 to 239 is spec...

Page 58: ...transfer destination is in the range of file register MAIN1 Data is written to ZR0 and ZR1 2 The transfer destination is out of the range of file register MAIN1 An error occurs because the area range of file register MAIN1 is exceeded 1 The transfer destination is in the range of the R device of block number 0 Data is written to R0 and R1 2 The transfer destination is out of the range of the R dev...

Page 59: ...er is finished use only the current values When the DMOV instruction is used to batch transfer current values repeat the transfer of the current values alone using the FOR to NEXT instruction Ex To batch transfer the current values of the timer device When the BMOV instruction is used only current values are batch transferred Device Configuration Timer T Retentive timer ST Counter C Long timer LT ...

Page 60: ... D13 D14 D15 D8 D9 D10 D11 D4 D5 D6 D7 K16 LT0 BMOVP D0 M0 Current value Current value Current value Current value Contact Coil Contact Coil FRT previous value FRT previous value Contact Coil Contact Coil FRT previous value FRT previous value LT0 LT1 LT2 LT3 K4 FOR D0Z1 DMOV LT0Z0 Z0 INC Z1 K2 NEXT D0 D1 D2 D4 D3 D5 D6 D7 SM402 Current value Current value Current value Current value Contact Coil C...

Page 61: ...tions of the same device More than one OUT instruction of the same device must not be issued during one scan Otherwise the specified device turns on or off depending on the operation result up to each OUT instruction while it is in execution In this case the device may turn on off during one scan because the on off state of the specified device is determined during execution of each OUT instructio...

Page 62: ... command is off If the SET and RST instructions of the same device exist in one scan If the SET and RST instructions of the same device exist in one scan the SET instruction turns on the specified device if the execution command is on and turns off the specified device if it is on If both the SET and RST instructions are off the on off state of the specified device will be unchanged If output Y is...

Page 63: ...mmand of each PLS instruction specifies an off to on change The specified device is turned off unless the execution command specifies an off to on change Thus if two or more PLS instructions are issued during one scan the device turned on by a PLS instruction may not turn on for one scan If X0 and X1 differs in the on off timing i e the specified device does not turn on for one scan 1 Since X0 tur...

Page 64: ...n the on off state of the last PLS instruction executed during the one scan will be output 1 Since X0 turns on M0 turns on 2 Since X1 turns on M0 remains off 3 Since X0 is other than turning on M0 turns off 4 Since X1 is other than turning on M0 remains off ON X1 X0 PLS M0 PLS M0 PLS M0 X1 X0 PLS ON OFF OFF OFF M0 X1 X0 END END END ON 1 2 3 4 OFF OFF M0 ...

Page 65: ... each PLS instruction specifies an on to off change The specified device is turned off unless the execution command specifies an on to off change Thus if two or more PLF instructions are issued during one scan the device turned on by a PLF instruction may not turn on for one scan If X0 and X1 differs in the on off timing i e the specified device does not turn on for one scan 1 Since X0 turns off M...

Page 66: ... the on off state of the last PLF instruction executed during the one scan will be output 1 Since X0 turns off M0 turns on 2 Since X1 turns off M0 remains on 3 Since X0 is other than turning off M0 turns off 4 Since X1 is other than turning off M0 remains off ON ON ON X1 X0 PLF M0 PLF M0 PLF M0 X1 X0 PLF OFF OFF OFF M0 X1 X0 END END END ON 1 2 3 4 OFF M0 ...

Page 67: ...read or write refresh data use the QDRSET instruction to switch to the corresponding file register and specify it If the file name or drive number is changed by the QDRSET instruction If the file register file name or drive number is changed by the QDRSET instruction the setting file is linked immediately before refresh To read or write refresh data specify it in the setting file immediately befor...

Page 68: ...66 1 OVERVIEW 1 5 Precautions on Programming MEMO ...

Page 69: ...67 PART 2 PART 2 LISTS OF INSTRUCTIONS AND FUN FB This part consists of the following chapters 2 CPU MODULE INSTRUCTIONS 3 MODULE DEDICATED INSTRUCTIONS 4 STANDARD FUNCTIONS FUNCTION BLOCKS ...

Page 70: ...the previous operation result and output the operation result Normally closed contact series connection instruction OR Performs an OR operation between the on off information of the specified device and the previous operation result and output the operation result Single normally open contact parallel connection instruction ORI Performs an OR operation between the on off information of the specifi...

Page 71: ...on result Falling edge pulse NOT parallel connection instruction Instruction symbol Processing details Reference ANB Performs AND operations between logical blocks series connection between logical blocks Page 168 ANB ORB ORB Performs OR operations between logical blocks series connection between logical blocks Instruction symbol Processing details Reference MPS Stores the operation result on off ...

Page 72: ...en the operation result up to the OUT instruction turns on When the count value reaches the set value the normally open contact of the counter turns on continuity state and the normally closed contact turns off non continuity state OUT C Counter OUT LC Long counter Page 184 OUT C OUT LC Page 186 OUT LC Instruction symbol Processing details Reference OUT F Outputs the operation result up to the OUT...

Page 73: ...g details Reference MC Starts a master control Page 207 MC MCR MCR Ends a master control Instruction symbol Processing details Reference FEND Separates the main routine program from subroutine programs and interrupt programs in a program file Page 211 FEND Instruction symbol Processing details Reference END Indicates the end of a program Page 213 END Instruction symbol Processing details Reference...

Page 74: ...OR _U LD AND OR LD _U AND _U OR _U LD AND OR LD _U AND _U OR _U Instruction symbol Processing details Reference LDD ANDD ORD Compares the two sets of 32 bit binary data specified Devices are used as normally open contacts Page 220 LDD _U ANDD _U ORD _U LDD _U ANDD _U ORD _U LDD ANDD ORD LDD _U ANDD _U ORD _U LDD ANDD ORD LDD _U ANDD _U ORD _U LDD ANDD ORD LDD _U ANDD _U ORD _U LDD ANDD ORD LDD _U ...

Page 75: ... Page 226 ZCP P _U ZCPP ZCP_U ZCPP_U Instruction symbol Processing details Reference DZCP Compares the band between the 32 bit binary data specified by lower limit value s1 and the 32 bit binary data specified by upper limit value s2 with the 32 bit binary data in the device specified by comparison data s3 According to the comparison result below within zone or above d d 1 or d 2 is turned on Page...

Page 76: ...ified Three operands Page 241 P _U when three operands are set P _U P_U Instruction symbol Processing details Reference D Adds the two sets of 32 bit binary data specified Two operands Page 243 D P _U when two operands are set D P D _U D P_U D Adds the two sets of 32 bit binary data specified Three operands Page 245 D P _U when three operands are set D P D _U D P_U D Performs subtraction between t...

Page 77: ...s subtraction between the two sets of BCD 4 digit data specified Three operands Page 264 B P when three operands are set B P Instruction symbol Processing details Reference DB Adds the two sets of BCD 8 digit data specified Two operands Page 266 DB P when two operands are set DB P DB Adds the two sets of BCD 8 digit data specified Three operands Page 268 DB P when three operands are set DB P DB Pe...

Page 78: ...ssing details Reference DBK Adds the two 32 bit binary data blocks specified Page 286 DBK P _U DBK P DBK _U DBK P_U DBK Performs subtraction between the two 32 bit binary data blocks specified Page 289 DBK P _U DBK P DBK _U DBK P_U Instruction symbol Processing details Reference INC Increments the specified 16 bit binary data by one Page 292 INC P _U INCP INC_U INCP_U DEC Decrements the specified ...

Page 79: ...erence WOR Performs an OR operation on the two sets of 16 bit binary data specified Two operands Page 310 WOR P when two operands are set WORP WOR Performs an OR operation on the two sets of 16 bit binary data specified Three operands Page 312 WOR P when three operands are set WORP DOR Performs an OR operation on the two sets of 32 bit binary data specified Two operands Page 314 DOR P when two ope...

Page 80: ...specified Two operands Page 330 WXNR P when two operands are set WXNRP WXNR Performs an XNOR operation on the two sets of 16 bit binary data specified Three operands Page 332 WXNR P when three operands are set WXNRP DXNR Performs an XNOR operation on the two sets of 32 bit binary data specified Two operands Page 334 DXNR P when two operands are set DXNRP DXNR Performs an XNOR operation on the two ...

Page 81: ...s Reference TEST Extracts the n th bit in the specified word device Page 344 TEST P TESTP DTEST Extracts the n th bit in the specified double word device Page 346 DTEST P DTESTP Instruction symbol Processing details Reference BKRST Resets the n points of bit devices starting from the bit device specified Page 348 BKRST P BKRSTP Instruction symbol Processing details Reference BCD Converts the speci...

Page 82: ... Converts the specified single precision real number 2147483648 to 2147483647 to 32 bit signed binary data 1 Real number Page 390 FLT2DINT P FLT2DINTP Instruction symbol Processing details Reference FLT2UINT Converts the specified single precision real number 0 to 65535 to 16 bit unsigned binary data 1 Real number Page 388 FLT2UINT P FLT2UINTP FLT2UDINT Converts the specified single precision real...

Page 83: ...ion symbol Processing details Reference UINT2INT Converts the 16 bit unsigned binary data in the device specified by s to 16 bit singed binary data and stores the converted data in the device specified by d Page 408 UINT2INT P UINT2INTP UINT2DINT Converts the 16 bit unsigned binary data in the device specified by s to 32 bit singed binary data and stores the converted data in the device specified ...

Page 84: ...8 to 2147483647 to 32 bit binary Gray code data Gc Gray code Page 428 DGRY P _U DGRYP DGRY_U Converts the specified 32 bit binary data 0 to 4294967295 to 32 bit binary Gray code data Gc Gray code DGRYP_U Instruction symbol Processing details Reference GBIN Converts the specified 16 bit binary Gray code data 32768 to 32767 to 16 bit binary data Gc Gray code Page 430 GBIN P _U GBINP GBIN_U Converts ...

Page 85: ... device specified by s to 2 word binary data and stores the converted data in the word device number specified by d Page 448 DHABIN P DHABINP Instruction symbol Processing details Reference DABCD Converts the decimal ASCII value in the device specified by s to 1 word BCD data and stores the converted data in the word device number specified by d Page 451 DABCD P DABCDP DDABCD Converts the decimal ...

Page 86: ...4 low order bits in the device starting from the one specified by d n 4 Page 478 DIS P DISP Instruction symbol Processing details Reference UNI Adds the n points of 4 low order bit data in the device starting from the one specified by s and stores the connected data in the device specified by d n 4 Page 480 UNI P UNIP Instruction symbol Processing details Reference NDIS Separates the data in the d...

Page 87: ...SFLP Instruction symbol Processing details Reference BSFR Shifts the n points of data starting from the specified device to the right by one bit Page 354 BSFR P BSFRP BSFL Shifts the n points of data starting from the specified device to the left by one bit Page 356 BSFL P BSFLP Instruction symbol Processing details Reference DSFR Shifts the n points of data starting from the specified device to t...

Page 88: ...R P SFTBRP SFTR Shifts the n2 bit s of area to the right within the n1 bits of data area starting from the specified device Page 364 SFTR P SFTRP SFTBL Shifts the n bit data starting from the specified device to the left by n bit s Page 366 SFTBL P SFTBLP SFTL Shift the n2 bit s of area to the left within the n1 bits of data area starting from the specified device Page 368 SFTL P SFTLP d n1 n2 0 0...

Page 89: ...0 SFTWR P SFTWRP WSFR Shifts the n2 word s of area to the right within the n1 words of data area starting from the specified device Page 372 WSFR P WSFRP SFTWL Shifts the n word data starting from the specified device to the left by n word s Page 374 SFTWL P SFTWLP WSFL Shifts the n2 word s of area to the left within the n1 words of data area starting from the specified device Page 376 WSFL P WSFL...

Page 90: ... specified 32 bit binary data bit by bit and transfers the inverted data Page 496 DCML P DCMLP Instruction symbol Processing details Reference SMOV Distributes and combines data in units of 4 bits Page 498 SMOV P SMOVP Instruction symbol Processing details Reference CMLB Inverts the bit data in the device specified by s and stores the inverted data in the device specified by d Page 501 CMLB P CMLB...

Page 91: ...om the device specified n 1 to 65535 Page 511 DFMOV P DFMOVP Instruction symbol Processing details Reference DFMOVL Transfers 32 bit binary data to the n points starting from the device specified n 1 to 4294967295 Page 513 DFMOVL P DFMOVLP Instruction symbol Processing details Reference XCH Exchanges the 16 bit binary data specified Page 515 XCH P XCHP DXCH Exchanges the 32 bit binary data specifi...

Page 92: ...mbol Processing details Reference MOVB Stores the bit data in the device specified by s in the device specified by d Page 523 MOVB P MOVBP Instruction symbol Processing details Reference BLKMOVB Batch transfers the n points of bit data in the device starting from the one specified by s to the n points of bit data in the device starting from the one specified by d Page 525 BLKMOVB P BLKMOVBP b0 b15...

Page 93: ...P Instruction symbol Processing details Reference ROL Rotates the 16 bit binary data to the left by n bit s not including the carry flag 1 Left rotation by n bits Page 530 ROL P RCL P ROLP RCL Rotates the 16 bit binary data to the left by n bit s including the carry flag 1 Left rotation by n bits RCLP Instruction symbol Processing details Reference DROR Rotates the 32 bit binary data to the right ...

Page 94: ...am file starting with the next scan JMP Unconditionally executes the program specified by the pointer number within the same program file Instruction symbol Processing details Reference GOEND Invokes a jump to the FEND or END instruction within the same program file Page 540 GOEND Instruction symbol Processing details Reference DI Disables the execution of interrupt programs Page 541 DI EI EI Clea...

Page 95: ...s to be passed to the subroutine program Page 559 CALL P CALLP Instruction symbol Processing details Reference RET Indicates the end of a subroutine program Page 563 RET Instruction symbol Processing details Reference FCALL Performs non execution processing of the subroutine program specified by P when the input conditions are not met For s1 to s5 specify the arguments to be passed to the subrouti...

Page 96: ...n symbol Processing details Reference FPOP Stores the data last stored in the table in the specified device N Number of data Page 585 FPOP P FPOPP Instruction symbol Processing details Reference FIFW Stores 16 bit binary data to the specified data table N Number of data Page 587 FIFW P FIFWP Instruction symbol Processing details Reference FINS Inserts 16 bit binary data to the n th position in the...

Page 97: ...e Page 616 SP FWRITE Instruction symbol Processing details Reference LEDR This instruction resets the self diagnostic error continuation error display and the annunciator display of the CPU module Page 628 LEDR Instruction symbol Processing details Reference PALERT Generates a continuation error in the CPU module Page 629 PALERT P PALERTP Instruction symbol Processing details Reference PABORT Stop...

Page 98: ... stores the converted data in the word device number specified by d and later Page 655 DBINHA P DBINHAP Instruction symbol Processing details Reference STR Converts the 1 word binary data in the device specified by s2 to a decimal character string consisting of the total number digits and the number of digits in the decimal part in the device specified by s1 and stores the converted data in the wo...

Page 99: ... RIGHT Stores the n characters from the last character of the character string which is stored in the device specified by s in the device specified by d Page 689 RIGHT P RIGHTP LEFT Stores the n characters from the first character of the character string which is stored in the device specified by s in the device specified by d Page 691 LEFT P LEFTP Instruction symbol Processing details Reference M...

Page 100: ...mpares the double precision real number data specified by s1 with the double precision real number data specified by s2 and according to the result small equal or large d d 1 or d 2 is turned on Page 711 EDCMP P EDCMPP Instruction symbol Processing details Reference EZCP Compares the band between the single precision real number specified by lower limit value s1 and the single precision real numbe...

Page 101: ... E P Instruction symbol Processing details Reference ED Multiplies double precision real numbers Page 737 ED P ED P ED Performs division between double precision real numbers Page 739 ED P ED P Instruction symbol Processing details Reference INT2FLT Converts the 16 bit signed binary data in the device specified by s to a single precision real number and stores the converted data in the device spec...

Page 102: ...he 32 bit unsigned binary data in the device specified by s to a double precision real number and stores the real number in the device specified by d Page 757 UDINT2DBL P UDINT2DBLP Instruction symbol Processing details Reference FLT2DBL Converts the single precision real number in the device specified by s to a double precision real number and stores the double precision real number in the device...

Page 103: ...al number Page 773 COS P COSP Instruction symbol Processing details Reference TAN Calculates the tangent of the angle specified by a single precision real number Page 775 TAN P TANP Instruction symbol Processing details Reference ASIN Calculates the angle from the sine specified by a single precision real number Page 777 ASIN P ASINP Instruction symbol Processing details Reference ACOS Calculates ...

Page 104: ...number Page 793 ATAND P ATANDP Instruction symbol Processing details Reference BSIN Calculates the sine of the angle specified by a BCD value d Sign d 1 Integral part d 2 Decimal part Page 795 BSIN P BSINP Instruction symbol Processing details Reference BCOS Calculates the cosine of the angle specified by a BCD value d Sign d 1 Integral part d 2 Decimal part Page 797 BCOS P BCOSP Instruction symbo...

Page 105: ...ocessing details Reference RAD Converts the unit of the measure of angle from the degree specified by a single precision real number to radian Converting degree to radian Page 807 RAD P RADP Instruction symbol Processing details Reference DEG Converts the unit of the measure of angle from the radian specified by a single precision real number to the degree Converting radian to degree Page 809 DEG ...

Page 106: ...recision real number Page 819 EXP P EXPP Instruction symbol Processing details Reference EXPD Calculates the exponent of the value specified by a double precision real number Page 821 EXPD P EXPDP Instruction symbol Processing details Reference LOG Calculates the logarithm using the natural logarithm e of the value specified by a single precision real number as the base Page 823 LOG P LOGP Instruc...

Page 107: ...ints of single precision real number block data in the device starting from the one specified by s and stores the maximum value in the search result maximum value in the device specified by d Page 839 EMAX P EMAXP Instruction symbol Processing details Reference EDMAX Searches for the maximum value in the n points of double precision real number block data in the device starting from the one specif...

Page 108: ... the index register Page 851 ZPOP P ZPOPP Instruction symbol Processing details Reference ZPUSH Saves the contents of the index register and long index register specified by s to the area specified by d Page 852 ZPUSH P ZPUSHP ZPOP Reads the data which has been saved to the area specified by d into the index register and long index register Page 855 ZPOP P ZPOPP Instruction symbol Processing detai...

Page 109: ...ified by d Scaling conversion is performed based on the scaling conversion data stored in the device specified by s2 and later Page 872 DSCL P _U DSCLP DSCL_U DSCLP_U Instruction symbol Processing details Reference SCL2 Scales the scaling conversion data 16 bit data in the device specified by s2 on the basis of the input value in the device specified by s1 and stores the operation result in the de...

Page 110: ...TC Controls the rotary table divided by n1 so that it makes s shortcut rotation from the stop position to the position specified by s 1 Page 888 ROTC Instruction symbol Processing details Reference RAMPQ Changes the value specified by s1 to the value specified by s2 by the number of times specified by n The current value is stored in the device specified by d1 0 Page 891 RAMPQ Instruction symbol P...

Page 111: ...points in the 32 bit binary data specified by s2 for the 32 bit binary data specified by s1 d Location d 1 Number of matches Page 908 DSERDATA P DSERDATAP Instruction symbol Processing details Reference SERMM Searches the n points in the 16 bit binary data specified by s1 for the same data as the 16 bit binary data specified by s2 the minimum value and the maximum value Page 910 SERMM P SERMMP DSE...

Page 112: ...P _U DMAXP DMAX_U DMAXP_U Instruction symbol Processing details Reference MIN Searches the n points of data in the device specified by s in units of 16 bits and stores the minimum value in the device specified by d Page 926 MIN P _U MINP MIN_U MINP_U DMIN Searches the n points of data in the device specified by s in units of 32 bits and stores the minimum value in the device specified by d Page 92...

Page 113: ...enerates the CRC value for n 8 bit data unit byte starting from the device specified by s and store the CRC value to the device specified by d Page 944 CRC P CRCP Instruction symbol Processing details Reference DBOPEN Connects to the database specified by s and makes it available Page 952 DBOPEN P DBOPENP Instruction symbol Processing details Reference DBCLOSE Releases the identification number sp...

Page 114: ...ion symbol Processing details Reference DBCOMMIT Commits the transaction in relation to the database corresponding to the identification number specified by s Page 982 DBCOMMIT P DBCOMMITP Instruction symbol Processing details Reference DBROLBAK Executes the rollback in relation to the database corresponding to the identification number specified by s Page 984 DBROLBAK P DBROLBAKP Instruction symb...

Page 115: ...nth day hour minute second and day of week from the clock element of the CPU module d Year d 1 Month d 2 Day d 3 Hour d 4 Minute d 5 Second d 6 Day of week Page 1001 DATERD P DATERDP Instruction symbol Processing details Reference DATEWR Writes the clock data stored in the specified device and later to the clock element of the CPU module s Year s 1 Month s 2 Day s 3 Hour s 4 Minute s 5 Second s 6 ...

Page 116: ... LDDT ANDDT ORDT LDDT ANDDT ORDT LDDT ANDDT ORDT LDDT ANDDT ORDT LDDT ANDDT ORDT LDDT ANDDT ORDT Instruction symbol Processing details Reference LDTM ANDTM ORTM Compares the specified time data or compares the specified time data with the current time Page 1017 LDTM ANDTM ORTM LDTM ANDTM ORTM LDTM ANDTM ORTM LDTM ANDTM ORTM LDTM ANDTM ORTM LDTM ANDTM ORTM Instruction symbol Processing details Refe...

Page 117: ... SP DATE Instruction symbol Processing details Reference S DATE Subtracts time data Page 1029 S P DATE SP DATE Instruction symbol Processing details Reference DUTY Turns on the user timing clock for the specified number of scans and off for the specified number of scans n1 n1 scans n2 n2 scans d SM420 to SM424 Page 1031 DUTY Instruction symbol Processing details Reference TIMCHK Measures the on ti...

Page 118: ...ce S ZCOM Performs refresh processing for the specified modules Page 1043 S P ZCOM SP ZCOM Instruction symbol Processing details Reference FROM Reads n words of data in units of 16 bits from the buffer memory areas of the intelligent function module and other CPU modules Page 1045 FROM P DFROM P FROMP DFROM Reads n 2 words of data in units of 16 bits from the buffer memory areas of the intelligent...

Page 119: ...7 UNIINFRD P UNIINFRDP Instruction symbol Processing details Reference S RTREAD Reads the data set by routing parameters Page 1072 S P RTREAD SP RTREAD Instruction symbol Processing details Reference S RTWRITE Registers the routing information to the area specified by a routing parameter Page 1074 S P RTWRITE SP RTWRITE Instruction symbol Processing details Reference LOGTRG Generates a trigger for...

Page 120: ... Processing details Reference S SOCRCVS Reads the receive data of the connection specified by s during instruction execution from the socket communication receive data area Page 1093 S SOCRCVS Instruction symbol Processing details Reference SP SOCSND Sends the data in the device specified by s3 to the external device of the connection specified by s1 Page 1096 SP SOCSND Instruction symbol Processi...

Page 121: ...unication protocol support tool of the engineering tool Page 1109 SP ECPRTCL Instruction symbol Processing details Reference SP SLMPSND Sends SLMP messages to the SLMP compatible device Page 1117 SP SLMPSND Instruction symbol Processing details Reference SP FTPPUT Sends files in the CPU module which are specified by s2 to the folder path of the FTP server which is specified by s3 Page 1123 SP FTPP...

Page 122: ...es the sampling cycle and performs PID operation Page 1163 S P PIDCONT SP PIDCONT Instruction symbol Processing details Reference S PIDSTOP Stops the PID operation of the loop number in the device specified by s Page 1166 S P PIDSTOP SP PIDSTOP S PIDRUN Starts the PID operation of the loop number in the device specified by s Page 1167 S P PIDRUN SP PIDRUN Instruction symbol Processing details Refe...

Page 123: ...rameters of specified loop number Instruction symbol Processing details Reference PIDPRMW Changes the operation parameter of the loop number in the device specified by s1 to the PID control data stored in the device number specified by s2 and later Page 1179 PIDPRMW P PIDPRMWP ...

Page 124: ...ter Pulse integration Instruction symbol Processing details Reference S IN Performs following processing to the input data PV range check input limiter engineering value transformation and digital filter Page 1197 S IN Instruction symbol Processing details Reference S OUT1 Calculates MV 0 to 100 from the input data MV and performs the variation rate upper lower limiter processing and output conver...

Page 125: ...nd output conversion or alarm clear and output conversion processing Page 1246 S PIDP Instruction symbol Processing details Reference S SPI Monitors the operating time operating time ST or hold time HT and performs the following processing steps SV setting tracking gain Kp operation SPI operation and deviation check if the operating time is in ST Page 1254 S SPI Instruction symbol Processing detai...

Page 126: ... mean average value of the input data and outputs the operation result Page 1306 S AVE Instruction symbol Processing details Reference S LIMT Applies a limiter with hysteresis to the output value Page 1308 S LIMT Instruction symbol Processing details Reference S VLMT1 Limits the variation speed when the variation rate of the input E1 exceeds the limit Page 1311 S VLMT1 Instruction symbol Processin...

Page 127: ...erence S FG Outputs the input data values according to the specified function generator pattern Page 1350 S FG Instruction symbol Processing details Reference S IFG Outputs the input data values according to the specified inverse function generator pattern Page 1353 S IFG Instruction symbol Processing details Reference S FLT Outputs the mean average value of the n pieces of data collected at the s...

Page 128: ...a with a coefficient Page 1374 S DIV Instruction symbol Processing details Reference S SQR Outputs the square root of input data Page 1376 S SQR Instruction symbol Processing details Reference S ABS Outputs the absolute value of input data Page 1378 S ABS Instruction symbol Processing details Reference S Compares input data and outputs the comparison result Page 1380 S S Page 1382 S S Page 1384 S ...

Page 129: ... Motion Controller Programming Manual Program Design Instruction symbol Processing details Reference D DDRD Reads the data in the device of another CPU module specified by n and stores the data to the read source CPU module in a multiple CPU system Page 1405 D P DDRD M P DDRD DP DDRD M DDRD MP DDRD Instruction symbol Processing details Reference D DDWR Writes the data specified in the own CPU modu...

Page 130: ... inactive of the specified block as the operation result Normally closed contact instruction AND BL Performs an AND operation between the status active or inactive of the specified block and the previous operation result s and output the operation result Normally open contact series connection instruction ANI BL Performs an AND operation between the status active or inactive of the specified block...

Page 131: ...RT BL Releases the temporary stop and restarts the sequence from the step where the sequence was stopped in the specified block Page 1431 RSTART BL Instruction symbol Processing details Reference SET S BL S Activates the specified step Page 1433 SET S BL S Instruction symbol Processing details Reference RST S BL S Deactivates the specified step Page 1435 RST S BL S Instruction symbol Processing de...

Page 132: ...Instruction symbol Processing details Reference SP CONTSW Switches the systems control system and standby system during END processing of the scan where the instruction is executed Page 1440 SP CONTSW Instruction symbol Processing details Reference DCONTSW Disables manual system switching Page 1444 DCONTSW ECONTSW ECONTSW Enables manual system switching ...

Page 133: ... in units of words from a device in the programmable controller of another station After the data reading is completed the device of another station is turned on The other station can recognize that data has been read by the SREAD instruction Page 1461 JP SREAD GP SREAD GP SREAD Instruction symbol Processing details Reference JP WRITE Writes data in units of words to a device in the programmable c...

Page 134: ... S1 Version CP manufactured in July 1995 or later Instruction symbol Processing details Reference J ZNRD Reads data in units of words from a device in the programmable controller of another station Page 1501 J P ZNRD JP ZNRD Instruction symbol Processing details Reference J ZNWR Writes data in units of words to a device in the programmable controller of another station Page 1506 J P ZNWR JP ZNWR I...

Page 135: ...nstruction symbol Processing details Reference GP CLOSE Disconnects closes the connection from the external device during data communication Page 1545 GP CLOSE ZP CLOSE ZP CLOSE Instruction symbol Processing details Reference GP SOCRCV Reads receive data from the external device through socket communications or fixed buffer communications This instruction is used in the main program Page 1548 GP S...

Page 136: ...ls Reference GP BUFSND Sends data to the external device through fixed buffer communications Page 1559 GP BUFSND ZP BUFSND ZP BUFSND Instruction symbol Processing details Reference G UINI Changes the setting details such as Ethernet operation settings or reinitializes the module Page 1562 G P UINI Z P UINI GP UINI Z UINI ZP UINI Instruction symbol Processing details Reference GP ECPRTCL Executes t...

Page 137: ... RRUN G RRUN GP RRUN Z RRUN ZP RRUN Instruction symbol Processing details Reference J RSTOP Sends a remote STOP request to the programmable controller of another station Page 1581 J P RSTOP G P RSTOP Z P RSTOP JP RSTOP G RSTOP GP RSTOP Z RSTOP ZP RSTOP Instruction symbol Processing details Reference J RTMRD Reads clock data from the programmable controller of another station Page 1586 J P RTMRD G ...

Page 138: ...er to own station When the target station is QSCPU the RRUN and RSTOP instructions cannot be used The RTMWR instruction cannot write to QSCPU of other stations Instruction symbol Processing details Reference G UINI Sets the station number of the own station Page 1597 G P UINI Z P UINI GP UINI Z UINI ZP UINI ...

Page 139: ... address specified Page 1605 JP REMTO ZP REMTO ZP REMTO JP REMTOD Writes data to the buffer memory area of the intelligent device station or the remote device station in units of words 32 bit address specified Page 1615 JP REMTOD Instruction symbol Processing details Reference J SINFTYRD Reads the model names of modules and units used in an intelligent device station Page 1620 J P SINFTYRD G P SIN...

Page 140: ...ating station Use the own station master submaster function operating status SB004E to apply an interlock so that the submaster function is executed only in the master operating station Master operating station when SB004E is off Instruction symbol Processing details Reference J SLMPREQ Sends an SLMP frame to the SLMP compatible device in the same network Data of the target station can be read wri...

Page 141: ...upporting a handshake signal such as AJ65BT R2N Page 1651 G P RIRCV GP RIRCV Instruction symbol Processing details Reference G RISEND Automatically performs handshake with the specified intelligent device station and writes data to its buffer memory The instructions can be used for communications with a module supporting a handshake signal such as AJ65BT R2N Page 1654 G P RISEND GP RISEND Instruct...

Page 142: ...eference G OUTPUT Sends data in user specified message format through communications using the nonprocedural protocol Page 1682 G P OUTPUT GP OUTPUT Instruction symbol Processing details Reference G INPUT Receives data in user specified message format through communications using the nonprocedural protocol Page 1685 G INPUT Instruction symbol Processing details Reference G BIDOUT Sends the specifi...

Page 143: ...topping send processing by using the nonprocedural protocol Page 1702 ZP CSET Instruction symbol Processing details Reference ZP CSET Registers programmable controller CPU monitoring to use the programmable controller CPU monitoring function or cancels programmable controller CPU monitoring Page 1705 ZP CSET Instruction symbol Processing details Reference ZP CSET Sets the unit word byte of data to...

Page 144: ...l mode to offset gain setting mode Offset gain setting mode to normal mode Page 1724 G P OFFGAN GP OFFGAN Instruction symbol Processing details Reference G OGLOAD Reads the offset gain setting values of the user range settings of an analog module into the CPU module Page 1727 G P OGLOAD GP OGLOAD Instruction symbol Processing details Reference G OGSTOR Restores the offset gain settings in the user...

Page 145: ...GP PSTRT1 Starts positioning of the specified axis Page 1769 GP PSTRT ZP PSTRT GP PSTRT2 GP PSTRT3 GP PSTRT4 ZP PSTRT1 ZP PSTRT2 ZP PSTRT3 ZP PSTRT4 Instruction symbol Processing details Reference GP TEACH1 Performs teaching for the specified axis Page 1772 GP TEACH ZP TEACH GP TEACH2 GP TEACH3 GP TEACH4 ZP TEACH1 ZP TEACH2 ZP TEACH3 ZP TEACH4 Instruction symbol Processing details Reference GP PFW...

Page 146: ...ipe read Instruction symbol Processing details Reference Z RCPWRITE Writes device values of the CPU module to the specified recipe file in the SD memory card Page 1781 Z P RCPWRITE ZP RCPWRITE Instruction symbol Processing details Reference Z RCPREAD Reads device values of the specified recipe file in the SD memory card to the CPU module Page 1784 Z P RCPREAD ZP RCPREAD ...

Page 147: ...ule Instructions 145 3 3 10 C Intelligent Function Module Instructions User function execution instruction Instruction symbol Processing details Reference G CEXECUTE Instructs to execute a function for the pre registered function Page 1787 G P CEXECUTE GP CEXECUTE ...

Page 148: ... from BOOL data type to DWORD data type Page 1794 BOOL_TO_DWORD _ E BOOL_TO_DWORD_E Function symbol Processing details Reference BOOL_TO_INT Converts a value from BOOL data type to INT data type Page 1795 BOOL_TO_INT _E BOOL_TO_INT_E BOOL_TO_DINT Converts a value from BOOL data type to DINT data type Page 1796 BOOL_TO_DINT _E BOOL_TO_DINT_E Function symbol Processing details Reference BOOL_TO_TIME...

Page 149: ...STRING_E Function symbol Processing details Reference DWORD_TO_BOOL Converts a value from DWORD data type to BOOL data type Page 1806 DWORD_TO_BOOL _ E DWORD_TO_BOOL_E Function symbol Processing details Reference DWORD_TO_WORD Converts a value from DWORD data type to WORD data type Page 1807 DWORD_TO_WORD _E DWORD_TO_WORD_E Function symbol Processing details Reference DWORD_TO_INT Converts a value...

Page 150: ... INT_TO_REAL Converts a value from INT data type to REAL data type Page 1821 INT_TO_REAL _E INT_TO_REAL_E INT_TO_LREAL Converts a value from INT data type to LREAL data type Page 1822 INT_TO_LREAL _E INT_TO_LREAL_E Function symbol Processing details Reference INT_TO_TIME Converts a value from INT data type to TIME data type Page 1823 INT_TO_TIME _E INT_TO_TIME_E Function symbol Processing details ...

Page 151: ...DINT_TO_STRING Converts a value from DINT data type to STRING data type Page 1836 DINT_TO_STRING _E DINT_TO_STRING_E Function symbol Processing details Reference BCD_TO_INT Converts a value from BCD data type to INT data type Page 1838 BCD_TO_INT _E BCD_TO_INT_E BCD_TO_DINT Converts a value from BCD data type to DINT data type Page 1840 BCD_TO_DINT _E BCD_TO_DINT_E Function symbol Processing detai...

Page 152: ...Reference TIME_TO_WORD Converts a value from TIME data type to WORD data type Page 1861 TIME_TO_WORD _E TIME_TO_WORD_E TIME_TO_DWORD Converts a value from TIME data type to DWORD data type Page 1862 TIME_TO_DWORD _E TIME_TO_DWORD_E Function symbol Processing details Reference TIME_TO_INT Converts a value from TIME data type to INT data type Page 1863 TIME_TO_INT _E TIME_TO_INT_E TIME_TO_DINT Conve...

Page 153: ...ype Page 1879 STRING_TO_TIME _E STRING_TO_TIME_E Function symbol Processing details Reference BITARR_TO_INT Converts the specified number of bits in a bit array to an INT data type value Page 1881 BITARR_TO_INT _E BITARR_TO_INT_E BITARR_TO_DINT Converts the specified number of bits in a bit array to a DINT data type value Page 1882 BITARR_TO_DINT _E BITARR_TO_DINT_E Function symbol Processing deta...

Page 154: ... root of an input value Page 1895 SQRT _E SQRT_E Function symbol Processing details Reference LN Outputs the natural logarithm logarithm with base e of an input value Page 1896 LN _E LN_E Function symbol Processing details Reference LOG Outputs the common logarithm logarithm with base 10 of an input value Page 1897 LOG _E LOG_E Function symbol Processing details Reference EXP Outputs the exponent ...

Page 155: ...t of input values s1 s2 Page 1912 DIV _E DIV_E Function symbol Processing details Reference MOD Outputs the remainder of input values s1 s2 Page 1914 MOD _E MOD_E Function symbol Processing details Reference EXPT Outputs the exponentiation of an input value Page 1916 EXPT _E EXPT_E Function symbol Processing details Reference MOVE Outputs the assignment value of an input value Page 1917 MOVE _E MO...

Page 156: ...al sum of input values XOR_E Function symbol Processing details Reference NOT Outputs the logical NOT of input values Page 1930 NOT _E NOT_E Function symbol Processing details Reference SEL Outputs the selected input value Page 1931 SEL _E SEL_E Function symbol Processing details Reference MAX Outputs the maximum input value Page 1933 MAX _E MIN _E MAX_E MIN Outputs the minimum input value MIN_E F...

Page 157: ...fied number of characters starting from the left end of the string input Page 1946 LEFT _E RIGHT _E LEFT_E RIGHT Extracts and outputs the specified number of characters starting from the right end of the string input RIGHT_E Function symbol Processing details Reference MID Extracts and outputs the specified number of characters starting from the specified position of the string input Page 1949 MID...

Page 158: ...e operation result Page 1960 FIND _E FIND_E Function symbol Processing details Reference ADD_TIME Outputs the sum s1 s2 of the TIME data type input values Page 1962 ADD_TIME _E ADD_TIME_E Function symbol Processing details Reference SUB_TIME Outputs the difference s1 s2 between the TIME data type input values Page 1964 SUB_TIME _E SUB_TIME_E Function symbol Processing details Reference MUL_TIME Ou...

Page 159: ...between two input values and outputs1 TRUE or 0 FALSE Page 1974 RS _E RS_E Function block symbol Processing details Reference R_TRIG Detects a signal rising edge and outputs the pulse signal Page 1976 R_TRIG _E R_TRIG_E Function block symbol Processing details Reference F_TRIG Detects a signal falling edge and outputs the pulse signal Page 1978 F_TRIG _E F_TRIG_E Function block symbol Processing d...

Page 160: ...r the specified period of time Page 1989 TP _E TP_E Function block symbol Processing details Reference TON Turns on a signal after the specified period of time Page 1992 TON _E TON_E Function block symbol Processing details Reference TOF Turns off a signal after the specified period of time Page 1995 TOF _E TOF_E Function block symbol Processing details Reference TIMER_10_FB_M Starts counting a ti...

Page 161: ...ENCE INSTRUCTIONS 6 BASIC INSTRUCTIONS 7 APPLICATION INSTRUCTIONS 8 BUILT IN ETHERNET FUNCTION INSTRUCTIONS 9 PID OPERATION INSTRUCTION 10 PID CONTROL INSTRUCTIONS 11 PROCESS CONTROL INSTRUCTIONS 12 MULTIPLE CPU DEDICATED INSTRUCTIONS 13 SFC PROGRAM INSTRUCTIONS 14 REDUNDANT SYSTEM INSTRUCTIONS ...

Page 162: ...tions perform an AND operation between the on off information of the specified device and the previous operation result and output the operation result OR Single normally open contact parallel connection ORI Single normally closed contact parallel connection These instructions perform an OR operation between the on off information of the specified device and the previous operation result and outpu...

Page 163: ...lly open contact parallel connection instruction and ORI is a single normally open contact parallel connection instruction These instructions read the on off information 1 of the specified bit device perform an OR operation with the previous operation result and output the operation result 1 When a bit of a word device is specified the instruction outputs on or off according to the status 1 or 0 o...

Page 164: ...ge pulse series connection ANDF Falling edge pulse series connection These instructions perform an AND operation with the previous operation result ORP Rising edge pulse parallel connection ORF Falling edge pulse parallel connection These instructions perform an OR operation with the previous operation result Execution condition Ladder ST ENO LDP EN s ENO LDF EN s ENO ANDP EN s ENO ANDF EN s ENO O...

Page 165: ...on only at the falling edge on to off of the specified bit device When a bit specified word device is used this instruction turns on only when the specified bit changes from 1 to 0 If the LDP instruction is used in the program written in ST language or FBD LD ENO turns on at the rising edge off to on of the specified bit device s If the LDF instruction is used in the program written in ST language...

Page 166: ... connection instruction and ORF is a falling edge pulse parallel connection instruction These instructions perform an OR operation with the previous operation result and output the operation result The following table lists the on off information used by the ORP and ORF instructions If the ORP instruction is used in the program written in ST or FBD LD language ENO turns when the result of OR opera...

Page 167: ...ng edge pulse NOT series connection ANDFI Falling edge pulse NOT series connection These instructions perform an AND operation with the previous operation result ORPI Rising edge pulse NOT parallel connection ORFI Falling edge pulse NOT parallel connection These instructions perform an OR operation with the previous operation result Execution condition Ladder ST ENO LDPI EN s ENO LDFI EN s ENO AND...

Page 168: ...mation used by the LDPI and LDFI instructions If the LDPI instruction is used in the program written in ST language or FBD LD ENO turns on at the timing except the rising edge off to on of the specified bit device s If the LDFI instruction is used in the program written in ST language or FBD LD ENO turns on at the timing except the falling edge on to off of the specified bit device s If the LDPI o...

Page 169: ...parallel connection instruction and ORFI is a falling edge pulse NOT parallel connection instruction These instructions perform an OR operation with the previous operation result and output the operation result The following table lists the on off information used by the ORPI and ORFI instructions If the ORPI instruction is used in the program written in ST or FBD LD language ENO turns when the re...

Page 170: ... symbol of the ANB instruction is not a contact but a connection ORB This instruction performs an OR operation between block A and block B and outputs the operation result Ladder blocks each having two or more contacts are connected in parallel Use the OR or ORI instruction for connection of blocks each having only one contact The ORB instruction is not required in this case The symbol of the ORB ...

Page 171: ...y If the MPP instruction is used in the middle of the program the number of MPS instructions used is decremented by one MRD This instruction reads the operation result stored by using the MPS instruction and performs operations from the next step based on the operation result MPP This instruction reads the operation result stored by using the MPS instruction and performs operations from the next s...

Page 172: ...sing the MPS MRD and MPP instructions Ladder program not using the MPS MRD or MPP instruction Use the same number of MPS instructions as that of MPP instructions If the numbers of MPS and MPP instructions are different the ladder is not displayed correctly on the engineering tool ladder mode Y10 X0 X1 X2 X3 X4 X5 Y11 Y12 Y10 X0 X1 X2 X3 X4 X5 Y11 Y12 X0 X1 X0 X1 ...

Page 173: ... The instruction cannot be used at the LD or OR instruction position When a ladder block is used the operation result is inverted within the range of the ladder block When the INV instruction and the ANB instruction are used together in the same ladder pay attention to the inversion range Broken line part Inversion range For details on the ANB instruction refer to the following Page 168 ANB ORB La...

Page 174: ...EF instruction The instruction turns off non continuity state when the operation result is in another state not falling edge Use of the MEF instruction eases pulse conversion processing when multiple contacts are connected in series Operation error There is no operation error The MEP or MEF instruction may not operate correctly if pulse conversion is performed for an index modified contact in the ...

Page 175: ...nstruction turns on at the falling edge on to off of the operation result Execution condition Setting data Description range data type 1 Only bit type labels assigned to the device V can be used Applicable devices Ladder ST ENO EGP EN d ENO EGF EN d FBD LD Instruction Execution condition EGP EGF Operand Description Range Data type Data type label d Edge relay number for storing operation result Bi...

Page 176: ...instruction The instruction turns off non continuity state when the operation result is in another state staying on rising edge off to on or staying off The instruction is used to perform pulse conversion for index modified programs in the subroutine program or in the area between the FOR and NEXT instructions The instruction can be used in the same way as the AND instruction Operation error There...

Page 177: ...grams executed by the Safety CPU only the following safety devices and constants can be used 3 When SA T and SA ST is used refer to the following Page 177 OUT T OUTH T OUT ST OUTH ST When SA C is used refer to the following Page 184 OUT C Ladder ST ENO OUT EN d FBD LD Instruction Execution condition OUT Every scan Operand Description Range Data type Data type label d On off target device number Bi...

Page 178: ...ecified device When indirect specification is used specify the bit as shown below Operation error There is no operation error Condition Operation result Coil Specified bit When a bit device is used Off Off On On When a bit specified word device is used Off 0 On 1 1 The operation result is output to bit 0 of the indirect address stored in D0 OUT D0 0 1 ...

Page 179: ...measurement when the operation result up to the OUT instruction is on When time is up the normally open contact turns on continuity state and the normally closed contact turns off non continuity state Execution condition RnPCPU redundant If these instructions are used in a program executed in both systems there are restrictions on their operation when the systems are switched MELSEC iQ R CPU Modul...

Page 180: ...owing safety devices and constants can be used 4 Only SA T and SA ST can be used 5 SA T SA ST and SA C cannot be used 6 Only K decimal constant can be used Operand Description Range Data type Data type label d Timer device or timer type label Bit ANY_BOOL Coil Value Value set for the timer 0 to 32767 16 bit unsigned binary 1 ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Ope...

Page 181: ...peed timer high speed retentive timer 0 01 to 100 0ms in increments of 0 01ms Default 10 0ms For the counting method refer to the following MELSEC iQ R CPU Module User s Manual Application Precautions To create a program in which the operation of a timer contact triggers the operation of another timer program the timers in order from the one that operates last In the following cases if a program i...

Page 182: ... T0 to T2 are programmed in order of measurement Operation error There is no operation error 1 Timer T0 starts measurement when X0 turns on 2 When the contact of timer T0 turns on the contacts of timers T1 and T2 also turn on X0 T0 T1 1 2 T0 OUT K1 T1 OUT K1 T2 OUT K1 ...

Page 183: ...structions are used in a program executed in both systems they do not operate in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST Value Set value ENO OUT_T EN Coil Value FBD LD Value Set value is to be replaced by OUT_T Instruction Execution condition OUT LT OUT LST Every scan Operand Description Range Data type Data type lab...

Page 184: ...1 to 1000ms in increments of 0 001ms Default 0 001ms For the counting method refer to the following MELSEC iQ R CPU Module User s Manual Application Precautions To create a program in which the operation of a long timer contact triggers the operation of another long timer program the long timers in order from the one that operates last In the following cases if a program is created in order of tim...

Page 185: ...to LT2 are programmed in order of measurement Operation error There is no operation error 1 Long timer LT0 starts measurement when X0 turns on 2 When the contact of timer LT0 turns on the contacts of timers LT1 and LT2 also turn on X0 LT0 LT1 1 2 LT0 OUT K1 LT1 OUT K1 LT2 OUT K1 ...

Page 186: ...tting data Description range data type 1 Only counter type labels can be used 2 If the program is written in ST language or FBD LD the data type will be ANY_INT In safety programs executed by the Safety CPU only safety devices and safety labels of data types described in the table can be used Ladder ST Value Set value ENO OUT_C EN Coil Value FBD LD Value Set value Instruction Execution condition O...

Page 187: ... When the count value reaches the set value current value set value the normally open contact turns on continuity state and the normally closed contact turns off non continuity state Counting is disabled while the operation result remains on Count input does not need to be converted into pulses After counting up the count value and contact status remain unchanged until the RST instruction is execu...

Page 188: ... ANY_INT Applicable devices 1 Only LC can be used 2 T ST and C cannot be used 3 Only K decimal constant can be used Ladder ST Value Set value ENO OUT_C EN Coil Value FBD LD Value Set value is to be replaced by OUT_C Instruction Execution condition OUT LC Every scan Operand Description Range Data type Data type label d Long counter number Bit ANY_BOOL 1 Coil Value Set value for the long counter 0 t...

Page 189: ...unt value reaches the set value current value set value the normally open contact turns on continuity state and the normally closed contact turns off non continuity state Counting is disabled while the operation result remains on Count input does not need to be converted into pulses After counting up the count value and contact status remain unchanged until the RST instruction is executed When the...

Page 190: ...wing are performed Operation error There is no operation error Ladder ST ENO OUT EN d FBD LD is to be replaced by OUT Instruction Execution condition OUT F Every scan Operand Description Range Data type Data type label d Target annunciator number Bit ANY_BOOL 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L ...

Page 191: ...y the following safety devices and constants can be used Ladder ST ENO SET EN d FBD LD Instruction Execution condition SET Operand Description Range Data type Data type label d Set target bit device number or bit specification of word device Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others DY X Y M L SM F...

Page 192: ...the RST instruction When the execution command is off the device status does not change Operation error There is no operation error When X is used specify a device number that is not used in actual input If the number that is used in actual input is specified the data of actual input is written over the input device X specified by the SET instruction Device Status Bit device Turns on the coil or c...

Page 193: ...cuted by the Safety CPU only the following safety devices and constants can be used Ladder ST ENO RST EN d FBD LD Instruction Execution condition RST Operand Description Range Data type Data type label d Reset target bit device number bit specification of word device or reset target word device number Bit Word Double word ANY_ELEMENTARY EN Execution condition Bit BOOL ENO Execution result Bit BOOL...

Page 194: ...t change The RST instruction specifying a word device operates in the same way as the following ladder Operation error There is no operation error Device Status Bit device Turns off the coil or contact Timer counter Clears the current value to 0 and turns off the coil or contact Bit specified word device Sets the specified bit to 0 Word device other than timer and counter Clears the data to 0 X10 ...

Page 195: ... replaced by SET Instruction Execution condition SET F Operand Description Range Data type Data type label d Set target annunciator number F number Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E d 1 RnCPU RnENCPU Rn...

Page 196: ...iators are already on the annunciator number will not be stored in the special register SD64 to SD79 even when a new annunciator turns on Operation error There is no operation error The USER LED turns on The annunciator number F number turned on is stored in the special register SD64 to SD79 The value in SD63 is incremented by one 1 The data remain the same SD63 SD64 SD65 SD66 SD78 SD79 SD63 SD64 ...

Page 197: ... used Ladder ST ENO RST EN d FBD LD is to be replaced by RST Instruction Execution condition RST F Operand Description Range Data type Data type label d Reset target annunciator number F number Bit 1 ANY_BOOL 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J...

Page 198: ...o SD79 by the RST instruction If an annunciator with a number not registered in SD64 to SD79 has been turned on the number is newly registered If all annunciator numbers in SD64 to SD79 are reset turned off the USER LED of the CPU module turns off Ex When the value in SD63 is 16 and there is an annunciator number that is not registered Operation error There is no operation error 1 Reset F90 2 The ...

Page 199: ...pes described in the table can be used Applicable devices In safety programs executed by the Safety CPU only the following safety devices and constants can be used Ladder ST ENO PLS EN d FBD LD Instruction Execution condition PLS Operand Description Range Data type Data type label d Pulse conversion target device number Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Ope...

Page 200: ...ned off by the next PLS instruction The PLS instruction performs OFF processing at the execution of the next instruction after the instruction execution However in safety programs executed by the Safety CPU the PLS instruction turns on one safety cycle processing for the specified device label until the safety program of next safety cycle processing starts and the instruction is executed If the st...

Page 201: ...ribed in the table can be used Applicable devices In safety programs executed by the Safety CPU only the following safety devices and constants can be used Ladder ST ENO PLF EN d FBD LD Instruction Execution condition PLF Operand Description Range Data type Data type label d Pulse conversion target device number Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit...

Page 202: ...uted The PLF instruction performs OFF processing at the execution of the next instruction after the instruction execution However in safety programs executed by the Safety CPU the PLF instruction turns on one safety cycle processing for the specified device label until the safety program of next safety cycle processing starts and the instruction is executed If the standard safety shared label is u...

Page 203: ... rising edge of the execution command Ladder ST ENO FF EN d FBD LD Instruction Execution condition FF Operand Description Range Data type Data type label d Inversion target device number Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others DY X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G...

Page 204: ...202 5 SEQUENCE INSTRUCTIONS 5 3 Output Instructions Operation error There is no operation error ...

Page 205: ...devices Ladder ST ENO DELTA EN d ENO DELTAP EN d FBD LD Instruction Execution condition DELTA DELTAP Operand Description Range Data type Data type label d Pulse conversion target device number Bit ANY_BOOL 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others DY X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J...

Page 206: ...s These instructions are used as an execution command rising edge execution for intelligent function modules These instructions cannot be used as an actual output command for output modules Operation error There is no operation error The DELTA P instruction is used to set a preset value of the high speed counter module Example A program that presets the CH1 of the high speed counter module RD62P2 ...

Page 207: ...data type Applicable devices Ladder ST ENO SFT EN d ENO SFTP EN d FBD LD Instruction Execution condition SFT SFTP Operand Description Range Data type Data type label d Shift target device Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others DY X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H ...

Page 208: ...it just before the one specified by d to the bit specified by d After the data is shifted the data of the shift source bit is set to 0 Ex The SFT P instruction that specifies D0 5 b5 in D0 is executed it shifts the 1 0 state of b4 in D0 to b5 and sets b4 to 0 Operation error There is no operation error 1 X02 ON 2 After the 1st shift input 3 After the 2nd shift input 4 X02 ON 5 After the 3rd shift ...

Page 209: ...l Execution condition Setting data Description range data type 1 Only labels assigned to the device N or to which constants are assigned can be used In safety programs executed by the Safety CPU only safety devices and safety labels of data types described in the table can be used Ladder ST 1 Master control ladder ENO MC EN N d ENO MCR EN N FBD LD MC MCR Instruction Execution condition MC MCR Ever...

Page 210: ... and MCR instructions are executed and therefore the scan time is not shortened Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E N DY N d Operand Bit Word Indirect specification Constant Others SA X SA Y SA M SA SM SA B SA T SA ST SA C SA D SA W SA SD K H N N d 1 Executed only when X0 is on ...

Page 211: ...e any contact instruction before the MCR instruction Use the MC and MCR instructions with the same nesting number as a set Note that if the MCR instructions are nested in one place all master controls can be terminated by specifying the lowest nesting N number Refer to Precautions Operation error There is no operation error The master control instructions can be nested Individual master control ar...

Page 212: ...mbers in order from lower numbers and the MCR instruction should use them in order from higher numbers If the MCR instructions are nested in one place all master controls can be terminated by specifying the lowest nesting N number MC N0 M15 MC N1 M16 MC N2 M17 MCR N2 MCR N0 N0 M15 N1 M16 N2 M17 X1 X2 X3 MCR N1 MC N0 M15 MC N1 M16 MC N2 M17 MCR N0 N0 M15 N1 M16 N2 M17 X1 X2 X3 ...

Page 213: ...errupt pointer I When the instruction is executed the CPU module terminates the running program Sequence programs following the FEND instruction can be displayed on the engineering tool ladder mode Ladder ST Not supported FBD LD Not supported Instruction Execution condition FEND Every scan When the CJ instruction is used When there are subroutine and interrupt programs A Main routine program B Sub...

Page 214: ...truction the FEND instruction is executed before the NEXT instruction 3381H After execution of the CALL P FCALL P ECALL P or EFCALL P instruction the FEND instruction is executed before the RET instruction 33A1H Within the interrupt program specified by the interrupt pointer I the FEND instruction is executed before the IRET instruction ...

Page 215: ...struction If the program is created using the engineering tool in ladder edit mode the END instruction is automatically input and cannot be edited The following figure shows how to use the termination instructions when a main routine program subroutine program and interrupt program exist Ladder ST Not supported FBD LD Not supported Instruction Execution condition END Every scan A Main routine prog...

Page 216: ...setting performs END processing Operation error Error code SD0 Description 3340H After execution of the FOR instruction the END instruction is executed before the NEXT instruction 3381H After execution of the CALL P FCALL P ECALL P or EFCALL P instruction the END instruction is executed before the RET instruction 33A1H Within the interrupt program specified by the interrupt pointer I the END instr...

Page 217: ...instruction set the switch back to STOP and then set it to RUN again Operation error Ladder ST ENO STOP EN FBD LD Instruction Execution condition STOP Error code SD0 Description 3340H After execution of the FOR instruction the STOP instruction is executed before the NEXT instruction 3381H After execution of the CALL P FCALL P ECALL P EFCALL P or XCALL instruction the STOP instruction is executed b...

Page 218: ...the following purposes For inserting or deleting the NOP instruction refer to the following GX Works3 Operating Manual Operation error There is no operation error Ladder ST Not supported FBD LD Not supported Instruction Execution condition NOP Every scan To insert a space for debugging To delete an instruction without changing the number of steps The relevant instruction is replaced with the NOP i...

Page 219: ...ious operations Execution condition Processing details This instruction is a no operation instruction and has no impact on the previous operations Operation error There is no operation error Ladder ST Not supported FBD LD Not supported Instruction Execution condition NOPLF Every scan RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundant Process ...

Page 220: ...O AND_ EN s1 s2 ENO OR_ EN s1 s2 ENO LD_ _U EN s1 s2 ENO AND_ _U EN s1 s2 ENO OR_ _U EN s1 s2 is replaced by any of the following EQ NE GT LE LT GE 2 FBD LD is to be replaced by combination of any of the following LD_ AND_ OR_ and EQ _U NE _U GT _U LE _U LT _U GE _U 2 Instruction Execution condition LD _U AND _U OR _U Every scan Operand Description Range Data type Data type label s1 LD AND OR Comp...

Page 221: ...ry value in comparison operation If the LD instruction is used in the program written in FBD LD use a left rail or a variable constant which is always on for EN If the OR instruction is used in the program written in FBD LD and EN is set to TRUE ENO turns on EN will not be an execution condition Operation error There is no operation error Operand Bit Word Double word Indirect specification Constan...

Page 222: ...O ANDD_ _U EN s1 s2 ENO ORD_ _U EN s1 s2 is replaced by any of the following EQ NE GT LE LT GE 2 FBD LD is to be replaced by combination of any of the following LDD_ ANDD_ ORD_ and EQ _U NE _U GT _U LE _U LT _U GE _U 2 Instruction Execution condition LDD _U ANDD _U ORD _U Every scan Operand Description Range Data type Data type label s1 LDD ANDD ORD Comparison data or the start device where the co...

Page 223: ...OV P instruction If an instruction which handles 16 bit data such as the MOV P instruction is used comparison cannot be performed normally If the LDD instruction is used in the program written in FBD LD use a left rail or a variable constant which is always on for EN If the ORD instruction is used in the program written in FBD LD and EN is set to TRUE ENO turns on EN will not be an execution condi...

Page 224: ... ENO CMP_U EN s1 s2 d ENO CMPP_U EN s1 s2 d FBD LD Instruction Execution condition CMP CMP_U CMPP CMPP_U Operand Description Range Data type Data type label s1 CMP P Comparison data or the device where the comparison data is stored 32768 to 32767 16 bit signed binary ANY16_S CMP P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 CMP P Comparison data or the device where the comparison data is store...

Page 225: ...ary data specified by s2 and according to the result small equal or large d d 1 or d 2 is turned on Operation error There is no operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 1 s2 1 d 2 d CMP 48 49 50 51 s1 s2 d s2 d s1 d 1 d 2 d 1 d 2 X0 X0 Held Held Held Turns on when ...

Page 226: ...ecution condition DCMP DCMP_U DCMPP DCMPP_U Operand Description Range Data type Data type label s1 DCMP P Comparison data or the device where the comparison data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S DCMP P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 DCMP P Comparison data or the device where the comparison data is stored 2147483648 to 2147483647 32 bit signed bi...

Page 227: ...ecified by s1 with the 32 bit binary data specified by s2 and according to the result small equal or large d d 1 or d 2 is turned on Operation error There is no operation error d DCMP 48 49 50 51 s1 s2 d s2 d s1 d 1 d 2 d 1 d 2 X0 X0 Held Held Held Turns on when s1 s1 1 s2 s2 1 Turns on when s1 s1 1 s2 s2 1 Turns on when s1 s1 1 s2 s2 1 ...

Page 228: ...d ENO ZCPP_U EN s1 s2 s3 d FBD LD Instruction Execution condition ZCP ZCP_U ZCPP ZCPP_U Operand Description Range Data type Data type label s1 ZCP P Lower limit value or the start device for storing the lower limit value 32768 to 32767 16 bit signed binary ANY16_S ZCP P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 ZCP P Upper limit value or the start device for storing the upper limit value 327...

Page 229: ...evice specified by comparison data s3 According to the comparison result below within zone or above d d 1 or d 2 is turned on Precautions Set s1 to a value less than s2 If s1 is set to a value greater than s2 s2 is treated as the same value as s1 Operation error There is no operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD S...

Page 230: ...d FBD LD Instruction Execution condition DZCP DZCP_U DZCPP DZCPP_U Operand Description Range Data type Data type label s1 DZCP P Lower limit value or the start device for storing the lower limit value 2147483648 to 2147483647 32 bit signed binary ANY32_S DZCP P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 DZCP P Upper limit value or the start device for storing the upper limit value 214748...

Page 231: ... comparison data s3 According to the comparison result below within zone or above d d 1 or d 2 is turned on Precautions Set s1 to a value less than s2 If s1 is set to a value greater than s2 s2 is treated as the same value as s1 Operation error There is no operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J...

Page 232: ... P_U EN s1 s2 n d is replaced by any of the following EQ NE GT LE LT GE 2 FBD LD is to be replaced by combination of any of the following BKCMP_ and EQ P _U NE P _U GT P _U LE P _U LT P _U GE P _U 2 Instruction Execution condition BKCMP _U BKCMP P _U Operand Description Range Data type Data type label s1 BKCMP P Comparison data or the start device where the comparison data is stored 32768 to 32767...

Page 233: ...T C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 d n Instruction symbol ladder FBD LD Condition Result BKCMP P _U BKCMP_EQ P _U s1 s2 On 1 BKCMP P _U BKCMP_NE P _U s1 s2 BKCMP P _U BKCMP_GT P _U s1 s2 BKCMP P _U BKCMP_LE P _U s1 s2 BKCMP P _U BKCMP_LT P _U s1 s2 BKCMP P _U BKCMP_GE P _U s1 s2 BKCMP P _U BKCMP_EQ P _U s1 s2 Off 0 BKCMP P _U BKCMP_NE P _U s1 s2 BKCMP P _U BKCMP_GT P...

Page 234: ... s1 s2 n d is replaced by any of the following EQ NE GT LE LT GE 2 FBD LD is to be replaced by combination of any of the following DBKCMP_ and EQ P _U NE P _U GT P _U LE P _U LT P _U GE P _U 2 Instruction Execution condition DBKCMP _U DBKCMP P _U Operand Description Range Data type Data type label s1 DBKCMP P Comparison data or the start device where the comparison data is stored 2147483648 to 214...

Page 235: ... turns on If n is 0 no processing is performed Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 d n Instruction symbol ladder FBD LD Condition Result DBKCMP P _U DBKCMP_EQ P _U s1 s2 On 1 DBKCMP P _U DBKCMP_NE P _U s1 s2 DBKCMP P _U DBKCMP_GT P _U s1 s2 DBKCMP P _U DBKCMP_LE P _U s1 s2...

Page 236: ...he specified ones for storing the operation result do not change Error code SD0 Description 2821H The device ranges starting from the ones specified by s1 and d are overlapping The device ranges starting from the ones specified by s2 and d are overlapping D10 F D10 0 0 0 1 0 1 1 1 1 1 0 0 1 1 0 0 0 D10 F D10 0 0 0 1 0 1 1 0 0 0 0 1 1 1 0 0 0 ...

Page 237: ... are set FBD LD Not supported Page 237 P _U when three operands are set Instruction Execution condition _U P P_U Operand Description Range Data type Data type label s P Second addend data or the device where the second addend data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U d P Device where the first addend data is stored 32768 to 32767 16 b...

Page 238: ...tion result in the device specified by d If an overflow occurs in the result the carry bit is ignored In this case SM700 does not turn on Operation error There is no operation error P instruction P _U instruction b15 b0 5678 BIN d s d 1234 BIN 6912 BIN b15 b0 b15 b0 b15 b0 12345 BIN d s d 23456 BIN 3033 BIN b15 b0 b15 b0 b15 b0 12345 BIN d s d 23456 BIN 3034 BIN b15 b0 b15 b0 b15 b0 56789 BIN d s ...

Page 239: ...scription Range Data type Data type label s1 P First addend data or the device where the first addend data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 P Second addend data or the device where the second addend data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U d P Device for storing t...

Page 240: ...n result in the device specified by d If an overflow occurs in the result the carry bit is ignored In this case SM700 does not turn on Operation error There is no operation error P instruction P _U instruction b15 b0 5678 BIN s1 s2 d 1234 BIN 6912 BIN b15 b0 b15 b0 b15 b0 12345 BIN s1 s2 d 23456 BIN 3033 BIN b15 b0 b15 b0 b15 b0 12345 BIN s1 s2 d 23456 BIN 3034 BIN b15 b0 b15 b0 b15 b0 56789 BIN s...

Page 241: ...rands are set FBD LD Not supported Page 241 P _U when three operands are set Instruction Execution condition _U P P_U Operand Description Range Data type Data type label s P Subtrahend data or the device where subtrahend data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U d P Device where minuend data is stored 32768 to 32767 16 bit signed bina...

Page 242: ...ration result in the device specified by d If an underflow occurs in the result the borrow bit is ignored In this case SM700 does not turn on Operation error There is no operation error P instruction P _U instruction b15 b0 5678 BIN d s d 1234 BIN 4444 BIN b15 b0 b15 b0 b15 b0 12345 BIN d s d 23456 BIN 3033 BIN b15 b0 b15 b0 b15 b0 12345 BIN d s d 23456 BIN 3034 BIN b15 b0 b15 b0 b15 b0 56789 BIN ...

Page 243: ...ondition _U P P_U Operand Description Range Data type Data type label s1 P Minuend data or the device where minuend data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 P Subtrahend data or the device where subtrahend data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U d P Device for stori...

Page 244: ...ion result in the device specified by d If an underflow occurs in the result the borrow bit is ignored In this case SM700 does not turn on Operation error There is no operation error P instruction P _U instruction b15 b0 5678 BIN s1 s2 d 1234 BIN 4444 BIN b15 b0 b15 b0 b15 b0 12345 BIN s1 s2 d 23456 BIN 3033 BIN b15 b0 b15 b0 b15 b0 12345 BIN s1 s2 d 23456 BIN 3034 BIN b15 b0 b15 b0 b15 b0 56789 B...

Page 245: ...hen three operands are set Instruction Execution condition D D _U D P D P_U Operand Description Range Data type Data type label s D P Second addend data or the start device where the second addend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary ANY32_U d D P Start device where the first addend data is stored 2147483648 to 214748364...

Page 246: ...red In this case SM700 does not turn on Operation error There is no operation error D P instruction D P _U instruction b0 567890 BIN d 123456 BIN 691346 BIN d 1 s s 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN d 987654321 BIN 74738564 BIN d 1 s s 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN d 987654321 BIN 74738563 BIN d 1 s s 1 d d 1 b31 b16 b15 b0 b3...

Page 247: ...type Data type label s1 D P First addend data or the start device where the first addend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 D P Second addend data or the start device where the second addend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary ANY...

Page 248: ...this case SM700 does not turn on Operation error There is no operation error D P instruction D P _U instruction b0 567890 BIN s1 123456 BIN 691346 BIN s1 1 s2 s2 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN s1 987654321 BIN 74738564 BIN s1 1 s2 s2 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN s1 987654321 BIN 74738563 BIN s1 1 s2 s2 1 d d 1 b31 b16 b15 ...

Page 249: ...ported Page 249 D P _U when three operands are set Instruction Execution condition D D _U D P D P_U Operand Description Range Data type Data type label s D P Subtrahend data or the start device where subtrahend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary ANY32_U d D P Start device where minuend data is stored 2147483648 to 2147...

Page 250: ...s ignored In this case SM700 does not turn on Operation error There is no operation error D P instruction D P _U instruction b0 567890 BIN d 123456 BIN 444434 BIN d 1 s s 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN d 987654321 BIN 74738564 BIN d 1 s s 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN d 987654321 BIN 74738563 BIN d 1 s s 1 d d 1 b31 b16 b15...

Page 251: ...rand Description Range Data type Data type label s1 D P Minuend data or the start device where minuend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 D P Subtrahend data or the start device where subtrahend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary...

Page 252: ... In this case SM700 does not turn on Operation error There is no operation error D P instruction D P _U instruction b0 567890 BIN s1 123456 BIN 444434 BIN s1 1 s2 s2 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN s1 987654321 BIN 74738564 BIN s1 1 s2 s2 1 d d 1 b31 b16 b15 b0 b31 b16 b15 b0 b31 b16 b15 b0 1234567890 BIN s1 987654321 BIN 74738563 BIN s1 1 s2 s2 1 d d 1 b31 b16 ...

Page 253: ... replaced by any of the following MULTI MULTIP MULTI_U MULTIP_U Instruction Execution condition _U P P_U Operand Description Range Data type Data type label s1 P Multiplicand data or the device where multiplicand data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 P Multiplier data or the device where multiplier data is stored 32768 to 32767...

Page 254: ...ce specified by d When d is a bit device data should be specified in order from lower bits Ex Operation result when d is a bit device Operation error There is no operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 d Operand Bit Word Constant SA X SA Y SA M SA SM SA B SA T ...

Page 255: ...any of the following DIVISION DIVISIONP DIVISION_U DIVISIONP_U Instruction Execution condition _U P P_U Operand Description Range Data type Data type label s1 P Dividend data or the device where dividend data is stored 32768 to 32767 16 bit signed binary ANY16_S P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 P Divisor data or the device where divisor data is stored 32768 to 32767 16 bit signed ...

Page 256: ...e stored in 32 bits When a bit device is specified the number of digit specified bits is used to store the quotient and remainder Operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 d Operand Bit Word Constant SA X SA Y SA M SA SM SA B SA T SA ST SA C SA D SA W SA SD K H s...

Page 257: ... DMULTIP_U Instruction Execution condition D D _U D P D P_U Operand Description Range Data type Data type label s1 D P Multiplicand data or the start device where multiplicand data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 D P Multiplier data or the start device where multiplier data is stored 2147483648 to 2147483647 3...

Page 258: ... the operation result are required temporarily store the result in a word device and transfer the data stored in d 2 and d 3 to the specified bit devices Ex Operation result when d is a bit device Operation error There is no operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1...

Page 259: ... DDIVISIONP DDIVISION_U DDIVISIONP_U Instruction Execution condition D D _U D P D P_U Operand Description Range Data type Data type label s1 D P Dividend data or the start device where dividend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S D P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 D P Divisor data or the start device where divisor data is stored 2147483648 to ...

Page 260: ...d remainder are stored in 64 bits The quotient is stored in lower 32 bits and the remainder is stored in upper 32 bits When a bit device is specified only quotient is stored in 32 bits Operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 d Operand Bit Word Constant SA X SA ...

Page 261: ...ee operands are set FBD LD Not supported Page 260 B P when three operands are set Instruction Execution condition B B P Operand Description Range Data type Data type label s Second addend data or the device where the second addend data is stored 0 to 9999 BCD 4 digit ANY16 d Device where the first addend data is stored 0 to 9999 BCD 4 digit ANY16 Operand Bit Word Double word Indirect specification...

Page 262: ...nge Data type Data type label s1 First addend data or the device where the first addend data is stored 0 to 9999 BCD 4 digit ANY16 s2 Second addend data or the device where the second addend data is stored 0 to 9999 BCD 4 digit ANY16 d Device for storing the operation result BCD 4 digit ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specif...

Page 263: ...d by s2 and store the operation result in the device specified by d If the result exceeds 9999 the carry bit is ignored In this case SM700 does not turn on Operation error Error code SD0 Description 3405H The BCD data in the device specified by s1 is out of the range 0 to 9999 The BCD data in the device specified by s2 is out of the range 0 to 9999 s1 s2 d 5 6 7 8 1 2 3 4 6 9 1 2 6 4 3 2 3 5 8 3 0...

Page 264: ...will be as follows In this case SM700 does not turn on Ladder ST Not supported Page 264 B P when three operands are set FBD LD Not supported Page 264 B P when three operands are set Instruction Execution condition B B P Operand Description Range Data type Data type label s Subtrahend data or the device where subtrahend data is stored 0 to 9999 BCD 4 digit ANY16 d Device where minuend data is store...

Page 265: ...thmetic Operation Instructions 263 6 Operation error Error code SD0 Description 3405H The BCD data in the device specified by s is out of the range 0 to 9999 The BCD data in the device specified by d is out of the range 0 to 9999 ...

Page 266: ...B P Operand Description Range Data type Data type label s1 Minuend data or the device where minuend data is stored 0 to 9999 BCD 4 digit ANY16 s2 Subtrahend data or the device where subtrahend data is stored 0 to 9999 BCD 4 digit ANY16 d Device for storing the operation result BCD 4 digit ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect spec...

Page 267: ...s1 and store the operation result in the device specified by d If an underflow occurs the result will be as follows In this case SM700 does not turn on Operation error Error code SD0 Description 3405H The BCD data in the device specified by s1 is out of the range 0 to 9999 The BCD data in the device specified by s2 is out of the range 0 to 9999 s1 s2 d 0 6 7 8 0 2 3 4 0 4 4 4 Filled with 0s 0 0 0 ...

Page 268: ...B P when three operands are set FBD LD Not supported Page 268 DB P when three operands are set Instruction Execution condition DB DB P Operand Description Range Data type Data type label s Second addend data or the start device where the second addend data is stored 0 to 99999999 BCD 8 digit ANY32 d Start device where the first addend data is stored 0 to 99999999 BCD 8 digit ANY32 Operand Bit Word...

Page 269: ...tic Operation Instructions 267 6 Operation error Error code SD0 Description 3405H The BCD data in the device specified by s is out of the range 0 to 99999999 The BCD data in the device specified by d is out of the range 0 to 99999999 ...

Page 270: ...ype Data type label s1 First addend data or the start device where the first addend data is stored 0 to 99999999 BCD 8 digit ANY32 s2 Second addend data or the start device where the second addend data is stored 0 to 99999999 BCD 8 digit ANY32 d Start device for storing the operation result BCD 8 digit ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word...

Page 271: ... the result exceeds 99999999 the carry bit is ignored In this case SM700 does not turn on Operation error d 1 s1 1 s2 1 Upper 4 digits d s1 s2 Lower 4 digits Error code SD0 Description 3405H The BCD data in the device specified by s1 is out of the range 0 to 99999999 The BCD data in the device specified by s2 is out of the range 0 to 99999999 s1 s1 1 s2 s2 1 d d 1 1 0 2 3 4 5 6 7 6 5 7 8 9 1 2 3 8...

Page 272: ...orted Page 272 DB P when three operands are set FBD LD Not supported Page 272 DB P when three operands are set Instruction Execution condition DB DB P Operand Description Range Data type Data type label s Subtrahend data or the start device where subtrahend data is stored 0 to 99999999 BCD 8 digit ANY32 d Minuend data or the start device where minuend data is stored 0 to 99999999 BCD 8 digit ANY32...

Page 273: ...tic Operation Instructions 271 6 Operation error Error code SD0 Description 3405H The BCD data in the device specified by s is out of the range 0 to 99999999 The BCD data in the device specified by d is out of the range 0 to 99999999 ...

Page 274: ...d Description Range Data type Data type label s1 Minuend data or the start device where minuend data is stored 0 to 99999999 BCD 8 digit ANY32 s2 Subtrahend data or the start device where subtrahend data is stored 0 to 99999999 BCD 8 digit ANY32 d Start device for storing the operation result BCD 8 digit ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double wo...

Page 275: ... d If an underflow occurs the result will be as follows In this case SM700 does not turn on Operation error d 1 s1 1 s2 1 Upper 4 digits d s1 s2 Lower 4 digits Error code SD0 Description 3405H The BCD data in the device specified by s1 is out of the range 0 to 99999999 The BCD data in the device specified by s2 is out of the range 0 to 99999999 s1 s1 1 s2 s2 1 d d 1 1 0 2 3 4 5 6 7 6 5 7 8 9 1 2 3...

Page 276: ...a type Data type label s1 Multiplicand data or the device where multiplicand data is stored 0 to 9999 BCD 4 digit ANY16 s2 Multiplier data or the device where multiplier data is stored 0 to 9999 BCD 4 digit ANY16 d Start device for storing the operation result BCD 8 digit ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constan...

Page 277: ...data in the device specified by s2 and store the operation result in the device specified by d d 1 Upper 4 digits d Lower 4 digits Operation error Error code SD0 Description 3405H The BCD data in the device specified by s1 is out of the range 0 to 9999 The BCD data in the device specified by s2 is out of the range 0 to 9999 s1 s2 5 6 7 8 0 8 7 6 0 d 1 4 9 7 d 3 9 2 8 Filled with 0 ...

Page 278: ...Data type Data type label s1 Dividend data or the device where dividend data is stored 0 to 9999 BCD 4 digit ANY16 s2 Divisor data or the device where divisor data is stored 0 to 9999 BCD 4 digit ANY16 d Start device for storing the operation result BCD 8 digit ANY16_ARRAY Number of elements 2 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect speci...

Page 279: ...ion result the quotient and remainder are stored in 32 bits Operation error d Quotient d 1 Remainder Quotient BCD 4 digits Stored in lower 16 bits Remainder BCD 4 digits Stored in upper 16 bits Error code SD0 Description 3400H The value divisor in the device specified by s2 is 0 3405H The BCD data in the device specified by s1 is out of the range 0 to 9999 The BCD data in the device specified by s...

Page 280: ...l s1 Multiplicand data or the start device where multiplicand data is stored 0 to 99999999 BCD 8 digit ANY32 s2 Multiplier data or the start device where multiplier data is stored 0 to 99999999 BCD 8 digit ANY32 d Start device for storing the operation result BCD 16 digit ANY32_ARRAY Number of elements 2 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Ind...

Page 281: ...ice only the lower 8 digits lower 32 bits of the operation result are stored Ex Operation result when d is a bit device Operation error K1 Lower 1 digit b0 to b3 K4 Lower 4 digits b0 to b15 K8 Lower 8 digits b0 to b31 Error code SD0 Description 3405H The BCD data in the device specified by s1 is out of the range 0 to 99999999 The BCD data in the device specified by s2 is out of the range 0 to 9999...

Page 282: ...e Data type label s1 Dividend data or the start device where dividend data is stored 0 to 99999999 BCD 8 digit ANY32 s2 Divisor data or the start device where divisor data is stored 0 to 99999999 BCD 8 digit ANY32 d Start device for storing the operation result BCD 16 digit ANY32_ARRAY Number of elements 2 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word I...

Page 283: ...it device the remainder is not stored Operation error d 1 d 3 Upper 4 digits d d 2 Lower 4 digits Quotient BCD 8 digits Stored in lower 32 bits Remainder BCD 8 digits Stored in upper 32 bits Error code SD0 Description 3400H The value divisor in the device specified by s2 is 0 3405H The BCD data in the device specified by s1 is out of the range 0 to 99999999 The BCD data in the device specified by ...

Page 284: ...ion Range Data type Data type label s1 BK P First addend data or the start device where the first addend data is stored 32768 to 32767 16 bit signed binary ANY16_S 1 BK P _U 0 to 65535 16 bit unsigned binary ANY16_U 1 s2 BK P Second addend data or the start device where the second addend data is stored 32768 to 32767 16 bit signed binary ANY16_S 1 BK P _U 0 to 65535 16 bit unsigned binary ANY16_U ...

Page 285: ...gned value is specified Error code SD0 Description 2821H The device ranges starting from the ones specified by s1 and d are overlapping except when the same device is specified for s1 and d The device ranges starting from the ones specified by s2 and d are overlapping except when the same device is specified for s2 and d 1234 BIN 4567 BIN 2000 BIN 1234 BIN 4000 BIN n n n 4000 BIN 1234 BIN 1234 BIN...

Page 286: ...U BK P BK P_U Operand Description Range Data type Data type label s1 BK P Minuend data or the start device where minuend data is stored 32768 to 32767 16 bit signed binary ANY16_S 1 BK P _U 0 to 65535 16 bit unsigned binary ANY16_U 1 s2 BK P Subtrahend data or the start device where subtrahend data is stored 32768 to 32767 16 bit signed binary ANY16_S 1 BK P _U 0 to 65535 16 bit unsigned binary AN...

Page 287: ...ied Error code SD0 Description 2821H The device ranges starting from the ones specified by s1 and d are overlapping except when the same device is specified for s1 and d The device ranges starting from the ones specified by s2 and d are overlapping except when the same device is specified for s2 and d 8765 BIN 8888 BIN 9325 BIN 5000 BIN 4352 BIN n n n 1234 BIN 5678 BIN 9876 BIN 4321 BIN 4000 BIN 7...

Page 288: ...ta type Data type label s1 DBK P First addend data or the start device where the first addend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S 1 DBK P _U 0 to 4294967295 32 bit unsigned binary ANY32_U 1 s2 DBK P Second addend data or the start device where the second addend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S 1 DBK P _U 0 to 4294967295 32 bit un...

Page 289: ...essing is performed If an overflow occurs the result will be as follows In this case SM700 does not turn on 1 Operation is possible because they exactly match 1 An operation error results because they partly match When a signed value is specified When an unsigned value is specified 20000 60000 60000 40000 n 30000 BIN 40000 BIN 50000 BIN 60000 BIN n b31 b0 50000 BIN 20000 BIN 10000 BIN 20000 BIN BI...

Page 290: ...e SD0 Description 2821H The device ranges starting from the ones specified by s1 and d are overlapping except when the same device is specified for s1 and d The device ranges starting from the ones specified by s2 and d are overlapping except when the same device is specified for s2 and d ...

Page 291: ...P_U Operand Description Range Data type Data type label s1 DBK P Minuend data or the start device where minuend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S 1 DBK P _U 0 to 4294967295 32 bit unsigned binary ANY32_U 1 s2 DBK P Subtrahend data or the start device where subtrahend data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S 1 DBK P _U 0 to 4294967295 3...

Page 292: ...essing is performed If an overflow occurs the result will be as follows In this case SM700 does not turn on 1 Operation is possible because they exactly match 1 An operation error results because they partly match When a signed value is specified When an unsigned value is specified 1000000 30000 54444 1234 n 55555 BIN 33333 BIN 44444 BIN 13579 BIN n b31 b0 44445 BIN 3333 BIN 10000 BIN 12345 BIN BI...

Page 293: ...de SD0 Description 2821H The device ranges starting from the ones specified by s1 and d are overlapping except when the same device is specified for s1 and d The device ranges starting from the ones specified by s2 and d are overlapping except when the same device is specified for s2 and d ...

Page 294: ...ST ENO INC EN d ENO INCP EN d ENO INC_U EN d ENO INCP_U EN d FBD LD Instruction Execution condition INC INC_U INCP INCP_U Operand Description Range Data type Data type label d INC P Increment target device 32768 to 32767 16 bit signed binary ANY16_S INC P _U 0 to 65535 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect...

Page 295: ... d by one When the INC P instruction is executed while the data in the device specified by d is 32767 32768 is stored in the device specified by d When the INC P _U instruction is executed while the data in the device specified by d is 65535 0 is stored in the device specified by d Operation error There is no operation error d d 5678 BIN 5679 BIN 1 b15 b0 b15 b0 ...

Page 296: ...ST ENO DEC EN d ENO DECP EN d ENO DEC_U EN d ENO DECP_U EN d FBD LD Instruction Execution condition DEC DEC_U DECP DECP_U Operand Description Range Data type Data type label d DEC P Decrement target device 32768 to 32767 16 bit signed binary ANY16_S DEC P _U 0 to 65535 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect...

Page 297: ... d by one When the DEC P instruction is executed while the data in the device specified by d is 32768 32767 is stored in the device specified by d When the DEC P _U instruction is executed while the data in the device specified by d is 0 65535 is stored in the device specified by d Operation error There is no operation error d d 5678 BIN 5677 BIN 1 b15 b0 b15 b0 ...

Page 298: ...d ENO DINCP EN d ENO DINC_U EN d ENO DINCP_U EN d FBD LD Instruction Execution condition DINC DINC_U DINCP DINCP_U Operand Description Range Data type Data type label d DINC P Increment target start device 2147483648 to 2147483647 32 bit signed binary ANY32_S DINC P _U 0 to 4294967295 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Doub...

Page 299: ...C P instruction is executed while the data in the device specified by d is 2147483647 2147483648 is stored in the device specified by d When the DINC P _U instruction is executed while the data in the device specified by d is 4294967295 0 is stored in the device specified by d Operation error There is no operation error 73500 BIN 73501 BIN 1 b0 d d 1 d d 1 b31 b16 b15 b0 b31 b16 b15 ...

Page 300: ...d ENO DDECP EN d ENO DDEC_U EN d ENO DDECP_U EN d FBD LD Instruction Execution condition DDEC DDEC_U DDECP DDECP_U Operand Description Range Data type Data type label d DDEC P Decrement target start device 2147483648 to 2147483647 32 bit signed binary ANY32_S DDEC P _U 0 to 4294967295 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Doub...

Page 301: ...d by d is 2147483648 2147483647 is stored in the device specified by d When the DDEC P instruction is executed while the data in the device specified by d is 0 1 is stored in the device specified by d When the DDEC P _U instruction is executed while the data in the device specified by d is 0 4294967295 is stored in the device specified by d Operation error There is no operation error 73500 BIN 734...

Page 302: ...ts can be used Ladder ST Not supported Page 302 WAND P when three operands are set FBD LD Not supported Page 302 WAND P when three operands are set Instruction Execution condition WAND WANDP Operand Description Range Data type Data type label s Logical AND data or the device where logical AND data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 32768 t...

Page 303: ...n the device specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error d d s b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 AND 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 0...

Page 304: ...n condition WAND WANDP Operand Description Range Data type Data type label s1 Logical AND data or the device where logical AND data is stored 32768 to 32767 16 bit signed binary ANY16 s2 Logical AND data or the device where logical AND data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Ex...

Page 305: ... the device specified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error s1 d s2 b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 AND 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1...

Page 306: ...rted Page 306 DAND P when three operands are set FBD LD Not supported Page 306 DAND P when three operands are set Instruction Execution condition DAND DANDP Operand Description Range Data type Data type label s Logical AND data or the start device where logical AND data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 2147483648 to 21474...

Page 307: ...device specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error d d s b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 AND 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0...

Page 308: ...NDP Operand Description Range Data type Data type label s1 Logical AND data or the start device where logical AND data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 s2 Logical AND data or the start device where logical AND data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 32 bit signed binary ANY32 EN Execution condit...

Page 309: ...ice specified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 AND 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 1 1 0 0 1 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 1...

Page 310: ...on condition BKAND BKANDP Operand Description Range Data type Data type label s1 Logical AND data or the start device where logical AND data is stored 16 bit signed binary ANY16 1 s2 Logical AND data or the start device where logical AND data is stored 32768 to 32767 16 bit signed binary ANY16 1 d Start device for storing the operation result 16 bit signed binary ANY16 1 n Number of data points 0 ...

Page 311: ...1 0 0 0 0 0 0 0 1 1 1 1 s1 2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 s1 n 2 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 s1 n 1 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 n d b15 b8b7 b0 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 d 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 d 2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 d n 2 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 d n 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 n s2 b15 b8b7 b0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 0 s2 1 1 1 1 1 1 1...

Page 312: ...adder ST Not supported Page 312 WOR P when three operands are set FBD LD Not supported Page 312 WOR P when three operands are set Instruction Execution condition WOR WORP Operand Description Range Data type Data type label s Logical OR data or the device where logical OR data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 32768 to 32767 16 bit signed ...

Page 313: ...n the device specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error d d s b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 OR 0 1 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 0 1 0 1 1 0 0 1 1 0 1 1 1 ...

Page 314: ...on condition WOR WORP Operand Description Range Data type Data type label s1 Logical OR data or the device where logical OR data is stored 32768 to 32767 16 bit signed binary ANY16 s2 Logical OR data or the device where logical OR data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Executi...

Page 315: ... the device specified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error s1 d s2 b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 OR 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 1 1 0 1 0 ...

Page 316: ...ported Page 316 DOR P when three operands are set FBD LD Not supported Page 316 DOR P when three operands are set Instruction Execution condition DOR DORP Operand Description Range Data type Data type label s Logical OR data or the start device where logical OR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 2147483648 to 214748364...

Page 317: ...device specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 OR 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 1 1 1 0 0 1 1 1 1 1 1 0 0 0 1 1 1 0 0 1 ...

Page 318: ...RP Operand Description Range Data type Data type label s1 Logical OR data or the start device where logical OR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 s2 Logical OR data or the start device where logical OR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 32 bit signed binary ANY32 EN Execution condition B...

Page 319: ...ice specified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 OR 0 0 1 1 0 0 1 1 0 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 ...

Page 320: ...ion condition BKOR BKORP Operand Description Range Data type Data type label s1 Logical OR data or the start device where logical OR data is stored 16 bit signed binary ANY16 1 s2 Logical OR data or the start device where logical OR data is stored 32768 to 32767 16 bit signed binary ANY16 1 d Start device for storing the operation result 16 bit signed binary ANY16 1 n Number of data points 0 to 65...

Page 321: ... 1 0 0 1 0 1 0 1 1 0 0 s1 2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 s1 n 2 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 s1 n 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 n d b15 b8b7 b0 0 0 0 1 0 1 1 1 1 0 1 0 1 1 1 1 d 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 d 2 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 d n 2 0 0 1 1 1 1 1 1 1 1 1 1 0 0 1 1 d n 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 n s2 b15 b8b7 b0 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 1 s2 1 1 1 0 1 0 1 ...

Page 322: ...er ST Not supported Page 322 WXOR P when three operands are set FBD LD Not supported Page 322 WXOR P when three operands are set Instruction Execution condition WXOR WXORP Operand Description Range Data type Data type label s Exclusive OR data or the device where exclusive OR data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 32768 to 32767 16 bit si...

Page 323: ...n the device specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error d d s b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 XOR 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0 0 0 0 1 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 1 0...

Page 324: ...condition WXOR WXORP Operand Description Range Data type Data type label s1 Exclusive OR data or the device where exclusive OR data is stored 32768 to 32767 16 bit signed binary ANY16 s2 Exclusive OR data or the device where exclusive OR data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO ...

Page 325: ... the device specified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error s1 d s2 b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 XOR 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1...

Page 326: ...ted Page 326 DXOR P when three operands are set FBD LD Not supported Page 326 DXOR P when three operands are set Instruction Execution condition DXOR DXORP Operand Description Range Data type Data type label s Exclusive OR data or the start device where exclusive OR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 2147483648 to 2147...

Page 327: ...device specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 XOR 0 1 0 1 0 1 0 1 1 0 0 1 0 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 0 1 1 0 0 1 1 1 1 0 0 1...

Page 328: ...P Operand Description Range Data type Data type label s1 Exclusive OR data or the start device where exclusive OR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 s2 Exclusive OR data or the start device where exclusive OR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 32 bit signed binary ANY32 EN Execution cond...

Page 329: ...ice specified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 XOR 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 1...

Page 330: ...n condition BKXOR BKXORP Operand Description Range Data type Data type label s1 Start device where the logical operation data is stored 16 bit signed binary ANY16 1 s2 Logical operation data or the start device where the logical operation data is stored 32768 to 32767 16 bit signed binary ANY16 1 d Start device for storing the operation result 16 bit signed binary ANY16 1 n Number of data points 0...

Page 331: ...0 1 0 0 1 0 1 0 1 1 0 0 s1 2 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 s1 n 2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 s1 n 1 0 0 0 1 0 1 1 1 1 1 1 1 0 0 0 0 n d b15 b8b7 b0 0 0 0 1 0 1 1 1 0 1 0 1 1 1 1 1 d 1 1 1 1 0 1 0 0 0 1 0 1 0 0 0 0 0 d 2 1 1 1 0 1 0 0 0 0 0 0 0 1 1 1 1 d n 2 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 d n 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 n s2 b15 b8b7 b0 0 0 1 1 1 1 0 0 0 1 0 1 1 1 0 0 s2 1 0 0 1 1 1 1...

Page 332: ...er ST Not supported Page 332 WXNR P when three operands are set FBD LD Not supported Page 332 WXNR P when three operands are set Instruction Execution condition WXNR WXNRP Operand Description Range Data type Data type label s Exclusive NOR data or the device where exclusive NOR data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 32768 to 32767 16 bit ...

Page 333: ... device specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error d d s b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 XNR 1 0 1 1 0 0 1 0 1 1 0 0 1 0 0 1 1 1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 0 1 0 1 ...

Page 334: ...2 d ENO WXNRP EN s1 s2 d FBD LD Instruction Execution condition WXNR WXNRP Operand Description Range Data type Data type label s1 s2 Exclusive NOR data or the device where exclusive NOR data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the operation result 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double wo...

Page 335: ... the device specified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error s1 d s2 b15 b15 b15 b8 b8 b8 b7 b7 b7 b0 b0 b0 XNR 1 1 1 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 1 1 1 1 0 0 0 1 0 1 0 0 1 1 0 0 1 0 1...

Page 336: ...ted Page 336 DXNR P when three operands are set FBD LD Not supported Page 336 DXNR P when three operands are set Instruction Execution condition DXNR DXNRP Operand Description Range Data type Data type label s Exclusive NOR data or the start device where exclusive NOR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 2147483648 to 21...

Page 337: ...e specified by s and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 XNR 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 1 1 1 0 0 0 0 0 0 d ...

Page 338: ...RP EN s1 s2 d FBD LD Instruction Execution condition DXNR DXNRP Operand Description Range Data type Data type label s1 s2 Exclusive NOR data or the start device where exclusive NOR data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the operation result 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Wor...

Page 339: ...pecified by s2 and store the operation result in the device specified by d When a bit device is specified the instruction performs an operation by assuming that the ones after the number of digit specified points are 0 Operation error There is no operation error b31 b31 b31 b16 b16 b16 b15 b15 b15 b0 b0 b0 XNR 0 0 1 1 0 0 1 1 1 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 0 0 1 1 0 0 1 1 0 1 0 0 1 d 1 ...

Page 340: ...on condition BKXNR BKXNRP Operand Description Range Data type Data type label s1 Start device where the logical operation data is stored 16 bit signed binary ANY16 1 s2 Logical operation data or the start device where the logical operation data is stored 32768 to 32767 16 bit signed binary ANY16 1 d Start device for storing the operation result 16 bit signed binary ANY16 1 n Number of data points ...

Page 341: ... 1 0 1 0 0 0 1 1 1 1 0 0 0 0 s1 2 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0 s1 n 2 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 s1 n 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 n d b15 b8b7 b0 1 1 1 0 1 0 0 0 1 1 1 1 1 1 1 1 d 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 d 2 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 d n 2 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 d n 1 1 0 1 1 0 0 1 0 0 0 1 1 0 1 0 1 n s2 b15 b8b7 b0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 s2 1 0 0 0 ...

Page 342: ...D LD Instruction Execution condition BSET BSETP Operand Description Range Data type Data type label d Set target device 16 bit signed binary ANY16 n Set target bit position 0 to 15 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J ...

Page 343: ...ons set the n th bit in the word device specified by d to 1 If n exceeds 15 the instruction sets lower 4 bits of data Operation error There is no operation error 1 Set b6 of D10 to 1 K6 D10 BSETP D10 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 b15 b6 b0 b1 D10 1 1 0 1 0 0 1 1 0 1 1 1 1 0 1 1 b15 b6 b0 b1 1 ...

Page 344: ... Execution condition BRST BRSTP Operand Description Range Data type Data type label d Reset target device 16 bit signed binary ANY16 n Reset target bit position 0 to 15 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT...

Page 345: ...set the n th bit in the word device specified by d to 0 If n exceeds 15 the instruction sets lower 4 bits of data Operation error There is no operation error 1 Reset the b11 of D10 to 0 K11 D10 BRSTP D10 1 1 0 1 0 0 1 1 0 1 0 1 1 0 1 1 b15 b11 b0 b1 D10 1 1 0 0 0 0 1 1 0 1 0 1 1 0 1 1 b15 b11 b0 b1 1 ...

Page 346: ...nge Data type Data type label s1 Device where the extract target bit data is stored 16 bit signed binary ANY16 s2 Extract target bit position 0 to 15 16 bit unsigned binary ANY16 d Device for storing the extracted bit data Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D...

Page 347: ... The bit device specified by d turns off when the extracted bit data is 0 and turns on when the bit data is 1 Specify the bit position 0 to 15 of the word data in s2 When 16 or a greater value is specified in s2 the remainder of s2 16 becomes the bit position Ex When s2 18 The remainder of 18 16 is 2 and therefore the data in bit 2 will be extracted Operation error There is no operation error 1 s2...

Page 348: ...ion Range Data type Data type label s1 Device where the extract target bit data is stored 32 bit signed binary ANY32 s2 Extract target bit position 0 to 31 16 bit unsigned binary ANY16 d Device for storing the extracted bit data Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ...

Page 349: ...t device specified by d turns off when the extracted bit data is 0 and turns on when the bit data is 1 Specify the bit position 0 to 31 of the double word data in s2 When 32 or a greater value is specified in s2 the remainder of s2 32 becomes the bit position Ex When s2 34 The remainder of 34 32 is 2 and therefore the data in bit 2 will be extracted Operation error There is no operation error 1 s2...

Page 350: ...truction Execution condition BKRST BKRSTP Operand Description Range Data type Data type label d Start device to be reset Bit ANY_BOOL n Number of reset target devices 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E...

Page 351: ...by d turn off The annunciator numbers that turned off are deleted from SD64 to SD79 and the remaining data are compressed forward The number of annunciators stored in SD64 to SD79 is stored in SD63 Timer T retentive timer ST counter C long timer LT long retentive timer LST long counter LC The n points starting from the timer T retentive timer ST counter C long timer LT long retentive timer LST or ...

Page 352: ... EN n d FBD LD Instruction Execution condition SFR SFRP Operand Description Range Data type Data type label d Shift target device 16 bit signed binary ANY16 n Number of shifts 0 to 15 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G...

Page 353: ...nd the specified number of bits is 8 7 bits are shifted because 15 divided by 8 equals 1 with a remainder of 7 Specify any value between 0 and 15 for n If a value 16 or bigger is specified bits are shifted by the remainder value of n 16 For example when n is 18 2 bits are shifted to the right because 18 divided by 16 equals 1 with a remainder of 2 Operation error There is no operation error 1 1 1 ...

Page 354: ...LD Instruction Execution condition SFL SFLP Operand Description Range Data type Data type label d Shift target device 16 bit signed binary ANY16 n Number of shifts 0 to 15 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z...

Page 355: ...s 15 and the specified number of bits is 8 7 bits are shifted because 15 divided by 8 equals 1 with a remainder of 7 Specify any value between 0 and 15 for n If a value 16 or larger is specified the value is shifted by the remainder value of n 16 to the left For example when n is 18 2 bits are shifted to the left because 18 divided by 16 equals 1 with a remainder of 2 Operation error There is no o...

Page 356: ...NO BSFRP EN n d FBD LD Instruction Execution condition BSFR BSFRP Operand Description Range Data type Data type label d Shift target device Bit ANY_BOOL n Number of bits to be shifted 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD ...

Page 357: ...ails These instructions shift the n points of data starting from the device specified by d to the right by one bit Operation error There is no operation error 1 Filled with 0 1 1 1 0 0 1 1 0 1 1 0 0 1 n d 1 d d n 1 d n 2 d n 3 d 2 d 2 d 1 d d n 1 d n 2 d n 3 SM700 1 ...

Page 358: ...O BSFLP EN n d FBD LD Instruction Execution condition BSFL BSFLP Operand Description Range Data type Data type label d Shift target device Bit ANY_BOOL n Number of bits to be shifted 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R...

Page 359: ...ails These instructions shift the n points of data starting from the device specified by d to the left by one bit Operation error There is no operation error 1 Filled with 0 0 1 1 0 0 1 1 1 0 0 1 1 d d d n 1 d n 2 d n 3 d n 1 d n 2 d n 3 d 2 d 1 d 2 d 1 n 1 1 SM700 ...

Page 360: ...n d FBD LD Instruction Execution condition DSFR DSFRP Operand Description Range Data type Data type label d Shift target device Word ANY16 n Number of devices to be shifted 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G...

Page 361: ...ese instructions shift the n points of data starting from the device specified by d to the right by one word Operation error There is no operation error 1 Filled with 0 555 212 325 100 50 40 0 555 212 325 100 50 n d 1 d d n 1 d n 2 d n 3 d 2 d 1 d d n 1 d n 2 d n 3 d n 4 1 ...

Page 362: ... d FBD LD Instruction Execution condition DSFL DSFLP Operand Description Range Data type Data type label d Shift target device Word ANY16 n Number of devices to be shifted 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G ...

Page 363: ... These instructions shift the n points of data starting from the device specified by d to the left by one word Operation error There is no operation error 1 Filled with 0 555 120 325 100 50 40 120 325 100 50 40 0 n d 1 d d n 1 d n 2 d n 3 d 2 d 1 d d n 1 d n 2 d 3 d 2 1 ...

Page 364: ... Execution condition SFTBR SFTBRP Operand Description Range Data type Data type label d Shift target device Bit ANY_BOOL n1 Number of bits to be shifted 0 to 64 16 bit unsigned binary ANY16 n2 Number of shifts 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX...

Page 365: ...ever if the remainder value is 0 no processing is performed Specify n1 within the range of 1 to 64 The n2 bit s from the most significant bit is are filled with 0 s In the case of n1 n2 the bits are filled with 0s by the value of the remainder of n2 n1 If n1 or n2 is 0 no processing is performed Operation error 1 Filled with 0s Error code SD0 Description 3405H The value specified by n1 is out of t...

Page 366: ...N s n1 n2 d ENO SFTRP EN s n1 n2 d FBD LD Instruction Execution condition SFTR SFTRP Operand Description Range Data type Data type label s Start device stored in the empty area after the shift Bit ANY_BOOL d Shift target start device Bit ANY_BOOL n1 1 Data length of shift data 0 to 65535 16 bit unsigned binary ANY16_U n2 1 Number of shifts 0 to 65535 16 bit unsigned binary ANY16_U EN Execution con...

Page 367: ...s specified for s 1s are stored in n2 bits from d n1 n2 after the shift When n2 is 0 the processing is not performed Ex When n1 10 and n2 4 Overflow data to be deleted n2 bit shift to the right Copy Operation error Error code SD0 Description 2821H The range for n2 points from s and that for n1 points from d are overlapping 3405H A constant other than 0 or 1 is specified when the constant s is spec...

Page 368: ...Execution condition SFTBL SFTBLP Operand Description Range Data type Data type label d Shift target device Bit ANY_BOOL n1 Number of bits to be shifted 0 to 64 16 bit unsigned binary ANY16 n2 Number of shifts 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX ...

Page 369: ...ver if the remainder value is 0 no processing is performed Specify n1 within the range of 1 to 64 The n2 bit s from the least significant bit is are filled with 0 s In the case of n1 n2 the bits are filled with 0s by the value of the remainder of n2 n1 If n1 or n2 is 0 no processing is performed Operation error 1 Filled with 0s Error code SD0 Description 3405H The value specified by n1 is out of t...

Page 370: ...N s n1 n2 d ENO SFTLP EN s n1 n2 d FBD LD Instruction Execution condition SFTL SFTLP Operand Description Range Data type Data type label s Start device stored in the empty area after the shift Bit ANY_BOOL d Shift target start device Bit ANY_BOOL n1 1 Data length of shift data 0 to 65535 16 bit unsigned binary ANY16_U n2 1 Number of shifts 0 to 65535 16 bit unsigned binary ANY16_U EN Execution con...

Page 371: ... for s 1s are stored in n2 bits from d after the shift When n2 is 0 the processing is not performed Ex When n1 10 and n2 4 Overflow data to be deleted n2 bit shift to the left Copy Operation error Error code SD0 Description 2821H The range for n2 points from s and that for n1 points from d are overlapping 3405H A constant other than 0 or 1 is specified when the constant s is specified The values s...

Page 372: ...ndition SFTWR SFTWRP Operand Description Range Data type Data type label d Shift target device Word ANY16 n1 Number of devices to be shifted 0 to 65535 16 bit unsigned binary ANY16 n2 Number of shifts 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T S...

Page 373: ...ord s from the most significant bit is are filled with 0H s If n1 or n2 is 0H no processing is performed In the case of n1 n2 n1 words of data starting from the device specified by d become all 0Hs Operation error There is no operation error 1 Filled with 0Hs n1 n2 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d 30FH 1EH 100H 0H 1FFH 10H 1FH 7FFH 2AH 0H 0H 0H 0H 30FH 1EH 100H 0...

Page 374: ...d FBD LD Instruction Execution condition WSFR WSFRP Operand Description Range Data type Data type label s Start device stored in the empty area after the shift 16 bit unsigned binary ANY16 d Shift target start device Word ANY16 n1 1 Data length of shift data 0 to 65535 16 bit unsigned binary ANY16_U n2 1 Number of shifts 0 to 65535 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO...

Page 375: ... is stored in n2 point s of area in the device from d n1 n2 after the shift When n2 is 0 the processing is not performed Ex When n1 9 and n2 4 Overflow data to be deleted n2 word shift to the right Copy Operation error Error code SD0 Description 2821H The range for n2 points from s and that for n1 points from d are overlapping 3405H The values specified in n1 and n2 are such that n1 n2 n2 d 8 d 7 ...

Page 376: ...dition SFTWL SFTWLP Operand Description Range Data type Data type label d Shift target device Word ANY16 n1 Number of devices to be shifted 0 to 65535 16 bit unsigned binary ANY16 n2 Number of shifts 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST...

Page 377: ... word s from the least significant bit is are filled with 0H s If n1 or n2 is 0H no processing is performed In the case of n1 n2 n1 words of data starting from the device specified by d become all 0Hs Operation error There is no operation error 1 Filled with 0Hs 10H 0H 7FFH 3AH 1FH 30H 0H FFH 1FFH 0H 0H 0H 0H 3AH 1FH 30H 0H FFH n1 n2 d 8 d 7 d 6 d 5 d 4 d 3 d 2 d 1 d d 8 d 7 d 6 d 5 d 4 d 3 d 2 d ...

Page 378: ... FBD LD Instruction Execution condition WSFL WSFLP Operand Description Range Data type Data type label s Start device stored in the empty area after the shift 16 bit unsigned binary ANY16 d Shift target start device Word ANY16 n1 1 Data length of shift data 0 to 65535 16 bit unsigned binary ANY16_U n2 1 Number of shifts 0 to 65535 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO ...

Page 379: ...tored in n2 point s of area in the device from d after the shift When n2 is 0 the processing is not performed Ex When n1 9 and n2 4 Overflow data to be deleted n2 word shift to the left Copy Operation error Error code SD0 Description 2821H The range for n2 points from s and that for n1 points from d are overlapping 3405H The values specified in n1 and n2 are such that n1 n2 n2 d 8 d 7 d 6 d 5 d 4 ...

Page 380: ...on Execution condition BCD BCDP Operand Description Range Data type Data type label s Binary data or the device where the binary data is stored 0 to 9999 16 bit signed binary ANY16 d Device for storing the converted BCD data BCD 4 digit ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T...

Page 381: ...it data and store the converted data in the device specified by d Operation error 1 Set 0s Error code SD0 Description 3401H Data in the device specified by s is out of the range 0 to 9999 BIN 9999 BCD 9999 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 s d 215 214 213 212 211 210 29 28 27 26 25 24 23 22 21 20 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 103 102 101 100 1 BCD ...

Page 382: ...BCD DBCDP Operand Description Range Data type Data type label s Binary data or the start device where the binary data is stored 0 to 99999999 32 bit signed binary ANY32 d Start device for storing the converted BCD data BCD 8 digit ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C ...

Page 383: ... 3401H Data in the device specified by s is out of the range 0 to 99999999 s d 0 BIN 99999999 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 BCD 99999999 1 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 4 8 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 107 106 105 104 103 102 101 100 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214...

Page 384: ...IN BINP Operand Description Range Data type Data type label s BCD data or the device where the BCD data is stored 0 to 9999 BCD 4 digit ANY16 d Device for storing the converted binary data 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD ...

Page 385: ...the valid range the BIN P instruction is not executed regardless of the status on off of SM754 The BIN P instruction does not execute the next operation until the command execution condition is turned off and on regardless of the presence of an error Error code SD0 Description 3401H A value other than 0 to 9 exists at any digit of the value in the device specified by s 1 ...

Page 386: ...ion DBIN DBINP Operand Description Range Data type Data type label s BCD data or the start device where the BCD data is stored 0 to 99999999 BCD 8 digit ANY32 d Start device for storing the converted binary data 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST ...

Page 387: ...truction does not execute the next operation until the command execution condition is turned off and on regardless of the presence of an error 1 Filled with 0s Error code SD0 Description 3401H A value other than 0 to 9 exists at any digit of the value in the device specified by s 1 s d 0 BIN 99999999 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1 0 BCD 99999999 1 0 1 1 0 0 1 1 0 0 1...

Page 388: ...struction Execution condition FLT2INT FLT2INTP Operand Description Range Data type Data type label s Single precision real number or the start device where the single precision real number is stored 32768 to 32767 Single precision real number ANYREAL_32 d Device for storing the converted binary data 16 bit signed binary ANY16_S EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand ...

Page 389: ...engineering tool refer to the following Page 49 Precautions The following program example converts when M0 turns on the single precision real number stored in D0 and D1 to 16 bit signed binary data and stores the converted data in D100 Operation error Error code SD0 Description 3401H The single precision real number in the device specified by s is out of the range 32768 to 32767 3402H An unusual n...

Page 390: ...D Instruction Execution condition FLT2UINT FLT2UINTP Operand Description Range Data type Data type label s Single precision real number or the start device where the single precision real number is stored 0 to 65535 Single precision real number ANYREAL_32 d Device for storing the converted binary data 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Oper...

Page 391: ...e engineering tool refer to the following Page 49 Precautions The following program example converts when M0 turns on the single precision real number stored in D0 and D1 to 16 bit unsigned binary data and stores the converted data in D100 Operation error Error code SD0 Description 3401H The single precision real number in the device specified by s is out of the range 0 to 65535 3402H An unusual n...

Page 392: ...on Execution condition FLT2DINT FLT2DINTP Operand Description Range Data type Data type label s Single precision real number or the start device where the single precision real number is stored 2147483648 to 2147483647 Single precision real number ANYREAL_32 d Start device for storing the converted binary data 32 bit signed binary ANY32_S EN Execution condition Bit BOOL ENO Execution result Bit BO...

Page 393: ... to the following Page 49 Precautions The following program example converts when M0 turns on the single precision real number stored in D0 and D1 to 32 bit signed binary data and stores the converted data in D100 and D101 Operation error Error code SD0 Description 3401H The single precision real number in the device specified by s is out of the range 2147483648 to 2147483647 3402H An unusual numb...

Page 394: ...truction Execution condition FLT2UDINT FLT2UDINTP Operand Description Range Data type Data type label s Single precision real number or the start device where the single precision real number is stored 0 to 4294967295 Single precision real number ANYREAL_32 d Start device for storing the converted binary data 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit B...

Page 395: ...efer to the following Page 49 Precautions The following program example converts when M0 turns on the single precision real number stored in D0 and D1 to 32 bit unsigned binary data and stores the converted data in D100 and D101 Operation error Error code SD0 Description 3401H The single precision real number in the device specified by s is out of the range 0 to 4294967295 3402H An unusual number ...

Page 396: ...struction Execution condition DBL2INT DBL2INTP Operand Description Range Data type Data type label s Double precision real number or the start device where the double precision real number is stored 32768 to 32767 Double precision real number ANYREAL_64 d Device for storing the converted binary data 16 bit signed binary ANY16_S EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand ...

Page 397: ...efer to the following Page 49 Precautions The following program example converts when M0 turns on the double precision real number stored in D0 to D3 to 16 bit signed binary data and stores the converted data in D100 Operation error Error code SD0 Description 3401H The double precision real number in the device specified by s is out of the range 32768 to 32767 3402H An unusual number is set to s T...

Page 398: ...D Instruction Execution condition DBL2UINT DBL2UINTP Operand Description Range Data type Data type label s Double precision real number or the start device where the double precision real number is stored 0 to 65535 Double precision real number ANYREAL_64 d Device for storing the converted binary data 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Oper...

Page 399: ... refer to the following Page 49 Precautions The following program example converts when M0 turns on the double precision real number stored in D0 to D3 to 16 bit unsigned binary data and stores the converted data in D100 Operation error Error code SD0 Description 3401H The double precision real number in the device specified by s is out of the range 0 to 65535 3402H An unusual number is set to s T...

Page 400: ...on Execution condition DBL2DINT DBL2DINTP Operand Description Range Data type Data type label s Double precision real number or the start device where the double precision real number is stored 2147483648 to 2147483647 Double precision real number ANYREAL_64 d Start device for storing the converted binary data 32 bit signed binary ANY32_S EN Execution condition Bit BOOL ENO Execution result Bit BO...

Page 401: ...Page 49 Precautions The following program example converts when M0 turns on the double precision real number stored in D0 to D3 to 32 bit signed binary data and stores the converted data in D100 and D101 Operation error Error code SD0 Description 3401H The double precision real number in the device specified by s is out of the range 2147483648 to 2147483647 3402H An unusual number is set to s The ...

Page 402: ...truction Execution condition DBL2UDINT DBL2UDINTP Operand Description Range Data type Data type label s Double precision real number or the start device where the double precision real number is stored 0 to 4294967295 Double precision real number ANYREAL_64 d Start device for storing the converted binary data 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit B...

Page 403: ...ing Page 49 Precautions The following program example converts when M0 turns on the double precision real number stored in D0 to D3 to 32 bit unsigned binary data and stores the converted data in D100 and D101 Operation error Error code SD0 Description 3401H The double precision real number in the device specified by s is out of the range 0 to 4294967295 3402H An unusual number is set to s The dou...

Page 404: ...ified by the instruction operand In programming using devices use of the INT2UINT P instruction is not required Ladder ST 1 ENO INT2UINT EN s d ENO INT2UINTP EN s d FBD LD Instruction Execution condition INT2UINT INT2UINTP Operand Description Range Data type Data type label s Binary data or the label where the binary data is stored 32768 to 32767 16 bit signed binary ANY16_S d Label for storing th...

Page 405: ... specified by the operand and therefore before the _U instruction is executed the INT2UINT instruction is used to convert wLabel0 of ANY16_S to uLabel1 of ANY16_U The value in wLabel0 is stored in uLabel1 as is Operation error There is no operation error bSwitchA Bit wLabel0 Word signed uLabel0 uLabel1 Word unsigned bit string 16 bits 1 The value is stored as is 2 The data type of the value is con...

Page 406: ...NTP EN s d FBD LD Instruction Execution condition INT2DINT INT2DINTP Operand Description Range Data type Data type label s Binary data or the device where the binary data is stored 32768 to 32767 16 bit signed binary ANY16_S d Start device for storing the converted binary data 32 bit signed binary ANY32_S EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word In...

Page 407: ...he following program example converts when M0 turns on the 16 bit signed binary data stored in D0 to 32 bit signed binary data and stores the converted data in D100 and D101 Operation error There is no operation error 1 The most significant bit of data before conversion is stored 2 Data before conversion is stored in the lower 16 bits 20480 b31 b16 20480 B000H B000H FFFFH D0 s D101 D100 d b15 b0 b...

Page 408: ...DINTP EN s d FBD LD Instruction Execution condition INT2UDINT INT2UDINTP Operand Description Range Data type Data type label s Binary data or the device where the binary data is stored 32768 to 32767 16 bit signed binary ANY16_S d Start device for storing the converted binary data 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double w...

Page 409: ...ce specified by d The following program example converts when M0 turns on the 16 bit signed binary data stored in D0 to 32 bit unsigned binary data and stores the converted data in D100 and D101 Operation error There is no operation error 1 The value 0 is stored 2 Data before conversion is stored in the lower 16 bits 24576 b31 b16 40960 A000H A000H 0000H D0 s D101 D100 d b15 b0 b15 b0 SM402 s d M0...

Page 410: ...ecified by the instruction operand In programming using devices use of the UINT2INT P instruction is not required Ladder ST 1 ENO UINT2INT EN s d ENO UINT2INTP EN s d FBD LD Instruction Execution condition UINT2INT UINT2INTP Operand Description Range Data type Data type label s Binary data or the label where the binary data is stored 0 to 65535 16 bit unsigned binary ANY16_U d Label for storing th...

Page 411: ..._S to be specified by the operand and therefore before the instruction is executed the UINT2INT instruction is used to convert uLabel0 of ANY16_U to wLabel1 of ANY16_S The value in uLabel0 is stored in wLabel1 as is Operation error There is no operation error bSwitchA Bit wLabel0 wLabel1 Word signed uLabel0 Word unsigned bit string 16 bits 1 The value is stored as is 2 The data type of the value i...

Page 412: ...T2DINTP EN s d FBD LD Instruction Execution condition UINT2DINT UINT2DINTP Operand Description Range Data type Data type label s Binary data or the device where the binary data is stored 0 to 65535 16 bit unsigned binary ANY16_U d Start device for storing the converted binary data 32 bit signed binary ANY32_S EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double wor...

Page 413: ...ce specified by d The following program example converts when M0 turns on the 16 bit unsigned binary data stored in D0 to 32 bit signed binary data and stores the converted data in D100 and D101 Operation error There is no operation error 1 The value 0 is stored 2 Data before conversion is stored in the lower 16 bits 53248 b31 b16 53248 D000H D000H 0000H D0 s D101 D100 d b15 b0 b15 b0 SM402 s d M0...

Page 414: ...T2UDINTP EN s d FBD LD Instruction Execution condition UINT2UDINT UINT2UDINTP Operand Description Range Data type Data type label s Binary data or the device where the binary data is stored 0 to 65535 16 bit unsigned binary ANY16_U d Start device for storing the converted binary data 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Doubl...

Page 415: ...ce specified by d The following program example converts when M0 turns on the 16 bit unsigned binary data stored in D0 to 32 bit unsigned binary data and stores the converted data in D100 and D101 Operation error There is no operation error 1 The value 0 is stored 2 Data before conversion is stored in the lower 16 bits 61440 b31 b16 61440 F000H F000H 0000H D0 s D101 D100 d b15 b0 b15 b0 SM402 s d ...

Page 416: ...NTP EN s d FBD LD Instruction Execution condition DINT2INT DINT2INTP Operand Description Range Data type Data type label s Binary data or the start device where the binary data is stored 32768 to 32767 32 bit signed binary ANY32_S d Device for storing the converted binary data 16 bit signed binary ANY16_S EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word In...

Page 417: ...ram example converts when M0 turns on the 32 bit signed binary data stored in D0 and D1 to 16 bit signed binary data and stores the converted data in D100 Operation error 1 Data before conversion is stored in the lower 16 bits Error code SD0 Description 3401H The 32 bit signed binary data in the device specified by s is out of the range 32768 to 32767 b31 b16 26506 9876H FFFFH D1 D0 d b15 b0 26506...

Page 418: ... EN s d FBD LD Instruction Execution condition DINT2UINT DINT2UINTP Operand Description Range Data type Data type label s Binary data or the start device where the binary data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S d Device for storing the converted binary data 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Dou...

Page 419: ...in the device specified by d The following program example converts when M0 turns on the 32 bit signed binary data stored in D0 and D1 to 16 bit unsigned binary data and stores the converted data in D100 Operation error There is no operation error 1 Data before conversion is stored in the lower 16 bits b31 b16 2023406815 4321H 8765H D1 D0 d b15 b0 17185 4321H D100 s b15 b0 SM402 s d M0 DMOVP H8765...

Page 420: ... the instruction operand In programming using devices use of the DINT2UDINT P instruction is not required Ladder ST 1 ENO DINT2UDINT EN s d ENO DINT2UDINTP EN s d FBD LD Instruction Execution condition DINT2UDINT DINT2UDINTP Operand Description Range Data type Data type label s Binary data or the label where the binary data is stored 2147483648 to 2147483647 32 bit signed binary ANY32_S d Label fo...

Page 421: ... therefore before the D _U instruction is executed the DINT2UDINT instruction is used to convert dLabel0 of ANY32_S to udLabel1 of ANY32_U The value in dLabel0 is stored in udLabel1 as is Operation error There is no operation error bSwitchA Bit dLabel0 Double word signed udLabel0 udLabel1 Double word unsigned bit string 32 bits 1 The value is stored as is 2 The data type of the value is converted ...

Page 422: ...INTP EN s d FBD LD Instruction Execution condition UDINT2INT UDINT2INTP Operand Description Range Data type Data type label s Binary data or the start device where the binary data is stored 0 to 4294967295 32 bit unsigned binary ANY32_U d Device for storing the converted binary data 16 bit signed binary ANY16_S EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double w...

Page 423: ...in the device specified by d The following program example converts when M0 turns on the 32 bit unsigned binary data stored in D0 and D1 to 16 bit signed binary data and stores the converted data in D100 Operation error There is no operation error 1 Data before conversion is stored in the lower 16 bits b31 b16 1450744508 9ABCH 5678H D1 D0 d b15 b0 25924 9ABCH D100 s b15 b0 SM402 s d M0 DMOVP H5678...

Page 424: ...2UINTP EN s d FBD LD Instruction Execution condition UDINT2UINT UDINT2UINTP Operand Description Range Data type Data type label s Binary data or the start device where the binary data is stored 0 to 4294967295 32 bit unsigned binary ANY32_U d Device for storing the converted binary data 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Do...

Page 425: ...n the device specified by d The following program example converts when M0 turns on the 32 bit unsigned binary data stored in D0 and D1 to 16 bit unsigned binary data and stores the converted data in D100 Operation error There is no operation error 1 Data before conversion is stored in the lower 16 bits b31 b16 1164413355 89ABH 4567H D1 D0 d b15 b0 35243 89ABH D100 s b15 b0 SM402 s d M0 DMOVP H456...

Page 426: ...d by the instruction operand In programming using devices use of the UDINT2DINT P instruction is not required Ladder ST 1 ENO UDINT2DINT EN s d ENO UDINT2DINTP EN s d FBD LD Instruction Execution condition UDINT2DINT UDINT2DINTP Operand Description Range Data type Data type label s Binary data or the label where the binary data is stored 0 to 4294967295 32 bit unsigned binary ANY32_U d Label for s...

Page 427: ...d and therefore before the D instruction is executed the UDINT2DINT instruction is used to convert udLabel0 of ANY32_U to dLabel1 of ANY32_S The value in udLabel0 is stored in dLabel1 as is Operation error There is no operation error bSwitchA Bit dLabel0 dLabel1 Double word signed udLabel0 Double word unsigned bit string 32 bits 1 The value is stored as is 2 The data type of the value is converted...

Page 428: ...n condition GRY GRY_U GRYP GRYP_U Operand Description Range Data type Data type label s GRY P Binary data or the device where the binary data is stored 0 to 32767 16 bit signed binary ANY16_S GRY P _U 0 to 65535 16 bit unsigned binary ANY16_U d GRY P Device for storing the converted Gray code data 16 bit signed binary ANY16_S GRY P _U 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ...

Page 429: ...C INSTRUCTIONS 6 6 Data Conversion Instructions 427 6 Operation error Error code SD0 Description 3401H When the GRY P instruction is used the value in the device specified by s is out of the range 0 to 32767 ...

Page 430: ...Range Data type Data type label s DGRY P Binary data or the start device where the binary data is stored 0 to 2147483647 32 bit signed binary ANY32_S DGRY P _U 0 to 4294967295 32 bit unsigned binary ANY32_U d DGRY P Start device for storing the converted Gray code data 32 bit signed binary ANY32_S DGRY P _U 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit BOO...

Page 431: ...in the device specified by d Operation error s 1 Upper 16 bits s Lower 16 bits Error code SD0 Description 3401H When the DGRY P instruction is used the value in the device specified by s is out of the range 0 to 2147483647 s BIN d 0 305419896 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 b31 b16 b0 b15 0 305419896 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 d 1 b3...

Page 432: ...ution condition GBIN GBIN_U GBINP GBINP_U Operand Description Range Data type Data type label s GBIN P Gray code data or the device where the Gray code data is stored 0 to 32767 16 bit signed binary ANY16_S GBIN P _U 0 to 65535 16 bit unsigned binary ANY16_U d GBIN P Device for storing the converted binary data 16 bit signed binary ANY16_S GBIN P _U 16 bit unsigned binary ANY16_U EN Execution cond...

Page 433: ...C INSTRUCTIONS 6 6 Data Conversion Instructions 431 6 Operation error Error code SD0 Description 3401H When the GBIN P instruction is used the value in the device specified by s is out of the range 0 to 32767 ...

Page 434: ...ription Range Data type Data type label s DGBIN P Gray code data or the start device where the Gray code data is stored 0 to 2147483647 32 bit signed binary ANY32_S DGBIN P _U 0 to 4294967295 32 bit unsigned binary ANY32_U d DGBIN P Start device for storing the converted binary data 32 bit signed binary ANY32_S DGBIN P _U 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution...

Page 435: ...in the device specified by d Operation error s 1 Upper 16 bits s Lower 16 bits Error code SD0 Description 3401H When the DGBIN P instruction is used the value in the device specified by s is out of the range 0 to 2147483647 d BIN 0 305419896 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1 0 0 0 b31 b16 b0 b15 0 305419896 0 0 1 1 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1 0 0 d 1 b31...

Page 436: ...NO BKBCD EN s n d ENO BKBCDP EN s n d FBD LD Instruction Execution condition BKBCD BKBCDP Operand Description Range Data type Data type label s Start device where the binary data is stored 16 bit signed binary ANY16 1 d Start device for storing the converted BCD data BCD 4 digit ANY16 1 n Number of variables 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution resu...

Page 437: ... the device specified by s is out of the range 0 to 9999 s s 1 s 2 s n 2 s n 1 d d 1 d 2 d n 2 d n 1 BCD 5555 BCD 4321 BCD 1545 BCD 5678 BCD 1234 BIN 1234 BIN 5678 BIN 1545 BIN 4321 BIN 5555 n n 0 0 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1...

Page 438: ...NO BKBIN EN s n d ENO BKBINP EN s n d FBD LD Instruction Execution condition BKBIN BKBINP Operand Description Range Data type Data type label s Start device where the BCD data is stored BCD 4 digit ANY16 1 d Start device for storing the converted binary data 16 bit signed binary ANY16 1 n Number of variables 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution resu...

Page 439: ...e device specified by s is out of the range 0 to 9999 s s 1 s 2 s n 2 s n 1 d d 1 d 2 d n 2 d n 1 BCD 5555 BCD 4321 BCD 1545 BCD 5678 BCD 1234 BIN 1234 BIN 5678 BIN 1545 BIN 4321 BIN 5555 n n 0 0 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 1 1 1 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 1 1 ...

Page 440: ...IN_U DABINP DABINP_U Operand Description Range Data type Data type label s ASCII data or the start device where the ASCII data is stored String ANYSTRING_SINGLE d DABIN P Device for storing the converted binary data 16 bit signed binary ANY16_S DABIN P _U 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification...

Page 441: ... ignored As sign data set 20H space when the ASCII data is positive and set 2DH when the data is negative If a value other than 20H and 2DH is set the data will be processed as positive data A value from 30H to 39H can be set in each place of ASCII code If a value 20H or 00H is set in each place of ASCII code the value will be processed as 30H Ex 25108 is set in s when the DABIN P instruction is u...

Page 442: ...e set in s Data of s to s 2 0 Positive value 1 digit in numeric part Set 00H in the upper byte of s The data of s 1 or later is ignored Positive value 2 digits in numeric part Negative value 1 digit in numeric part Set 00H in the lower byte of s 1 The data of the upper byte of s 1 or later is ignored Negative value 4 digits in numeric part Set 00H in the upper byte of s 2 Positive value 5 digits i...

Page 443: ...DABINP_U Operand Description Range Data type Data type label s ASCII data to be converted to binary data or the start device where the ASCII data is stored String ANYSTRING_SINGLE d DDABIN P Start device for storing the conversion result 32 bit signed binary ANY32_S DDABIN P _U 32 bit unsigned binary ANY32_U EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word...

Page 444: ... the data will be processed as positive data A value from 30H to 39H can be set in each place of ASCII code If a value 20H or 00H is set in each place of ASCII code the value will be processed as 30H Ex 1234543210 is set in s when the DDABIN P instruction is used Status of SM705 1 Setting method of s Reference OFF Set s with a fixed number of digits a sign 10 digits in the numeric part Page 442 Se...

Page 445: ...er byte of s The data of s 1 or later is ignored Positive value 2 digits in numeric part Negative value 1 digit in numeric part Set 00H in the lower byte of s 1 The data of the upper byte of s 1 or later is ignored Positive value 9 digits in numeric part Negative value 8 digits in numeric part Set 00H in the upper byte of s 4 s 5 is ignored Negative value 9 digits in numeric part Set 00H in the lo...

Page 446: ...0 Description 3401H Invalid data that cannot be converted are input in s to s 5 The ASCII code of the first character is other than 2DH 30H to 39H 20H and 00H 1 The ASCII code of the second character or later is other than 30H to 39H 20H and 00H When the DDABIN P instruction is used ASCII data is out of the range from 2147483648 to 2147483647 When the DDABIN P _U instruction is used ASCII data is ...

Page 447: ...N HABINP Operand Description Range Data type Data type label s ASCII data to be converted to binary data or the start device where the ASCII data is stored String ANYSTRING_SINGLE d Device for storing the conversion result 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX...

Page 448: ... of digits 4 digits The following table lists the setting method of s The ASCII data in the device specified by s to s 1 is within the range from 0000H to FFFFH The data of s 2 or later is ignored A value from 30H to 39H and 41H to 46H can be set in each place of ASCII code If a value 00H is set in each place of ASCII code the value will be processed as the end of the hexadecimal ASCII data Status...

Page 449: ...6 6 Data Conversion Instructions 447 6 Operation error Error code SD0 Description 3401H Invalid data that cannot be converted are input in s to s 1 A value in each place of ASCII code is other than 30H to 39H and 41H to 46H ...

Page 450: ...DHABINP Operand Description Range Data type Data type label s ASCII data to be converted to binary data or the start device where the ASCII data is stored String ANYSTRING_SINGLE d Start device for storing the conversion result 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B ...

Page 451: ...xadecimal ASCII data with 8 digits fixed in s to s 3 The ASCII data in the device specified by s to s 3 is within the range from 00000000H to FFFFFFFFH The data of s 4 or later is ignored A value from 30H to 39H and 41H to 46H can be set in each place of ASCII code Ex When 5CB807E1H is specified in s Status of SM705 1 Setting method of s Reference OFF Set s with a fixed number of digits 8 digits P...

Page 452: ...al ASCII data Operation error Value to be set in s Data of s to s 3 Value to be set in s Data of s to s 3 0H to FH Set 00H in the upper byte of s The data of s 1 or later is ignored 10H to FFH Set 00H in the lower byte of s 1 The data of the upper byte of s 1 or later is ignored 1000000H to FFFFFFFH Set 00H in the upper byte of s 3 The data of s 4 or later is ignored 10000000H to FFFFFFFFH The dat...

Page 453: ...D DABCDP Operand Description Range Data type Data type label s ASCII data to be converted to BCD data or the start device where the ASCII data is stored String ANYSTRING_SINGLE d Device for storing the conversion result BCD 4 digit ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C...

Page 454: ...SCII data in the device specified by s to s 1 is within the range from 0 to 9999 The data of s 2 or later is ignored A value from 30H to 39H can be set in each place of ASCII code If a value 20H or 00H is set in each place of ASCII code the value will be processed as 30H Ex When 8765 is specified in s Status of SM705 1 Setting method of s Reference OFF Set s with a fixed number of digits 4 digits ...

Page 455: ...f the decimal ASCII data Operation error Value to be set in s Data of s to s 1 Value to be set in s Data of s to s 1 0 to 9 Set 00H in the upper byte of s 0 The data of s 1 or later is ignored 10 to 99 Set 00H in the lower byte of s 1 The data of the upper byte of s 1 or later is ignored 100 to 999 Set 00H in the upper byte of s 1 The data of s 2 or later is ignored 1000 to 9999 The data of s 2 or...

Page 456: ...DDABCDP Operand Description Range Data type Data type label s ASCII data to be converted to BCD data or the start device where the ASCII data is stored String ANYSTRING_SINGLE d Start device for storing the conversion result BCD 8 digit ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T...

Page 457: ...SCII code If a value 20H or 00H is set in each place of ASCII code the value will be processed as 30H Ex When 87654321 is specified in s Status of SM705 1 Setting method of s Reference OFF Set s with a fixed number of digits 8 digits Page 455 Setting method of s for when SM705 Number of conversion digits selection is off ON Set s with a desired number of digits maximum 8 digits Page 456 Setting me...

Page 458: ... of s The data of s 1 or later is ignored 10 to 99 Set 00H in the lower byte of s 1 The data of the upper byte of s 1 or later is ignored 1000000 to 9999999 Set 00H in the upper byte of s 3 The data of s 4 or later is ignored 10000000 to 99999999 The data of s 4 or later is ignored ASCII 107 Ten millions place of ASCII code ASCII 106 Millions place of ASCII code ASCII 105 Hundred thousands place o...

Page 459: ...start device where the string data is stored String ANYSTRING_SINGLE d1 VAL P Start device for storing the number of binary digits after conversion 16 bit signed binary ANY16_S_ARRAY Number of elements 2 VAL P _U 16 bit unsigned binary ANY16_U_ARRAY Number of elements 2 d2 VAL P Device for storing the binary data after conversion 16 bit signed binary ANY16_S VAL P _U 16 bit unsigned binary ANY16_U...

Page 460: ...H can be set to indicate a positive numerical value or 2DH can be set to indicate a negative numerical value 2EH is set for the decimal point The total number of digits stored in the device specified by d1 includes all characters including signs and decimal points that represent a numerical value The number of digits in the decimal part to be stored in the device specified by d1 1 represents the d...

Page 461: ...umber of characters in the decimal part is not in the following range Total number of characters 3 number of characters in the decimal part When the VAL P instruction is used an ASCII code other than 20H and 2DH is set as a sign When the VAL P _U instruction is used an ASCII code other than 20H is set as a sign An ASCII code other than 30H to 39H and 2EH decimal point is set as a digit of individu...

Page 462: ...e start device where the string data is stored String ANYSTRING_SINGLE d1 DVAL P Start device for storing the number of binary digits after conversion 16 bit signed binary ANY16_S_ARRAY Number of elements 2 DVAL P _U 16 bit unsigned binary ANY16_U_ARRAY Number of elements 2 d2 DVAL P Start device for storing the converted binary data 32 bit signed binary ANY32_S DVAL P _U 32 bit unsigned binary AN...

Page 463: ...3456 For the sign 20H can be set to indicate a positive numerical value or 2DH can be set to indicate a negative numerical value 2EH is set for the decimal point The total number of digits stored in the device specified by d1 includes all characters including signs and decimal points that represent a numerical value The number of digits in the decimal part to be stored in the device specified by d...

Page 464: ...e decimal part of the character string is not between 0 and 10 The relationship between the total number of characters and the number of characters in the decimal part is not in the following range Total number of characters 3 number of characters in the decimal part When the DVAL P instruction is used an ASCII code other than 20H and 2DH is set as a sign When the DVAL P _U instruction is used an ...

Page 465: ...nstruction Execution condition ASC2INT ASC2INTP Operand Description Range Data type Data type label s Start device where the string data to be converted to binary data String ANYSTRING_SINGLE 1 d Start device for storing the converted binary data 16 bit signed binary ANY16 1 n Number of characters to be stored 0 to 16383 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution resu...

Page 466: ... the number of characters in n is 9 If the number of characters in the device specified by n is 0 no processing is performed The ASCII code that can be specified by s must be in the range from 30H to 39H or 41H to 46H Operation error ASCII ASCII code th digit 1 to 4 1st to 4th digit n Number of characters specified by n 1 0H is automatically stored Error code SD0 Description 3401H A character othe...

Page 467: ...l s1 Single precision real number data or the start device where the single precision real number data is stored 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Decimal part digit data 0 to 7 16 bit signed binary ANY16 d Start device for storing the BCD format data 16 bit signed binary ANY16_ARRAY Number of elements 5 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand...

Page 468: ...y rounding off the seventh digit is stored in d 1 and d 2 A value of 0 to 7 can be set for the number of decimal part digits in the device specified by s2 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3401H T...

Page 469: ...FBD LD Instruction Execution condition NEG NEGP Operand Description Range Data type Data type label d Device where the data subjected to two s complement is stored 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC...

Page 470: ...468 6 BASIC INSTRUCTIONS 6 6 Data Conversion Instructions Operation error There is no operation error ...

Page 471: ...NO DNEGP EN d FBD LD Instruction Execution condition DNEG DNEGP Operand Description Range Data type Data type label d Start device where the data subjected to two s complement is stored 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G...

Page 472: ...470 6 BASIC INSTRUCTIONS 6 6 Data Conversion Instructions Operation error There is no operation error ...

Page 473: ...pe Data type label s Decode data or the start number of the device where the decode data is stored Bit 16 bit signed binary ANY_ELEMENTARY d Device for storing the decoded data Bit Word ANY_ELEMENTARY n Effective bit length 1 to 8 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM...

Page 474: ...pecified by s in the device specified by d Specify a value 1 to 8 for n When n 0 no processing is performed and the values in the device specified by d remain unchanged A bit device is treated as 1 bit and a word device is treated as 16 bits Operation error Error code SD0 Description 3401H The value specified by n is out of the range 0 to 8 7 0 1 ON 0 0 0 0 0 0 1 1 0 6 5 4 3 2 1 0 n 3 d s 6 ...

Page 475: ...ta type Data type label s Device where the encode data is stored Bit Word ANY_ELEMENTARY d Start number of the device for storing the encoded data Bit 16 bit signed binary ANY_ELEMENTARY n Effective bit length 1 to 8 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY ...

Page 476: ...or n When n 0 no processing is performed and the values in the device specified by d remain unchanged A bit device is treated as 1 bit and a word device is treated as 16 bits When two or more bits are 1 the upper bit position is used for processing Operation error Error code SD0 Description 3401H The value specified by n is out of the range 0 to 8 The bits in the 2 n bit data in the device specifi...

Page 477: ...truction Execution condition SEG SEGP Operand Description Range Data type Data type label s Decode data or the device where the decode data is stored 32768 to 32767 16 bit signed binary ANY16 d Device for storing the decoded data 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F ...

Page 478: ...device The following is the truth table for the seven segment display 1 The upper 8 bits are filled with 0s 2 The seven segment display data are stored in the lower 8 bits s Seven segment display d Display data Hexadecimal Bit pattern b7 b6 b5 b4 b3 b2 b1 b0 0 0000 0 0 1 1 1 1 1 1 1 0001 0 0 0 0 0 1 1 0 2 0010 0 1 0 1 1 0 1 1 3 0011 0 1 0 0 1 1 1 1 4 0100 0 1 1 0 0 1 1 0 5 0101 0 1 1 0 1 1 0 1 6 0...

Page 479: ...6 BASIC INSTRUCTIONS 6 6 Data Conversion Instructions 477 6 Operation error There is no operation error ...

Page 480: ...ISP EN s n d FBD LD Instruction Execution condition DIS DISP Operand Description Range Data type Data type label s Device where the separation target data is stored 16 bit signed binary ANY16 d Start device for storing the separated data 16 bit signed binary ANY16 1 n Number of separation units 1 to 4 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operan...

Page 481: ...of data in the device specified by d The upper 12 bits of the n points of data in the device specified by d are filled with 0s Specify a value 1 to 4 for n When n 0 no processing is performed and the n points of data starting from the device specified by d remain unchanged Operation error 1 Data storage area 2 Filled with 0s Error code SD0 Description 3401H The value specified by n is out of the r...

Page 482: ...NIP EN s n d FBD LD Instruction Execution condition UNI UNIP Operand Description Range Data type Data type label s Start device where the combination target data is stored 16 bit signed binary ANY16 1 d Device for storing the combined data 16 bit signed binary ANY16 n Number of combination units 1 to 4 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Opera...

Page 483: ... by d The upper bits bits in the 4 n nibble s of data in the device specified by d are filled with 0s Specify a value 1 to 4 for n When n 0 no processing is performed and the data in the device specified by d remain unchanged Operation error 1 Ignored 2 Data to be connected Error code SD0 Description 3401H The value specified by n is out of the range 0 to 4 b3 b0 b7 b4 b11 b8 b15 b12 b0 b3 b4 b15 ...

Page 484: ...FBD LD Instruction Execution condition NDIS NDISP Operand Description Range Data type Data type label s1 Start device where the separation target data is stored 16 bit signed binary ANY16 1 d Start device for storing the separated data 16 bit signed binary ANY16 1 s2 Start device for storing the separation unit 16 bit signed binary ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit B...

Page 485: ... Do not overlap the device numbers that are specified by s1 s2 and d Operation error s2 to s2 6 Number of bits specified by s2 to s2 6 1 The value 0 indicates the end of setting 2 Ignored Error code SD0 Description 2821H The device ranges specified by s1 and s2 are overlapping The device ranges specified by s1 and d are overlapping The device ranges specified by s2 and d are overlapping 3401H Inva...

Page 486: ...BD LD Instruction Execution condition NUNI NUNIP Operand Description Range Data type Data type label s1 Start device where the combination target data is stored 16 bit signed binary ANY16 1 d Start device for storing the combined data 16 bit signed binary ANY16 1 s2 Start device for storing the combination unit 16 bit signed binary ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit B...

Page 487: ...not overlap the device numbers that are specified by s1 s2 and d Operation error s2 to s2 6 Number of bits specified by s2 to s2 6 1 The value 0 indicates the end of setting 2 Ignored Error code SD0 Description 2821H The device ranges specified by s1 and s2 are overlapping The device ranges specified by s1 and d are overlapping The device ranges specified by s2 and d are overlapping 3401H Invalid ...

Page 488: ...Execution condition WTOB WTOBP Operand Description Range Data type Data type label s Start device where the separation target data is stored 16 bit signed binary ANY16 1 d Start device for storing the separated data 16 bit signed binary ANY16 1 n Number of data bytes to be separated 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Wo...

Page 489: ... the byte data in D12 to D14 are stored in the lower 8 bits of D11 to D16 Even when the ranges of the device where the separation target data is stored and the device for storing the separated data overlap the processing is performed normally Operation error There is no operation error 1 Upper byte 2 Lower byte 3 Upper byte data 4 Lower byte data 1 The data FEH is ignored when n is 5 2 n 5 1 00H i...

Page 490: ...Instruction Execution condition BTOW BTOWP Operand Description Range Data type Data type label s Start device where the combination target data is stored 16 bit signed binary ANY16 1 d Start device for storing the combined data 16 bit signed binary ANY16 1 n Number of data bytes to be combined 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Ope...

Page 491: ...ring the combined data If n is 0 no processing is performed The upper 8 bits in the device specified by s and later are ignored and only the lower 8 bits are processed Even when the ranges of the device where the combination target data is stored and the device for storing the combined data overlap the processing is performed normally Ex When the lower 8 bits of D11 to D16 are stored in D12 to D14...

Page 492: ... MOV EN s d ENO MOVP EN s d FBD LD Instruction Execution condition MOV MOVP Operand Description Range Data type Data type label s Transfer source data or the number of the device where the transfer source data is stored 32768 to 32767 16 bit signed binary ANY16 d Transfer destination device number 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit ...

Page 493: ...device specified by d If s is a digit specified bit device the digit specified bits are targeted If data specified by s is less than 16 bits 0s are added and transferred Operation error There is no operation error 1 If data specified by s is less than 16 bits 0s are added and transferred d s b15 b15 b0 b0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 b7 b7 b8 1 ...

Page 494: ... EN s d FBD LD Instruction Execution condition DMOV DMOVP Operand Description Range Data type Data type label s Transfer source data or the number of the device where the transfer source data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Transfer destination device number 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Dou...

Page 495: ...e specified by d If s is a digit specified bit device the digit specified bits are targeted If data specified by s is less than 16 bits 0s are added and transferred Operation error There is no operation error 1 If data specified by s is less than 32 bits 0s are added and transferred 1 b27 b0 0 1 0 0 0 1 1 1 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 0 0 1 0 s d b27 b28 b31 b0 1 ...

Page 496: ... EN s d ENO CMLP EN s d FBD LD Instruction Execution condition CML CMLP Operand Description Range Data type Data type label s Inversion target data or the number of the device where the inversion target data is stored 32768 to 32767 16 bit signed binary ANY16 d Number of the device for storing the inverted data 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOO...

Page 497: ...e inverted data to the device specified by d If s is a digit specified bit device the digit specified bits are targeted If data specified by s is less than 16 bits 0s are added and inverted Operation error There is no operation error 1 If data specified by s is less than 16 bits 0s are added and inverted d s b15 b15 b0 b0 0 1 1 1 0 0 1 0 1 1 1 1 1 1 1 1 1 0 0 0 1 1 0 1 b7 b7 b8 1 ...

Page 498: ...d ENO DCMLP EN s d FBD LD Instruction Execution condition DCML DCMLP Operand Description Range Data type Data type label s Inversion target data or the number of the device where the inversion target data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Number of the device for storing the inverted data 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result ...

Page 499: ...erted data to the device specified by d If s is a digit specified bit device the digit specified bits are targeted If data specified by s is less than 16 bits 0s are added and inverted Operation error There is no operation error 1 If data specified by s is less than 32 bits 0s are added and inverted 1 b27 b0 1 0 0 0 1 1 1 0 0 0 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 1 1 0 1 s d b27 b28 b31 b0 1 ...

Page 500: ...truction Execution condition SMOV SMOVP Operand Description Range Data type Data type label s Device where the specified units of data is stored 16 bit signed binary ANY16 n1 1 Start position where the data to be shifted is stored 1 to 4 16 bit unsigned binary ANY16_U n2 1 Number of units to be shifted 1 to 4 16 bit unsigned binary ANY16_U d Device where the shifted data is stored 16 bit signed bi...

Page 501: ...R ZR RD U G J U3E H G Z LT LST LC LZ K H E s 1 n1 1 n2 1 d 1 n3 1 In the case of n1 4 n2 2 and n3 3 1 Conversion s is converted from binary to BCD data 2 Shifting Lower n2 digits starting from the n1 th digit are transferred combined to d starting from the n3 th digit In the case of this example the first and fourth digits of d are not affected even if data is transferred from s 3 Conversion The c...

Page 502: ...TRUCTIONS 6 7 Data Transfer Instructions Operation error Error code SD0 Description 3405H Any one of n1 n2 or n3 is other than 1 to 4 Either s or d is other than 0 to 9999 when SM773 is OFF n2 is greater than n1 or n3 ...

Page 503: ... FBD LD Instruction Execution condition CMLB CMLBP Operand Description Range Data type Data type label s Inversion target data or the number of the device where the inversion target data is stored Bit ANY_BOOL d Transfer destination device number Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM...

Page 504: ...502 6 BASIC INSTRUCTIONS 6 7 Data Transfer Instructions Operation error There is no operation error ...

Page 505: ...argument of option settings For the option settings refer to the following GX Works3 Operating Manual In safety programs executed by the Safety CPU only safety devices and safety labels of data types described in the table can be used Applicable devices Ladder ST ENO BMOV EN s n d ENO BMOVP EN s n d FBD LD Instruction Execution condition BMOV BMOVP Operand Description Range Data type Data type lab...

Page 506: ...t devices set the same number of digits for both devices To use the link direct device module access device or CPU buffer memory access device for s or d specify it only for one of the devices Note that the CPU buffer memory access device U3E0 G of the host CPU module in which index modification is not specified in the I O No specification can be specified by both s and d Operation error Operand B...

Page 507: ...xecuted by the Safety CPU only safety devices and safety labels of data types described in the table can be used Ladder ST ENO BMOVL EN s n d ENO BMOVLP EN s n d FBD LD Instruction Execution condition BMOVL BMOVLP Operand Description Range Data type Data type label s Start device where the transfer target data is stored 16 bit signed binary ANY16 1 d Transfer destination start device 16 bit signed...

Page 508: ...ce module access device or CPU buffer memory access device for s or d specify it only for one of the devices Note that the CPU buffer memory access device U3E0 G of the host CPU module in which index modification is not specified in the I O No specification can be specified by both s and d Operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J...

Page 509: ... s n d FBD LD Instruction Execution condition FMOV FMOVP Operand Description Range Data type Data type label s Transfer target data or the device where the transfer target data is stored 32768 to 32767 16 bit signed binary ANY16 d Transfer destination start device 16 bit signed binary ANY16 1 n Number of transfer data points 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL E...

Page 510: ...it specified bits in the word device is transferred Ex When K1X20 is specified in s the data is transferred to the lower 4 bits of the word device specified by d When both s and d are bit devices set the same number of digits for both devices Operation error There is no operation error 1 Ignored 2 Filled with 0s n 3456H 3456H 3456H 3456H 3456H 3456H b15 b0 s d d 1 d 2 d n 2 d n 1 b15 b0 s D100 b15...

Page 511: ...N s n d FBD LD Instruction Execution condition FMOVL FMOVLP Operand Description Range Data type Data type label s Transfer target data or the device where the transfer target data is stored 32768 to 32767 16 bit signed binary ANY16 d Transfer destination start device 16 bit signed binary ANY16 1 n Number of transfer data points 0 to 4294967295 32 bit unsigned binary ANY32 EN Execution condition Bi...

Page 512: ...it specified bits in the word device is transferred Ex When K1Y30 is specified in d the lower 4 bits of the word device specified by s are transferred When both s and d are bit devices set the same number of digits for both devices Operation error There is no operation error n 3456H 3456H 3456H 3456H 3456H 3456H b15 b0 s d d 1 d 2 d n 2 d n 1 b15 b0 s D100 b15 b2 b3 b4 b0 b1 0 1 1 1 d d 1 d 2 d 3 ...

Page 513: ...FBD LD Instruction Execution condition DFMOV DFMOVP Operand Description Range Data type Data type label s Transfer target data or the start device where the transfer target data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Transfer destination start device 32 bit signed binary ANY32 1 n Number of transfer data points 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition...

Page 514: ...digits are transferred When K5Y0 is specified in d the lower 20 bits five digits of the word device specified by s are transferred When the number of digits is specified for both data in the devices specified by s and d the data corresponding to the digits specified in d are transferred If n is 0 no processing is performed Operation error There is no operation error 1 Ignored 2 Data of 20 bits 5 d...

Page 515: ...FBD LD Instruction Execution condition DFMOVL DFMOVLP Operand Description Range Data type Data type label s Transfer target data or the start device where the transfer target data is stored 2147483648 to 2147483647 32 bit signed binary ANY32 d Transfer destination start device 32 bit signed binary ANY32 1 n Number of transfer data points 0 to 4294967295 32 bit unsigned binary ANY32 EN Execution co...

Page 516: ...digits are transferred When K5Y0 is specified in d the lower 20 bits five digits of the word device specified by s are transferred When the number of digits is specified for both data in the devices specified by s and d the data corresponding to the digits specified in d are transferred If n is 0 no processing is performed Operation error There is no operation error 1 Ignored 2 Data of 20 bits 5 d...

Page 517: ...ta type label d1 Device where the exchange target data is stored 16 bit signed binary ANY16 d2 Device where the exchange target data is stored 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E d1 d2 RnCPU...

Page 518: ...516 6 BASIC INSTRUCTIONS 6 7 Data Transfer Instructions Operation error There is no operation error ...

Page 519: ... label d1 Start device where the exchange target data is stored 32 bit signed binary ANY32 d2 Start device where the exchange target data is stored 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E d1 d2 ...

Page 520: ...518 6 BASIC INSTRUCTIONS 6 7 Data Transfer Instructions Operation error There is no operation error ...

Page 521: ...HP EN n d1 d2 FBD LD Instruction Execution condition BXCH BXCHP Operand Description Range Data type Data type label d1 Start device where the exchange target data is stored Word ANY16 1 d2 Start device where the exchange target data is stored Word ANY16 1 n Number of exchange data points 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand B...

Page 522: ... 1 d1 n 2 1 0 1 1 0 0 1 0 1 1 0 0 1 0 1 0 d1 n 1 0 1 0 0 1 1 0 1 0 0 1 1 0 1 0 1 n d1 b15 b8b7 b0 0 0 1 0 1 0 1 1 0 1 0 1 0 0 1 1 d1 1 1 1 0 0 0 0 1 1 1 0 1 0 0 0 1 1 d1 2 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 d1 n 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 d1 n 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 n d2 b15 b8b7 b0 0 0 0 1 0 1 1 1 0 0 0 0 1 1 1 1 d2 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 d2 2 0 0 0 0 0 0 0 0 1 1 1 1 1 1...

Page 523: ... EN d FBD LD Instruction Execution condition SWAP SWAPP Operand Description Range Data type Data type label d Start device for storing the data whose upper and lower 8 bit data is exchanged 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD...

Page 524: ... EN d ENO DSWAPP EN d FBD LD Instruction Execution condition DSWAP DSWAPP Operand Description Range Data type Data type label d Start device for storing the data whose upper and lower 8 bit data is exchanged 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D ...

Page 525: ...T ENO MOVB EN s d ENO MOVBP EN s d FBD LD Instruction Execution condition MOVB MOVBP Operand Description Range Data type Data type label s Number of the device where the transfer target data is stored Bit ANY_BOOL d Transfer destination device number Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M ...

Page 526: ...r Instructions Processing details These instructions transfer the bit data in the device specified by s to the device specified by d Operation error There is no operation error 0 1 1 1 d s Before transfer After transfer The bit is transferred ...

Page 527: ...OVBP EN s n d FBD LD Instruction Execution condition BLKMOVB BLKMOVBP Operand Description Range Data type Data type label s Transfer source block data Bit ANY_BOOL 1 d Transfer destination block data Bit ANY_BOOL 1 n Number of transfer data points 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specificatio...

Page 528: ... n points of bit data starting from the device specified by s to the n points of bits starting from the device specified by d Data can be transferred even when the transfer source device and destination device overlap Operation error There is no operation error 1 0 1 1 0 1 1 1 n n s n 1 s 2 s 1 s d n 1 d 2 d 1 d ...

Page 529: ...cution condition Setting data Description range data type Applicable devices Ladder ST 1 ENO RORP EN n d ENO RCR EN n d ENO RCRP EN n d FBD LD 1 Instruction Execution condition ROR RCR RORP RCRP Operand Description Range Data type Data type label d Rotation target device 16 bit signed binary ANY16 n Number of bits to be rotated 0 to 15 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL E...

Page 530: ...re rotated because 15 divided by 12 equals 1 with a remainder of 3 Specify any value between 0 and 15 for n If a value 16 or bigger is specified bits are rotated by the remainder value of n 16 For example when n is 18 2 bits are rotated because 18 divided by 16 equals 1 with a remainder of 2 b0 b7 b15 b8 b14 b13 b12 b11 b10 b9 b6 b5 b4 b3 b2 b1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 d b0 b7 b15 b8 b14 b1...

Page 531: ...y 12 equals 1 with a remainder of 3 Specify any value between 0 and 15 for n If a value 16 or bigger is specified bits are rotated by the remainder value of n 16 For example when n is 18 2 bits are rotated because 18 divided by 16 equals 1 with a remainder of 2 Operation error There is no operation error b0 b7 b15 b8 b14 b13 b12 b11 b10 b9 b6 b5 b4 b3 b2 b1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 b0 b7 b1...

Page 532: ... Description range data type Applicable devices Ladder ST 1 ENO ROLP EN n d ENO RCL EN n d ENO RCLP EN n d FBD LD 1 Instruction Execution condition ROL RCL ROLP RCLP Operand Description Range Data type Data type label d Rotation target device 16 bit signed binary ANY16 n Number of bits to be rotated 0 to 15 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL ...

Page 533: ...ted because 15 divided by 12 equals 1 with a remainder of 3 Specify any value between 0 and 15 for n If a value 16 or bigger is specified bits are rotated by the remainder value of n 16 For example when n is 18 2 bits are rotated to the left because 18 divided by 16 equals 1 with a remainder of 2 b0 b7 b15 b8 b14 b13 b12 b11 b10 b9 b6 b5 b4 b3 b2 b1 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 b0 b7 b15 b8 b14...

Page 534: ...als 1 with a remainder of 3 Specify any value between 0 and 15 for n If a value 16 or bigger is specified bits are rotated by the remainder value of n 16 For example when n is 18 2 bits are rotated to the left because 18 divided by 16 equals 1 with a remainder of 2 Operation error There is no operation error 0 d d d d b0 b7 b15 b8 b14 b13 b12 b11 b10 b9 b6 b5 b4 b3 b2 b1 0 0 1 0 0 1 0 0 0 0 0 0 0 ...

Page 535: ...ange data type Applicable devices Ladder ST 1 ENO DRORP EN n d ENO DRCR EN n d ENO DRCRP EN n d FBD LD 1 Instruction Execution condition DROR DRCR DRORP DRCRP Operand Description Range Data type Data type label d Start device where the rotation target data is stored 32 bit signed binary ANY32 n Number of bits to be rotated 0 to 31 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Ex...

Page 536: ...with a remainder of 2 DRCR P These instructions rotate the 32 bit binary data in the device specified by d to the right by n bit s including the carry flag SM700 The carry flag SM700 is on or off depending on the status prior to the execution of the DRCR P instruction When d is a bit device bits are rotated to the right within the device range specified by digit specification The number of bits ac...

Page 537: ...ge data type Applicable devices Ladder ST 1 ENO DROLP EN n d ENO DRCL EN n d ENO DRCLP EN n d FBD LD 1 Instruction Execution condition DROL DRCL DROLP DRCLP Operand Description Range Data type Data type label d Start device where the rotation target data is stored 32 bit signed binary ANY32 n Number of bits to be rotated 0 to 31 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Exec...

Page 538: ... with a remainder of 2 DRCL P These instructions rotate the 32 bit binary data in the device specified by d to the left by n bit s including the carry flag SM700 The carry flag SM700 is on or off depending on the status prior to the execution of the DRCL P instruction When d is a bit device bits are rotated to the left within the device range specified by digit specification The number of bits act...

Page 539: ... devices Processing details CJ This instruction executes the program specified by the pointer number within the same program file when the execution command is on When the execution command is off the program in the next step is executed Ladder ST Not supported FBD LD Not supported Instruction Execution condition CJ SCJ JMP Every scan Operand Description Range Data type Data type label P Pointer n...

Page 540: ...be shortened These instructions can specify and jump to the program with a smaller step number In this case consider a method to exit a loop so that the watchdog timer does not time out The value in the device skipped with these instructions remains unchanged A label P occupies one step Only the pointer numbers within the same program file can be specified If the program jumps to the pointer numbe...

Page 541: ...eration error Error code SD0 Description 3380H The pointer number specified by P is not set before the END instruction The pointer number specified by P is not used as a label in the same program The pointer number specified by P is a global pointer in another program ...

Page 542: ...ST Not supported FBD LD Not supported Instruction Execution condition GOEND Error code SD0 Description 3340H After execution of the FOR instruction the GOEND instruction is executed before the NEXT instruction 3381H After execution of the CALL P or ECALL P instruction the GOEND instruction is executed before the RET instruction 33A1H The GOEND instruction is executed before the IRET instruction in...

Page 543: ... are requested When the system is powered on or the CPU module is reset the system is in the state where the DI instruction has been executed For the operation of the DI Disabling interrupt programs instruction used with the DI Disabling interrupt programs with specified priority or lower instruction refer to the following Page 544 DI The DI Disabling interrupt programs instruction cannot be execu...

Page 544: ...ctor occurs between the DI and EI instructions the corresponding interrupt program will not be executed until the processing between the DI and EI instructions completes A Sequence program B Interrupt program When the EI instruction is executed in the interrupt program after the DI Disabling interrupt programs with specified priority or lower instruction was executed in the main routine program Wh...

Page 545: ...ep 52 If the EI and DI instructions are provided in the master control these instructions are executed regardless of the execution status of the MC instruction Operation error Error code SD0 Description 3362H More than 16 DI Disabling interrupt programs instructions and DI Disabling interrupt programs with specified priority or lower instructions are nested I10 50 53 55 X1C X5 Y10 Y30 IRET 1 ...

Page 546: ...er ST ENO DI_1 EN s FBD LD is replaced by DI_1 Instruction Execution condition DI Every scan Operand Description Range Data type Data type label s Interrupt disable priority 1 to 8 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J ...

Page 547: ...s specified by s or lower Interrupt priority setting I No Priority I50 5 I51 6 A Sequence program B Interrupt program 1 Interrupt disabled section for priority 6 to 8 Interrupt enabled section for priority 1 to 5 2 The interrupt program can be executed because its priority is 5 3 The interrupt program cannot be executed because its priority is 6 I50 I51 FEND DI K6 IRET IRET 1 2 3 A B B ...

Page 548: ... can be nested The priority of the interrupt pointer 1 can be set in parameter MELSEC iQ R CPU Module User s Manual Application 1 I0 to I15 I50 to I1023 The interrupt disabled priority currently set can be checked in SD758 If the DI Disabling interrupt programs with specified priority or lower instruction is executed in the interrupt program and the interrupt disabled priority is changed the value...

Page 549: ... priority or lower instruction A Scan execution type program 1 Interrupt enabled section for all priorities 2 Interrupt disabled section for priority 2 to 8 Interrupt enabled section for priority 1 3 The priority of the disabled interrupt remains unchanged because the interrupt with priority 2 or lower is already disabled When the DI Disabling interrupt programs with specified priority or lower in...

Page 550: ...sabled section for all priorities When the DI Disabling interrupt programs instruction and the DI Disabling interrupt programs with specified priority or lower instruction are executed in this order A Scan execution type program 1 Interrupt enabled section for all priorities 2 Interrupt disabled section for priority 1 to 8 Interrupt disabled section for all priorities Error code SD0 Description 33...

Page 551: ...ruction Execution condition IMASK Every scan Operand Description Range Data type Data type label s Interrupt mask data or the start device where the interrupt mask data is stored 16 bit signed binary ANY16_ARRAY Number of elements 16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W...

Page 552: ...ogram s 1 s s 2 s 3 s 4 s 5 s 6 s 7 s 8 s 9 s 10 s 11 s 12 s 13 s 14 s 15 b0 b7 b15 b8 b14 b13 b12 b11 b10 b9 b6 b5 b4 b3 b2 b1 I0 I7 I15 I8 I14 I13 I12 I11 I10 I9 I6 I5 I4 I3 I2 I1 I16 I23 I31 I24 I30 I29 I28 I27 I26 I25 I22 I21 I20 I19 I18 I17 I32 I39 I47 I40 I46 I45 I44 I43 I42 I41 I38 I37 I36 I35 I34 I33 I48 I55 I63 I56 I62 I61 I60 I59 I58 I57 I54 I53 I52 I51 I50 I49 I64 I71 I79 I72 I78 I77 I7...

Page 553: ... Instruction Execution condition SIMASK Every scan Operand Description Range Data type Data type label I Interrupt pointer number to be interrupt enabled or disabled I0 to I1023 Device name POINTER 1 s Execution status of the specified interrupt pointer 0 Disabled 1 Enabled 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indir...

Page 554: ...interrupt programs I32 to I43 is disabled The execution status of the interrupt pointers are stored in SD1400 to SD1463 The device I can be index modified Using the SIMASK instruction specifying the index modified device can enable or disable the execution of interrupt pointers I0 to I1023 Operation error When s is 1 The execution of the interrupt program is enabled When s is 0 The execution of th...

Page 555: ...adder ST Not supported FBD LD Not supported Instruction Execution condition IRET Every scan Error code SD0 Description 33A0H There is no pointer corresponding to the interrupt number 33A1H After an interrupt occurs the END FEND GOEND or STOP instruction is executed before the IRET instruction 33A2H The IRET instruction is executed before the interrupt program specified by the interrupt pointer I i...

Page 556: ... for t1 from step 0 to the WDT P instruction and t2 from the WDT P instruction to the END FEND instruction must not exceed the value set for the watchdog timer The instruction can be used twice or more in a single scan but it takes time to turn off the output when an error occurs Executing the instruction does not clear the scan time value stored in the special register For this reason the scan ti...

Page 557: ...epeat program Not supported FBD LD FOR NEXT Instruction Execution condition FOR NEXT Every scan Operand Description Range Data type Data type label n Number of FOR to NEXT instruction loops 1 to 32767 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW...

Page 558: ... the FOR to NEXT instruction loop use the EGP or EGF instruction Note however that no rising edge or falling edge instruction can be used on the operation output side The JMP instruction cannot be used to branch into the FOR to NEXT instruction loop from the outside To create an easy to understand program use a pair of instructions the FOR and NEXT instructions within a single program block Error ...

Page 559: ...cution condition BREAK BREAKP Operand Description Range Data type Data type label d Number of the device for storing the remaining number of loops 16 bit signed binary ANY16 P Branch destination pointer number at the time of forced termination of loop processing Device name POINTER EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Con...

Page 560: ...e BREAK P instruction is executed The BREAK P instruction can be used only within the FOR to NEXT instruction loop The BREAK P instruction is valid only for one level of nesting To forcibly terminate multiple levels of nesting execute as many BREAK P instructions as nesting levels Operation error If no BREAK instruction is executed the program performs loop processing as many times as specified by...

Page 561: ...ELSEC iQ R CPU Module User s Manual Application Ladder ST Not supported FBD LD Instruction Execution condition CALL CALLP Operand Description Range Data type Data type label P Start pointer number of subroutine program Device name POINTER s1 to s5 1 Device number to be passed to the subroutine program as an argument 2147483648 to 2147483647 Bit 16 bit signed binary 32 bit signed binary ANY EN Exec...

Page 562: ...argument of the CALL P instruction so that they do not overlap If they overlap normal operation cannot be performed If the timer or counter is specified as a device in the argument of the CALL P instruction only the current value is transmitted received A Main routine program B Subroutine program Before execution of the subroutine program bit data is transferred to FX and word data is transferred ...

Page 563: ...alues are replaced with the function device values 3 The value of D1 is not replaced with the function device value 4 Undefined values are stored M0 M0 P0 CALL P0 D0 K3 K100 FD0 FEND K100 D1 RET 1000 100 10 0 1000 100 1 33 FD0 FD0 FD0 FD0 1000 100 10 0 1000 100 10 0 1000 100 110 1000 100 110 33 D0 D1 D2 D3 D0 D1 D2 0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3 3 2 2 2 1 1 1 D0 D0 D0 D3 D3 D3 4 4 4 4 4 4 4...

Page 564: ...s are stored Error code SD0 Description 2820H The device specified in an argument from s1 to s5 cannot be secured for the data size 3360H More than 16 CALL P instructions are nested The 17th instruction is executed 3380H The subroutine program corresponding to the pointer specified by P does not exist 3381H After execution of the CALL P instruction the END FEND GOEND or STOP instruction is execute...

Page 565: ...instruction that called the subroutine program is executed Operation error Ladder ST Not supported FBD LD Not supported Instruction Execution condition RET Every scan A Main routine program B Subroutine program Error code SD0 Description 3381H After execution of the CALL P FCALL P ECALL P EFCALL P or XCALL instruction the END FEND GOEND or STOP instruction is executed before the RET instruction 33...

Page 566: ... used in a program executed in both systems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST Not supported FBD LD Instruction Execution condition FCALL FCALLP Operand Description Range Data type Data type label P Start pointer number of subroutine program Device name POINTER s1 s5 ...

Page 567: ...uction If the FCALL P instruction is not used in combination with the CALL P instruction non execution processing of the subroutine program is not performed even if the execution command is turned off and therefore the output status of each coil instruction is retained Operand Bit Word Double word Indirect specification Constant Others P X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J ...

Page 568: ...LL instruction Before execution of the subroutine program bit data is transferred to FX and word data is transferred to FD After execution of the subroutine program the contents of FY and FD are transferred to the corresponding devices Function devices FX and FY are processed in units of bits Function device FD is processed in units of 4 words The size of data to be processed varies depending on t...

Page 569: ...ce Data size FX FY Bit device 1 point When a bit specified word device is used 1 bit FD When the bit device digit is specified 3 4 words 4 Word device 4 words 1 M0 occupied The data is transferred to FX0 2 D0 to D3 occupied The data is transferred to FD1 3 D30 to D33 occupied The data is transferred to FD2 Error code SD0 Description 2820H The device specified in an argument from s1 to s5 cannot be...

Page 570: ...e User s Manual Application Ladder ST FILE File name Not supported FBD LD FILE File name Instruction Execution condition ECALL ECALLP Operand Description Range Data type Data type label File name Program file name to be called Unicode string ANYSTRING_DOUB LE P Start pointer number of subroutine program Device name POINTER s1 s5 1 Device number to be passed to the subroutine program as an argument...

Page 571: ...epending on the instruction used Ex Content of specified device The ECALL P instruction can use s1 to s5 Before execution of the subroutine program bit data is transferred to FX and word data is transferred to FD After execution of the subroutine program the contents of FY and FD are transferred to the corresponding devices Function devices FX and FY are processed in units of bits Function device ...

Page 572: ...are replaced with the function device values 3 The value of D1 is not replaced with the function device value 4 Undefined values are stored M0 P0 K100 K3 FD0 FEND M0 ABC ECALL P0 D0 MAIN ABC K100 D1 RET 1000 100 10 0 1000 100 1 33 FD0 FD0 FD0 FD0 1000 100 10 0 1000 100 10 0 1000 100 110 1000 100 110 33 D0 D1 D2 D3 D0 D1 D2 0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3 3 2 2 2 1 1 1 D0 D0 D0 D3 D3 D3 4 4 4...

Page 573: ...y the EFCALL P instruction Precautions An FBD LD program cannot be created as a subroutine program FBD LD does not support the execution of a subroutine program with an argument 1 The operation result of the subroutine program is stored 2 These values are replaced with the function device values 3 Undefined values are stored M0 P0 K100 K3 FD0 FEND M0 ABC ECALL P0 D0 MAIN ABC K100 D4 RET 1000 100 1...

Page 574: ...file name cannot be executed 2842H The type of the program with the file name specified by file name is not supported 3360H More than 16 ECALL P instructions are nested The 17th instruction is executed 3380H The subroutine program corresponding to the pointer specified by P does not exist 3381H After execution of the ECALL P instruction the END FEND GOEND or STOP instruction is executed before the...

Page 575: ...dby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST FILE File name Not supported FBD LD FILE File name Instruction Execution condition EFCALL EFCALLP Operand Description Range Data type Data type label File name Program file name subject to non execution processing Unicode string ANYSTRING_DOUB LE P Start pointer number of subroutine pr...

Page 576: ... regardless of on off of the condition contact Operand Bit Word Double word Indirect specification Constant Others P X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E File name P s1 s5 1 1 Non execution processing is performed when the command of the EFCALL P instruction changes from on to off Device used for operation Operation result device status High spee...

Page 577: ...tatus of each coil instruction is retained When the execution command is turned off non execution processing of the subroutine program is performed enabling the OUT instruction and PLS instruction including pulse conversion instructions to be forcibly turned off Ex When the EFCALL P instruction is used Ex When the EFCALL P instruction is not used 1 Forced off by the EFCALL instruction X0 P0 X1 Y10...

Page 578: ... Note that the 16 level nesting is the total of the CALL P FCALL P ECALL P EFCALL P and XCALL instructions Before execution of the subroutine program bit data is transferred to FX and word data is transferred to FD After execution of the subroutine program the contents of FY and FD are transferred to the corresponding devices Function devices FX and FY are processed in units of bits Function devic...

Page 579: ...The file specified by file name does not exist 2841H The file specified by file name cannot be executed 2842H The type of the program with the file name specified by file name is not supported 3360H More than 16 EFCALL P instructions are nested The 17th instruction is executed 3380H The subroutine program corresponding to the pointer specified by P does not exist 3381H After execution of the EFCAL...

Page 580: ...tion in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST Not supported FBD LD Instruction Execution condition XCALL Operand Description Range Data type Data type label P Start pointer number of subroutine program Device name POINTER s1 s5 1 Device number to be passed to the subroutine program as an argument 2147483648 to 2147...

Page 581: ...me way as when condition contacts are off Device used for operation Operation result device status High speed timer low speed timer Set to 0 High speed retentive timer low speed retentive timer counter Maintains the current status Device in OUT instruction Forcibly turned off Device in the SET RST SFT P or basic application instruction Maintains the current status PLS or pulse instruction P Perfor...

Page 582: ...ALL instructions can be nested Note that the 16 level nesting is the total of the CALL P FCALL P ECALL P EFCALL P and XCALL instructions Before execution of the subroutine program bit data is transferred to FX and word data is transferred to FD After execution of the subroutine program the contents of FY and FD are transferred to the corresponding devices Function devices FX and FY are processed i...

Page 583: ...s are replaced with the function device values 3 The value of D1 is not replaced with the function device value 4 Undefined values are stored M0 M0 P0 XCALL P0 D0 INC FD0 FEND K100 D1 RET 1000 100 10 0 1000 100 10 1 FD0 FD0 FD0 FD0 1000 100 10 0 1000 100 10 0 1000 100 110 1000 100 10 1 D0 D1 D2 D3 D0 D1 D2 0 D0 D1 D2 D3 D0 D1 D2 D3 D0 D1 D2 D3 3 2 2 2 1 1 D0 D0 D0 D3 D3 D3 4 4 4 4 4 4 4 4 Before t...

Page 584: ... XCALL instructions are nested The 17th instruction is executed 3380H The subroutine program corresponding to the pointer specified by P does not exist 3381H After execution of the XCALL instruction the END FEND GOEND or STOP instruction is executed before the RET instruction 3382H The RET instruction is executed before the XCALL instruction M0 M0 P0 XCALL P0 D0 K3 K100 FD0 FEND K100 D4 RET 1000 1...

Page 585: ...lement of the array label Applicable devices Ladder ST ENO FIFR EN s d ENO FIFRP EN s d FBD LD Instruction Execution condition FIFR FIFRP Operand Description Range Data type Data type label s Device for storing the data read from the table 16 bit signed binary ANY16 d Start device of table Word ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indir...

Page 586: ...e is moved forward one by one An interlock mechanism should be used to prevent the FIFR P instruction from being executed when the value stored in the device specified by d is 0 A number from 0 to 65535 is stored in the number of data d Operation error N Number of data 1 Filled with 0 Error code SD0 Description 3405H The FIFR P instruction is executed when the value in the device specified by d is...

Page 587: ...label Applicable devices Ladder ST ENO FPOP EN s d ENO FPOPP EN s d FBD LD Instruction Execution condition FPOP FPOPP Operand Description Range Data type Data type label s Device for storing the data read from the table 16 bit signed binary ANY16 d Start device of table Word ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Co...

Page 588: ...uction has been stored is cleared to 0 An interlock mechanism should be used to prevent the FPOP P instruction from being executed when the value stored in the device specified by d is 0 A number from 0 to 65535 is stored in the number of data d Operation error N Number of data 1 Filled with 0 Error code SD0 Description 3405H The FPOP P instruction is executed when the value in the device specifie...

Page 589: ...Ladder ST ENO FIFW EN s d ENO FIFWP EN s d FBD LD Instruction Execution condition FIFW FIFWP Operand Description Range Data type Data type label s Data to be written to the table or the device number where the write data is stored 16 bit signed binary ANY16 d Start device of table Word ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect speci...

Page 590: ...er When the FIFW P is executed for the first time the value in the device specified by d must be cleared A care must be taken for the data table range because data is stored sequentially in the device specified by d 1 and later A number from 0 to 65535 is stored in the number of data d Operation error N Number of data DTr Data table range managed by users Error code SD0 Description 3405H The FIFW ...

Page 591: ...ENO FINS EN s n d ENO FINSP EN s n d FBD LD Instruction Execution condition FINS FINSP Operand Description Range Data type Data type label s Device where the insertion data is stored 16 bit signed binary ANY16 d Start device of table Word ANY16 1 n Insertion position in the table 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word ...

Page 592: ...data table is moved down one by one A number from 0 to 65535 is stored in the number of data d Operation error N Number of data DTr Data table range managed by users When n 2 data is inserted to the device specified by d 2 Error code SD0 Description 3405H The FINS P instruction is executed when the value specified by n is 0 The FINS P instruction is executed when the value in the device specified ...

Page 593: ... n d ENO FDELP EN s n d FBD LD Instruction Execution condition FDEL FDELP Operand Description Range Data type Data type label s Device where the data to be deleted is stored 16 bit signed binary ANY16 d Start device of table Word ANY16 1 n Deletion position in the table 0 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double wor...

Page 594: ... and later in the data table is moved forward one by one A number from 0 to 65535 is stored in the number of data d Operation error N Number of data 1 When n 3 data in d 3 is deleted 2 Filled with 0 Error code SD0 Description 3405H The FDEL P instruction is executed when the value specified by n is 0 The FDEL P instruction is executed when the value in the device specified by d is 0 d 1 d 2 d 3 d ...

Page 595: ... terminated with an error an error code is stored in the completion status The following table lists the error codes stored in the completion status Item Description Capacity 1K to 512K words File name DEVSTORE fixed Error code Error definition and cause Action 8000H SM606 SD memory card forced disable instruction is on If SM606 is on turn it off to cancel the SD memory card forced disable status ...

Page 596: ...BD LD Instruction Execution condition S DEVLD SP DEVLD Operand Description Range Data type Data type label s Read offset of device data storage file specified in units of 16 bit words 0 to 524287 32 bit unsigned binary ANY32 d Device for storing the data that has been read Word ANY16 1 n Number of read points 1 to 65535 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution res...

Page 597: ... storage file and can be specified by word offsets incremented by 1 every 16 bits When the S P DEVLD instruction is used a device data storage file must be set up in advance Page 593 Setting method Use the SP DEVST instruction to write device data to the device data storage file Page 596 SP DEVST Operation error Error code SD0 Description 2840H The device data storage file is not set in parameter ...

Page 598: ...DEVST Operand Description Range Data type Data type label s1 Write offset of device data storage file specified in units of 16 bit words 0 to 524287 32 bit unsigned binary ANY32 s2 Start device to which data is to be written Word ANY16 1 n Number of write points 1 to 65535 16 bit unsigned binary ANY16 d d Completion device d 1 Error completion device Bit ANYBIT_ARRAY Number of elements 2 EN Execut...

Page 599: ...ce Page 593 Setting method Use the S P DEVLD instruction to read device data from the device data storage file to any specified device Page 594 S P DEVLD Precautions The value written to data memory is the one at execution of the SP DEVST instruction Execution of the SP DEVST instruction increases SD634 and SD635 The number of writes to the data memory of the CPU module is limited If the data memo...

Page 600: ...iption 2840H The device data storage file is not set in parameter 3405H The value specified by n is 0 3421H When the SP DEVST instruction is executed the write count of the day exceeds the value specified in SD771 When the SP DEVST instruction is executed a value out of the range 1 to 32767 is set in SD771 ...

Page 601: ...1 Drive specification 2 fixed 1 Word ANY16 d1 Start device where the control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 8 s2 Start device where the file name is stored Unicode string ANYSTRING_DOUBLE d2 Start device for storing the data that has been read Word ANY16 2 d3 Bit device that turns on upon completion of the processing In the case of an error completion ...

Page 602: ...xadecimal 16 bit data is specified Number of elements 1 to 65535 When hexadecimal 32 bit data is specified Number of elements 1 to 32767 When a string ASCII data is specified Number of elements 1 to 1023 When a floating point real number single precision real number is specified Number of elements 1 to 32767 When a floating point real number double precision real number is specified Number of elem...

Page 603: ...ing an extension in the file name omit the period as well The file name must be within 60 characters a period and extension excluded If 61 or more characters are used the extension is ignored and replaced with BIN or CSV 1 Up to 253 characters 2 Use or as a delimiter of the folder path and file 3 Can be omitted When omitted 1 is up to 252 characters Unicode string User Operand d2 Device Item Descr...

Page 604: ... d1 7 FFFFFFFFH Cannot be specified When Reading data after converted to CSV format is specified by d1 0 00000000H From the beginning of the file 00000001H to FFFFFFFEH From the specified row FFFFFFFFH From the position where the previous reading ends 00000000H to FFFFFFFFH User 6 Number of columns When Reading binary data is specified by d1 0 set 0 When Reading data after converted to CSV format ...

Page 605: ...t device d3 1 can be used as the error completion flag SM753 turns on while the SP FREAD instruction is being executed While SM753 is on the instruction cannot be executed If executed no processing is performed If an error is detected during the execution of the instruction Processing Complete d3 Error Completion d3 1 and SM753 do not turn on Specify data in d1 2 d1 4 d1 5 and d2 0 depending on th...

Page 606: ...ata 0 Word 1 Byte Cannot be specified 2 Unit of the data type specified by the execution completion type Number of elements 1 to 32767 Number of lines Double word 0130H String ASCII data 0 Word 1 Byte Cannot be specified 2 Unit of the data type specified by the execution completion type Number of elements 1 to 1023 Number of lines Number of elements 0140H Floating point real number single precisio...

Page 607: ...e processing completes successfully The following figure shows an example of reading binary data Ex Example of reading binary data 16 bit binary data 0000H K3 K1 K0 K0 K0 00H 11H 22H 33H 44H 55H 66H 77H 88H 99H K3 33H 22H 55H 44H 77H 66H d1 1 d1 0 d1 2 d1 4 d1 3 d1 6 d1 5 d1 7 d2 1 d2 0 d2 2 d2 3 AAH Number of columns Data type Total Execution completion type Completion status Max number of read t...

Page 608: ...her than above String containing alphabets and symbols 0 Filled with 0 since it cannot be converted 0110H Decimal 32 bit data 2147483648 to 1 2147483648 to 1 2147483648 to 4294967295 The value should be within the range of 2147483648 to 1 as signed 32 bit data and within the range of 2147483648 to 4294967295 as unsigned 32 bit data The same value is stored in the device 0 to 2147483647 0 to 214748...

Page 609: ...ial format Numeric values other than above 0 Filled with 0 since it cannot be converted 0141H Floating point real number double precision real number Values within the range of 21024 data 2 1022 0 2 1022 data 21024 As given on the left The value is converted in either decimal point or exponential format Numeric values other than above 0 Filled with 0 since it cannot be converted Execution completi...

Page 610: ...String in the 2nd column of the 2nd line D108 D109 String in the 3rd column of the 2nd line D110 to D113 String in the 1st column of the 3rd line D114 to D117 String in the 2nd column of the 3rd line D118 D119 String in the 3rd column of the 3rd line No PARTS CSV Name Value1 Value2 CR LF AA_0001 Prts_A 100 200 CR LF BB_0002 Prts_B 300 400 CR LF SP FREAD D10 K2 U0 PARTS D99 M0 1 2 3 Data to be load...

Page 611: ... not a numerical value the conversion data 0 is stored D103 Since Length is not a numerical value the conversion data 0 is stored D104 Since 1 is a numerical value it is converted to a binary value D105 Since 3 is a numerical value it is converted to a binary value D106 Since Temperature is not a numerical value the conversion data 0 is stored D107 Since 21 is a numerical value it is converted to ...

Page 612: ...e Main sub item is not a numerical value the conversion data 0 is stored D101 Since is not a numerical value the conversion data 0 is stored D102 Since Measured value is not a numerical value the conversion data 0 is stored D103 Since Excess is not a numerical value the conversion data 0 is stored D104 Since Length is not a numerical value the conversion data 0 is stored D105 Since Temperature is ...

Page 613: ...sition D16 Number of columns D17 Data type specification D99 Number of data actually read D100 Since Main sub item is not a numerical value the conversion data 0 is stored D101 Since is not a numerical value the conversion data 0 is stored D102 Since Length is not a numerical value the conversion data 0 is stored D103 Since 1 is a numerical value it is converted to a binary value D104 Since Temper...

Page 614: ...mber of data actually read D100 Since Main sub item is not a numerical value the conversion data 0 is stored D101 Since is not a numerical value the conversion data 0 is stored D102 Since Length is not a numerical value the conversion data 0 is stored D103 Since no element exists the conversion data 0 is added D104 Since Temperature is not a numerical value the conversion data 0 is stored D105 Sin...

Page 615: ...imal 16 bit data Number of columns specification 4H Data type specification Words File position 2H Read start device D0 Number of data actually read 6H 1 Starting row 2 Next starting position 3 Data in the device loaded data N Number of data K6 K5 K6 K7 K8 K9 K10 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 1 2 3 4 CR LF 5 6 8 CR LF 9 10 11 12 CR LF 13 14 15 16 CR LF 17 18 19 20 CR LF 1 2 3 N 7 C...

Page 616: ... Words File position FFFFFFFFH continuing from the position where the previous reading ends Read start device D7 Number of data actually read 5H 1 Starting row 2 Next starting position 3 Data in the device loaded data N Number of data 1 2 3 4 CR LF 5 6 7 8 CR LF 9 10 11 CR LF 13 14 15 16 CR LF K6 K5 K6 K7 K8 K9 K10 K5 K11 K12 K13 K14 K15 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 17 18 19 20 CR...

Page 617: ...n the device specified by d1 1 Note that an error code is not stored if the instruction results in an operation error For the error code stored in d1 1 refer to the following Page 593 Reading Writing data in the specified file Example When reading 100 elements each of which contains 100 characters from a CSV file 100 characters 2 NULL 100 elements 10200 bytes 5100 words Therefore set 5100 to d1 3 ...

Page 618: ... FBD LD Instruction Execution condition SP FWRITE Operand Description Range Data type Data type label U Dummy Device name ANY16 s1 Drive specification 2 fixed 1 Word ANY16 d1 Start device where the control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 8 s2 Start device where the file name is stored Unicode string ANYSTRING_DOUBLE s3 Start device where data is stored ...

Page 619: ...s stored upon completion of the instruction 0000H Completed successfully Other than 0000H Completed with an error error code System 2 Number of data actually written For the data in the device specified by s3 the number of data actually written is stored The data unit is determined by d1 7 Data type specification System 3 Not used 4 5 File position When Writing binary data is specified by d1 0 000...

Page 620: ...ber of data to be requested to write The processing unit and setting range depend on the value set in d1 0 When Writing binary data is specified by d1 0 When 16 bit binary data is specified In units of words 1 to 65535 When 32 bit binary data is specified In units of double words 1 to 32767 When Converting and writing data in CSV format is specified by d1 0 Number of elements When decimal signed 1...

Page 621: ... Converting and writing data in CSV format is specified by d1 0 00000000H to FFFFFFFEH From the beginning of the file FFFFFFFFH Added to the end of the file 00000000H to FFFFFFFFH User 6 Number of columns When Writing binary data is specified by d1 0 set 0 When Converting and writing data in CSV format is specified by d1 0 specify the number of columns to write 0 No column Regarded as one row Othe...

Page 622: ... d2 1 can be used as the error completion flag SM753 turns on while the SP FWRITE instruction is executed While SM753 is on the SP FWRITE instruction cannot be executed If executed no processing is performed Even if an error is detected during the execution of the instruction the bit devices d2 and d2 1 and SM753 do not turn on Specify data in s3 0 d1 4 d1 5 and d1 2 depending on the combination o...

Page 623: ...767 Head end 1 Double word 0120H Hexadecimal 16 bit data 0 Word 1 Byte Cannot be specified 2 Unit of the data type specified by the execution completion type Word 1 to 65535 Head end 1 Word 0121H Hexadecimal 32 bit data 0 Word 1 Byte Cannot be specified 2 Unit of the data type specified by the execution completion type Double word 1 to 32767 Head end 1 Double word 0130H String ASCII data 0 Word 1 ...

Page 624: ... is written and the processing completes successfully If the media runs out of free space during additional saving of data an error occurs In this case the data already added and saved successfully is held as is and as much remaining data as possible is added and saved before termination with an error In 16 bit binary data write mode when the number of request write data and file position are spec...

Page 625: ...ta is read as a single row data in a CSV format file Ex The number of columns is set to 0 when writing data after conversion to the CSV format When a value other than FFFFFFFFH is specified in d1 4 or d1 5 data is saved to the file after deleting the existing data in the file When a value other than FFFFFFFFH is specified in d1 4 or d1 5 data is added and saved to the end of the file 1 Specified i...

Page 626: ...CSV format 1 Specified in units of words 2 Same as the number of write data if case of normal completion 0100H D10 SP FWRITE D10 K2 U0 ABCDE D99 M0 D11 D12 D13 D14 D15 D16 D17 D99 D100 D101 D102 D103 D104 D105 D106 K0 K0 K0 K3 K0 K7 K0 K10 K20 K30 K40 K 50 K100 0 10 20 30 CR 40 50 CR 100 LF CR LF LF 2 1 Execution completion type Completion status Number of data written Data type Number of write ta...

Page 627: ...N Number of data Execution completion type Writing data after converted to CSV format Decimal signed 16 bit data Number of columns specification 3H Data type specification Words File position FFFFFFFFH added to the end of the file Write start device D7 Number of request write data 8H 1 Starting position 2 Data in the device write data N Number of data 1 2 3 4 CR LF 5 6 CR LF K6 K1 K2 K3 K4 K5 K6 K...

Page 628: ...acters in one element is 1999 If this maximum number is exceeded and 00H NULL is not stored characters of 2000th character and after are not written and the write processing shifts to the next element A maximum of 1023 elements can be written in a single instruction execution Data to be written to a file 1 Data to be written 2 File name 3 Control data Control data D10 Execution completion type Str...

Page 629: ...t real number double precision real number Values within the range of 21024 data 2 1022 0 2 1022 data 21024 A value 0 to 15 digits in the decimal part as given on the left is written in exponential format Values other than above 0 is written Data cannot be converted The number of rows excluding the last row is calculated Number of rows excluding the last row number of requested write data number o...

Page 630: ... operates as follows Operation error There is no operation error Ladder ST ENO LEDR EN FBD LD Instruction Execution condition LEDR When a self diagnostic error continuation error has occurred The ERROR LED on the front of the CPU module remains off The values in SM0 SM1 and SD0 are not reset automatically at this time Reset the values by the program When a battery error has occurred When the LEDR ...

Page 631: ... the start up of the system The instruction execution point can be identified by checking the detailed information 2 of the error code 1810H Operation error There is no operation error except the error error code 1810H which occurs by executing the PALERT P instruction Ladder ST ENO PALERT EN s ENO PALERTP EN s FBD LD Instruction Execution condition PALERT PALERTP Operand Description Range Data ty...

Page 632: ...ntified by checking the detailed information 2 of the error code 3070H If any problem occurs in an external device connected to the standby system the PABORT instruction prevents the systems to be switched by generating a stop error in the standby system Operation error There is no operation error except the error error code 3070H which occurs by executing the PABORT instruction Ladder ST ENO PABO...

Page 633: ... EQ NE GT LE LT GE 2 FBD LD is replaced by a combination of LDSTRING_ ANDSTRING_ or ORSTRING_ and EQ NE GT LE LT or GE 2 Instruction Execution condition LD AND OR Every scan Operand Description Range Data type Data type label s1 Comparison data or the start device where the comparison data is stored String ANYSTRING_SINGL E s2 Comparison data or the start device where the comparison data is stored...

Page 634: ...ter strings are compared the character string with a larger character code is greater Instruction symbol ladder FBD LD Result EQ Non continuity state ENO is off NE Continuity state ENO is on GT Continuity state ENO is on LE Non continuity state ENO is off LT Non continuity state ENO is off GE Continuity state ENO is on When different character strings are compared the relative size of a character ...

Page 635: ...ithout causing non continuity ENO OFF The following example shows the operation result when the last device number of the device area is D12287 1 The second character of s1 differs from that of s2 1 s2 and accordingly the operation result will be continuity ENO OFF 2 D12287 and later are outside the device area and accordingly character string data comparison is performed using data up to D12287 S...

Page 636: ...llowing the last character in the device specified by d Ladder ST Not supported Page 636 P when three operands are set FBD LD Not supported Page 636 P when three operands are set Instruction Execution condition P Operand Description Range Data type Data type label s Data to be concatenated or the start device containing the data String ANYSTRING_SINGL E d Start device where the data to be concaten...

Page 637: ...abel memory 2821H The device numbers for storing the strings in the devices specified by s and d are overlapping 3405H The number of characters in the string specified by s exceeds 16383 The number of characters in the string specified by d exceeds 16383 3406H The number of characters in the concatenated string s d exceeds 16383 The entire string after concatenate processing cannot be stored in th...

Page 638: ...ype label s1 Data to be concatenated or the start device containing the data String ANYSTRING_SINGL E s2 Data to be concatenated or the start device containing the data to be concatenated String ANYSTRING_SINGL E d Start device for storing the concatenated data String ANYSTRING_SINGL E EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification...

Page 639: ...evant device number After the device number specified by s2 and later there is no 00H before the relevant device number 2821H The device numbers for storing the strings in the devices specified by s2 and d are overlapping 3405H The number of characters in the string specified by s1 exceeds 16383 The number of characters in the string specified by s2 exceeds 16383 3406H The string stored in the dev...

Page 640: ... Instruction Execution condition MOV MOVP Operand Description Range Data type Data type label s Character string to be transferred maximum of 255 characters or the start device containing such character string String ANYSTRING_SINGL E d Start device for storing the transferred character string String ANYSTRING_SINGL E EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word D...

Page 641: ...ta remain the same 2 Data upper byte is not transferred 2 Data remain the same 3 00H is automatically stored in the upper byte Error code SD0 Description 2820H There is no NULL code 00H in the setting area specified by s and later in the device label memory 3405H The number of characters in the string specified by s exceeds 16383 3406H The entire string cannot be stored in the setting area specifi...

Page 642: ...ction Execution condition MOV_WS MOVP_WS Operand Description Range Data type Data type label s Unicode character string to be transferred maximum of 255 characters or the start device containing the Unicode character string Unicode string ANYSTRING_DOUB LE d Start device for storing the transferred Unicode character string Unicode string ANYSTRING_DOUB LE EN Execution condition Bit BOOL ENO Execut...

Page 643: ...haracter strings stored in the devices specified by D10 to D13 are transferred to the devices specified by D11 to D14 as shown below Operation error A Same as before transfer Error code SD0 Description 2820H There is no 0000H in the setting area specified by s and later in the device label memory 3405H The number of characters in the Unicode string specified by s exceeds 16383 3406H The entire Uni...

Page 644: ...A BINDA_U BINDAP BINDAP_U Operand Description Range Data type Data type label s BINDA P Binary data used for ASCII conversion 32768 to 32767 16 bit signed binary ANY16_S BINDA P _U 0 to 65535 16 bit unsigned binary ANY16_U d Start device for storing the conversion result String ANYSTRING_SINGL E EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect spe...

Page 645: ...A P instruction is executed with the numeric value 12 stored in s When SM705 is off the number of digits is fixed The first character is a sign and it is 2DH in the above example If s is 0 or positive the first character is 20H space The numeric part is right justified When the length of the numeric part is less than 5 digits the ASCII code 20H space is stored for the ASCII code of the upper digit...

Page 646: ...ASCII code 1 00H is stored in d 3 when SM701 Number of output characters selection is off When it is on the value in d 3 remains unchanged Value of s Data of d to d 2 Value of s Data of d to d 2 0 Positive value 1 digit in numeric part The upper byte of d is filled with 00H Data in d 1 and d 2 remains unchanged Positive value 2 digits in numeric part Negative value 1 digit in numeric part d 1 is f...

Page 647: ...cessively and the operation result for each execution is stored in the same device a part of the previous operation result may not be overwritten by the succeeding result and can remain in d To avoid this create a program to clear the entire data storage areas d 0 to d 2 before executing the BINDA P _U instruction Example Executing the BINDA P instruction when s is 12345 and then executing another...

Page 648: ...A_U DBINDAP DBINDAP_U Operand Description Range Data type Data type label s DBINDA P Binary data used for ASCII conversion 2147483648 to 2147483647 32 bit signed binary ANY32_S DBINDA P _U 0 to 4294967295 32 bit unsigned binary ANY32_U d Start device for storing the conversion result String ANYSTRING_SINGL E EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word...

Page 649: ... 123456 stored in s When SM705 is off the number of digits is fixed The first character is a sign and it is 2DH in the above example If s is 0 or positive the first character is 20H space The numeric part is right justified When the length of the numeric part is less than 10 digits the ASCII code 20H space is stored for the ASCII code of the upper digit s When SM705 is on data is left justified Wh...

Page 650: ...it 20H space is stored in ASCII 101 Ex When 12345678 signed is specified in s ASCII S Sign data of ASCII code 1 ASCII 109 Billions place of ASCII code 2 ASCII 108 Hundred millions place of ASCII code 3 ASCII 101 Tens place of ASCII code 4 ASCII 100 Ones place of ASCII code 1 00H is stored in the upper byte of d 5 only when SM701 Number of output characters selection is off and 20H space is stored ...

Page 651: ... Negative value 1 digit in numeric part d 1 is filled with 00H d 2 and later remain unchanged Positive value 9 digits in numeric part Negative value 8 digits in numeric part The upper byte of d 4 is filled with 00H d 5 and later remain unchanged Positive value 10 digits in numeric part Negative value 9 digits in numeric part d 5 is filled with 00H Negative value 10 digits in numeric part 00H is st...

Page 652: ...then executing another DBINDA P instruction when s is 987654 1 1234567890 is converted into a string 2 987654 is converted into a string 3 A part of the previous conversion result remains in d 4 and d 5 4 1234567890 is converted into a string 5 d 0 to d 5 are cleared 6 987654 is converted into a string b31 b16 1234567890 s 1 b15 b0 31H 1 2DH d 0 33H 3 32H 2 d 1 35H 5 34H 4 d 2 37H 7 36H 6 39H 9 38...

Page 653: ...ution condition BINHA BINHAP Operand Description Range Data type Data type label s Binary data used for ASCII conversion 32768 to 32767 16 bit signed binary ANY16 d Start device for storing the conversion result String ANYSTRING_SINGL E EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C ...

Page 654: ...llowing figure shows the operation when SM705 Number of conversion digits selection is off and on Ex When the BINHA P instruction is executed with the 16 bit binary data 0ABCH stored in s When SM705 is off the number of digits is fixed Four digits of 0ABC are converted into ASCII data and stored When SM705 is on data is left justified 0ABC with the leading 0 omitted ABC are converted into ASCII da...

Page 655: ...ection If the end of the string is the lower byte 00H is also stored in the upper byte When the number of digits is equal to the maximum number of digits 4 digits 00H is stored in d 2 when SM701 is off d 2 remains unchanged if SM701 is on Operation error There is no operation error ASCII ASCII code th digit 1 00H is stored in d 2 when SM701 Number of output characters selection is off When it is o...

Page 656: ...program to clear the entire data storage areas d 0 and d 1 before executing the BINHA P instruction Example Executing the BINHA P instruction when s is 2A6F and then executing another BINHA P instruction when s is 9 1 2A6F is converted into a string 2 9 is converted into a string 3 A part of the previous conversion result remains in d 1 4 2A6F is converted into a string 5 d 0 to d 1 are cleared 6 ...

Page 657: ...n condition DBINHA DBINHAP Operand Description Range Data type Data type label s Binary data used for ASCII conversion 2147483648 to 2147483647 32 bit signed binary ANY32 d Start device for storing the conversion result String ANYSTRING_SINGL E EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J...

Page 658: ...ber of conversion digits selection is off and on Ex When the DBINHA P instruction is executed with a 32 bit binary data 000ABCDEH stored in s When SM705 is off the number of digits is fixed Eight digits of 000ABCDE are converted into ASCII data and stored When SM705 is on data is left justified The effective digits 000ABCDE with the leading 0 s omitted ABCDE are converted into ASCII data and store...

Page 659: ...of digits 8 digits 00H is stored in d 4 when SM701 Number of output characters selection is off d 4 does not change if SM701 Number of output characters selection is on ASCII ASCII code th digit 1 00H is stored in d 4 when SM701 Number of output characters selection is off When it is on the value in d 3 remains unchanged Value of s Data of d to d 3 Value of s Data of d to d 3 0H to FH The upper by...

Page 660: ...truction Example Executing the DBINHA P instruction when s is 13AC625E and then executing another DBINHA P instruction when s is F9E8D 1 13AC625E is converted into a string 2 F9E8D is converted into a string 3 A part of the previous conversion result remains in d 3 4 13AC625E is converted into a string 5 d 0 to d 3 are cleared 6 F9E8D is converted into a string b31 b16 13AC625E s 1 b15 b0 33H 3 31...

Page 661: ...tart device where the number of digits of the conversion target data is stored 16 bit signed binary ANY16_S_ARRAY Number of elements 2 STR P _U 16 bit unsigned binary ANY16_U_ARRAY Number of elements 2 s2 STR P Conversion target data 32768 to 32767 16 bit signed binary ANY16_S STR P _U 0 to 65535 16 bit unsigned binary ANY16_U d Start device for storing the converted character string String ANYSTR...

Page 662: ...is 0 to 5 Note that the number of digits in the decimal part must be smaller than the total number of digits minus 3 s1 1 b15 b8 b7 b0 00H d 4 d 3 d 2 d 1 d s2 s1 Total number of digits Number of digits in the decimal part ASCII code total number of digits 1 th digit A null character 00H is automatically stored at the end of string ASCII code total number of digits 3 th digit ASCII code total numb...

Page 663: ...umeric value If the number of digits of the 16 bit binary data is greater an error occurs The value 00H is automatically stored at the end of the converted character string Error code SD0 Description 3401H Invalid data that cannot be converted is input to s1 The specified total number of digits is out of the range 2 to 8 The specified number of digits in the decimal part is out of the range 0 to 5...

Page 664: ...device where the number of digits of the conversion target data is stored 16 bit signed binary ANY16_S_ARRAY Number of elements 2 DSTR P _U 16 bit unsigned binary ANY16_U_ARRAY Number of elements 2 s2 DSTR P Conversion target data 2147483648 to 2147483647 16 bit signed binary ANY32_S DSTR P _U 0 to 4294967295 16 bit unsigned binary ANY32_U d Start device for storing the converted character string ...

Page 665: ... b0 b31 b16 b15 s2 1 s2 Total number of digits Number of digits in the decimal part A null character 00H is automatically stored at the end of string Sign Upper 16 bits Lower 16 bits ASCII code total number of digits 1 th digit ASCII code total number of digits 3 th digit ASCII code total number of digits 5 th digit ASCII code total number of digits 7 th digit ASCII code sign data ASCII code total...

Page 666: ...f digits of the 32 bit binary data is greater an error occurs The value 00H is automatically stored at the end of the converted character string Error code SD0 Description 3401H Invalid data that cannot be converted is input to s1 The specified total number of digits is out of the range 2 to 13 The specified number of digits in the decimal part is out of the range 0 to 10 The relationship between ...

Page 667: ...cution condition BCDDA BCDDAP Operand Description Range Data type Data type label s BCD data used for ASCII conversion 0 to 9999 BCD 4 digit ANY16 d Start device for storing the conversion result String ANYSTRING_SINGL E EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R Z...

Page 668: ...igure shows the operation when SM705 Number of conversion digits selection is off and on Ex When the BCDDA P instruction is executed with BCD 4 digit data 0123 stored in s When SM705 is off the number of digits is fixed The leading 0 of 0123 is converted into 20H space and stored When SM705 is on data is left justified 0123 with the leading 0 omitted 123 is converted into ASCII data and stored and...

Page 669: ...r of digits 4 digits 00H is stored in d 2 when SM701 is off d 2 remains unchanged if SM701 is on ASCII 103 Thousands place of ASCII code ASCII 102 Hundreds place of ASCII code ASCII 101 Tens place of ASCII code ASCII 100 Ones place of ASCII code 1 00H is stored in d 2 when SM701 Number of output characters selection is off When it is on the value in d 3 remains unchanged Value of s Data of d to d ...

Page 670: ...ruction Error code SD0 Description 3401H Data in the device specified by s is out of the range 0 to 9999 Example Executing the BCDDA P instruction when s is 9105H and then executing another BCDDA P instruction when s is 0007H 1 9105 is converted into a string 2 7 is converted into a string 3 A part of the previous conversion result remains in d 1 4 9105 is converted into a string 5 d 0 to d 1 are ...

Page 671: ...ution condition DBCDDA DBCDDAP Operand Description Range Data type Data type label s BCD data used for ASCII conversion 0 to 99999999 BCD 8 digit ANY32 d Start device for storing the conversion result String ANYSTRING_SINGLE EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD...

Page 672: ... of conversion digits selection is off and on Ex When the DBCDDA P instruction is executed with BCD 8 digit data 00012345 stored in s When SM705 is off the number of digits is fixed Each of the leading 0 s of 00012345 is converted into 20H space and stored When SM705 is on data is left justified 00012345 with the leading 0 s omitted 12345 is converted into ASCII data and stored and 00H is stored i...

Page 673: ...is specified in s ASCII 107 Ten millions place of ASCII code ASCII 106 Millions place of ASCII code ASCII 101 Tens place of ASCII code ASCII 100 Ones place of ASCII code 1 00H is stored in d 4 when SM701 Number of output characters selection is off When it is on the value in d 3 remains unchanged b15 s 1 s b31 b28 b24 b27 b16 b19 b23 b20 b12 b0 b3 b7 b4 b8 b11 d 1 d 2 d 3 d b15 b0 b7 b8 ASCII 107 ...

Page 674: ...oes not change if SM701 Number of output characters selection is on Value of s Data of d to d 3 Value of s Data of d to d 3 0H to 9H The upper byte of d is filled with 00H d 1 and later remain unchanged 10H to 99H d 1 is filled with 00H d 2 and later remain unchanged 1000000H to 9999999H The upper byte of d 3 is filled with 00H 10000000H to 99999999H 1 d 4 is filled with 00H when SM701 Number of o...

Page 675: ... and then executing another DBCDDA P instruction when s is 00001234H 1 91234056 is converted into a string 2 1234 is converted into a string 3 A part of the previous conversion result remains in d 3 4 91234056 is converted into a string 5 d 0 to d 3 are cleared 6 1234 is converted into a string b31 b28 9 1 b27 b24 1 b23 b20 2 s 1 s b19 b16 3 31H 1 39H 9 d 0 33H 3 32H 2 d 1 30H 0 34H 4 d 2 36H 6 35...

Page 676: ... precision real number data to be converted or the start device containing the data 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Start device containing the display specification of the real number to be converted 16 bit signed binary ANY16_ARRAY Number of elements 3 d Start device for storing the converted character string String ANYSTRING_SINGLE EN Execution condition Bit BOOL ENO ...

Page 677: ...hown below As sign data 20H space is stored if the single precision real number data is positive and 2DH is stored if the data is negative If the decimal part of the single precision real number data is not stored within the range of the number of digits in the decimal part the lower decimal digits are rounded off 1 Total number of digits 2 Number of digits in the decimal part 3 Rounded off If the...

Page 678: ...e decimal part 3 Filled with 20Hs spaces The value 00H is automatically stored at the end of the converted character string As sign data in the integral part 20H space is stored if the single precision real number data is positive and 2DH is stored if the data is negative The integral part is fixed to one digit 20H space is stored between the integral part and sign 1 Total number of digits 2 Fixed...

Page 679: ...cally stored at the position of the specified number of digits in the decimal part plus 1 If the number of digits in the decimal part is 0 2EH is not stored 1 Total number of digits 2 Number of digits in the decimal part 3 Automatically added As sign data in the exponent part 2BH is stored if the exponent is positive and 2DH is stored if it is negative The exponent part is fixed to two digits When...

Page 680: ...number of digits in the decimal point 2 In the exponential format the total number of digits specified by s2 1 is outside the following range The number of digits in the decimal part is 0 Total number of digits 6 The number of digits in the decimal part is not 0 Total number of digits number of digits in the decimal part 7 In the exponential point format the decimal part digit specification in the...

Page 681: ...NT2ASCP EN s n d FBD LD Instruction Execution condition INT2ASC INT2ASCP Operand Description Range Data type Data type label s Start device containing the binary data to be exchanged to a character string 16 bit signed binary ANY16 1 d Start device for storing the converted character string String ANYSTRING_SINGLE n Number of characters to be stored 0 to 16383 16 bit unsigned binary ANY16 EN Execu...

Page 682: ...s for storing the converted character string data If the number of characters in the device specified by n is 0 no processing is performed Operation error 1 00H is automatically stored Error code SD0 Description 3405H An out of range value is set to n The specified number of characters is not between 0 and 16383 d d 1 d 2 d 3 b15 b0 b7 b8 s s 1 b15 b12 b8 b11 b7 b4 b0 b3 BIN16 ASCII code 1st digit...

Page 683: ...xecution condition WS2SJIS WS2SJISP Operand Description Range Data type Data type label s Start device containing the character string to be converted Unicode string ANYSTRING_DOUBLE d Start device for storing the converted character string String ANYSTRING_SINGLE EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M...

Page 684: ...cter such as a kanji character represented in shift JIS code should be counted 2 Error code SD0 Description 2821H The ranges of data in the devices specified by s and d are overlapping 3401H Byte order mark FEFFH big endian is added to the character string in the device specified by s The range of data in the device specified by s includes a character code that cannot be converted 3405H The charac...

Page 685: ...nstruction Execution condition SJIS2WS SJIS2WSP Operand Description Range Data type Data type label s Start device containing the character string to be converted String ANYSTRING_SINGLE d Start device for storing the converted character string Unicode string ANYSTRING_DOUBLE EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant ...

Page 686: ...order mark use the SJIS2WSB P instruction Page 685 SJIS2WSB P The following figure shows the operation for converting shift JIS to Unicode Operation error 1 A two byte character such as a kanji character represented in shift JIS code should be counted 2 Error code SD0 Description 2821H The ranges of data in the devices specified by s and d are overlapping 3401H The range of data in the device spec...

Page 687: ...S2WSBP EN s d FBD LD Instruction Execution condition SJIS2WSB SJIS2WSBP Operand Description Range Data type Data type label s Start device containing the character string to be converted String ANYSTRING_SINGLE d Start device for storing the converted character string Unicode string ANYSTRING_DOUBLE EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect...

Page 688: ... the operation for converting shift JIS to Unicode Operation error 1 A two byte character such as a kanji character represented in shift JIS code should be counted 2 Error code SD0 Description 2821H The ranges of data in the devices specified by s and d are overlapping 3401H The range of data in the device specified by s includes a character code that cannot be converted 3405H The character string...

Page 689: ...xecution condition LEN LENP Operand Description Range Data type Data type label s Character string or the start device containing the character string String ANYSTRING_SINGLE d Number of the device for storing the length of the detected character string 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Const...

Page 690: ...in the device specified by s and later Operation error Error code SD0 Description 2820H There is no NULL code 00H in each setting area in the device label memory in the device specified by s and later 3405H The number of characters of the character string in the device specified by s exceeds 16383 00H b15 b0 b7 b8 b15 b0 d s s 1 s 2 1st character 2nd character 3rd character 4th character 5th chara...

Page 691: ...d Description Range Data type Data type label s Character string or the start device containing the character string String ANYSTRING_SINGLE d Start device for storing n characters of character string extracted from the right of the data in the device specified by s String ANYSTRING_SINGLE n Number of characters to be extracted 1 to 16383 16 bit unsigned binary ANY16 EN Execution condition Bit BOO...

Page 692: ...r of characters of the character string in the device specified by s exceeds 16383 The number of characters of the character string in the device specified by s is 0 The number of characters in the device specify by n exceeds that in the device specified by s 00H 00H b15 b0 b7 b8 b15 b0 b7 b8 s s 1 d d 1 ASCII code 1st character ASCII code 2nd character ASCII code 3rd character ASCII code 4th char...

Page 693: ...xecution condition LEFT LEFTP Operand Description Range Data type Data type label s Character string or the start device containing the character string String ANYSTRING_SINGLE d Start device for storing n characters of character string extracted from the left of the data in the device specified by s String ANYSTRING_SINGLE n Number of characters to be extracted 1 to 16383 16 bit unsigned binary A...

Page 694: ...ter 3405H An out of range value is set to s The number of characters of the character string in the device specified by s exceeds 16383 The number of characters of the character string in the device specified by s is 0 The number of characters in the device specify by n exceeds that in the device specified by s 00H 00H b15 b0 b7 b8 b15 b0 b7 b8 s s 1 d d 1 ASCII code 1st character ASCII code 2nd c...

Page 695: ... the start device containing the character string String ANYSTRING_SINGLE d Start device for storing the character string data of the operation result String ANYSTRING_SINGLE s2 Start device for storing the location of the start character and the number of characters s2 Location of start character s2 1 Number of characters 16 bit signed binary ANY16_ARRAY Number of elements 2 EN Execution conditio...

Page 696: ...ed by s2 5th character Error code SD0 Description 2820H There is no NULL code 00H in each setting area in the device label memory in the device specified by s1 and later 3405H The number of characters of the character string in the device specified by s1 exceeds 16383 An out of range value is set to s2 The value in the device specified by s2 is 0 or less The value in the device specified by s2 1 i...

Page 697: ...e containing the character string String ANYSTRING_SINGLE d Start device for storing the character string data of the operation result String ANYSTRING_SINGLE s2 Start device for storing the location of the start character and the number of characters s2 Location of start character s2 1 Number of characters 16 bit signed binary ANY16_ARRAY Number of elements 2 EN Execution condition Bit BOOL ENO E...

Page 698: ...cter 30H 0 31H 1 32H 2 33H 3 34H 4 35H 5 36H 6 37H 7 38H 8 00H b15 b0 b7 b8 s1 s1 1 s1 2 s1 3 s1 4 012345678 ABCDEFGHI AB012345I 41H A 42H B 43H C 44H D 45H E 46H F 47H G 48H H 49H I 00H b15 b0 b7 b8 d d 1 d 2 d 3 d 4 41H A 42H B 30H 0 31H 1 32H 2 33H 3 34H 4 35H 5 49H I 00H b15 b0 b7 b8 d d 1 d 2 d 3 d 4 s2 s2 1 3 6 Number of characters counted from the left of the string data specified by s1 Pos...

Page 699: ...ecified by d exceeds 16383 An out of range value is set to s2 The value in the device specified by s2 is 0 or less The value in the device specified by s2 1 is other than the valid values 1 0 1 or bigger The value in the device specify by s2 exceeds the number of characters in the device specified by d The value in the device specify by s2 1 exceeds the number of characters in the device specified...

Page 700: ...ce containing these character strings String ANYSTRING_SINGLE s2 Character string to be searched for or the start device containing the character string to be searched for String ANYSTRING_SINGLE d Device for storing the search result 16 bit signed binary ANY16 s3 Search start position 1 to 16383 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit...

Page 701: ...cription 2820H There is no NULL code 00H in each setting area in the device label memory in the device specified by s1 and later There is no NULL code 00H in each setting area in the device label memory in the device specified by s2 and later 3405H An out of range value is set to s1 The number of characters of the character string that has been set is 0 The number of characters of the character st...

Page 702: ...e Data type label s1 Character string to be inserted or the start device containing the character string to be inserted String ANYSTRING_SINGLE d Start device for storing the insertion result character string String ANYSTRING_SINGLE s2 Insertion position bytes 1 to 16383 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect...

Page 703: ...ing after insertion overlaps with the character string storage device specified by s1 3405H The number of characters of the character string in the device specified by s1 exceeds 16383 An out of range value is set to s2 The specified value exceeds the number of characters plus 1 of the character string in the device specified by d The specified value is not within the following range 1 s2 16383 Th...

Page 704: ...cription Range Data type Data type label d Start device containing the character string to be deleted String ANYSTRING_SINGLE s Deletion start position 1 to 16383 16 bit unsigned binary ANY16 n Number of characters to be deleted 0 to 16384 s 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others...

Page 705: ...e device specified by d exceeds 16383 An out of range value is set to s The specified value is not within the following range 1 s 16383 The specified value exceeds the number of characters of the character string in the device specified by d An out of range value is set to n The specified value exceeds the number of characters from the data in the device specified by s of the character string in t...

Page 706: ... s1 s2 ENO ANDE_ EN s1 s2 ENO ORE_ EN s1 s2 is replaced by any of the following EQ NE GT LE LT GE 2 FBD LD is replaced by a combination of LDE_ ANDE_ or ORE_ and EQ NE GT LE LT or GE 2 Instruction Execution condition LDE ANDE ORE Every scan Operand Description Range Data type Data type label s1 Comparison data or the start device where the comparison data is stored 0 2 126 s1 2128 Single precision...

Page 707: ...e program written in FBD LD and EN is set to TRUE ENO turns on EN will not be an execution condition When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error There is no operation error Note that two values may not be equal due to an error when t...

Page 708: ...GT LE LT GE 2 FBD LD is replaced by a combination of LDED_ ANDED_ or ORED_ and EQ NE GT LE LT or GE 2 Instruction Execution condition LDED ANDED ORED Every scan Operand Description Range Data type Data type label s1 Comparison data or the start device where the comparison data is stored 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Comparison data or the start device where the compa...

Page 709: ...truction is used in the program written in FBD LD use a left rail or a variable constant which is always on for EN If the ORED_ instruction is used in the program written in FBD LD and EN is set to TRUE ENO turns on EN will not be an execution condition When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input value...

Page 710: ... after the real number to be compared Ex To determine the match between E1 234567890123456 10 16 effective digits and a double precision real number Ex To determine the mismatch between E1 234567890123456 10 16 effective digits and a double precision real number 1 Whether data in D0 to D3 are within this range is checked The boundary values are not included 1 Whether data in D0 to D3 are within th...

Page 711: ...EN s1 s2 d ENO ECMPP EN s1 s2 d FBD LD Instruction Execution condition ECMP ECMPP Operand Description Range Data type Data type label s1 Comparison data or the start device for storing the comparison data 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Comparison data or the start device for storing the comparison data 0 2 126 s2 2128 Single precision real number ANYREAL_32 d The start ...

Page 712: ...the single precision real number data specified by s2 and according to the result small equal or large d d 1 or d 2 is turned on Operation error Error code SD0 Description 3402H The value input to s1 and s2 is 0 a subnormal number NaN not a number or ECMP s1 s2 d d X0 d 1 d 2 Turns on when s1 s1 1 s2 s2 1 Turns on when s1 s1 1 s2 s2 1 Turns on when s1 s1 1 s2 s2 1 ...

Page 713: ... s1 s2 d ENO EDCMPP EN s1 s2 d FBD LD Instruction Execution condition EDCMP EDCMPP Operand Description Range Data type Data type label s1 Comparison data or the start device for storing the comparison data 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Comparison data or the start device for storing the comparison data 0 2 1022 s2 21024 Double precision real number ANYREAL_64 d The s...

Page 714: ...e precision real number data specified by s2 and according to the result small equal or large d d 1 or d 2 is turned on Operation error Error code SD0 Description 3402H The value input to s1 and s2 is 0 a subnormal number NaN not a number or EDCMP s1 s2 d d X0 d 1 d 2 Turns on when s1 to s1 3 s2 to s2 3 Turns on when s1 to s1 3 s2 to s2 3 Turns on when s1 to s1 3 s2 to s2 3 ...

Page 715: ...ring tool with version 1 020W or later Ladder ST ENO EZCP EN s1 s2 s3 d ENO EZCPP EN s1 s2 s3 d FBD LD Instruction Execution condition EZCP EZCPP Operand Description Range Data type Data type label s1 Lower limit value or the start device for storing the lower limit value 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Upper limit value or the start device for storing the upper limit va...

Page 716: ... comparison result below within zone or above d d 1 or d 2 is turned on Precautions Set s1 to a value less than s2 If s1 is set to a value greater than s2 s2 is treated as the same value as s1 Operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 s3 d 1 Error code SD0 Descri...

Page 717: ... tool with version 1 020W or later Ladder ST ENO EDZCP EN s1 s2 s3 d ENO EDZCPP EN s1 s2 s3 d FBD LD Instruction Execution condition EDZCP EDZCPP Operand Description Range Data type Data type label s1 Lower limit value or the start device for storing the lower limit value 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Upper limit value or the start device for storing the upper limit ...

Page 718: ... result below within zone or above d d 1 or d 2 is turned on Precautions Set s1 to a value less than s2 If s1 is set to a value greater than s2 s2 is treated as the same value as s1 Operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 s3 d 1 Error code SD0 Description 3402H...

Page 719: ... for the precautions on setting input values using the engineering tool Page 49 Precautions Ladder ST Not supported Page 719 E P when three operands are set FBD LD Not supported Page 719 E P when three operands are set Instruction Execution condition E E P Operand Description Range Data type Data type label s Second addend data or the start device where the second addend data is stored 0 2 126 s 2...

Page 720: ...error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or The value input to d is 0 a subnormal number NaN not a number or 3403H The data in the device specified by d exceeds the following range An overflow has occurred d 2128 ...

Page 721: ...start device where the first addend data is stored 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Second addend data or the start device where the second addend data is stored 0 2 126 s2 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operan...

Page 722: ...26 specified value stored value 2128 can be specified or stored in the devices specified by s1 s2 and d Operation error Error code SD0 Description 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN not a number or 3403H The data in the device specified by d exceeds the following range An overflow has occurred d 2128 s1 s1 1 s2 ...

Page 723: ...occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Ladder ST Not supported Page 723 E P when three operands are set FBD LD Not supported Page 723 E P when three operands are set Instruction Execution condition E E P Operand Description Range Data type Data type label s Subtrahend data or the start device where subtrahend data is ...

Page 724: ...error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or The value input to d is 0 a subnormal number NaN not a number or 3403H The data in the device specified by d exceeds the following range An overflow has occurred d 2128 ...

Page 725: ... Minuend data or the start device where minuend data is stored 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Subtrahend data or the start device where subtrahend data is stored 0 2 126 s2 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Oper...

Page 726: ... s2 and d When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN not a number or 3403H The data...

Page 727: ...utions on setting input values using the engineering tool Page 49 Precautions Ladder ST Not supported Page 727 ED P when three operands are set FBD LD Not supported Page 727 ED P when three operands are set Instruction Execution condition ED ED P Operand Description Range Data type Data type label s Second addend data or the start device where the second addend data is stored 0 2 1022 s 21024 Doub...

Page 728: ...rror Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or The value input to d is 0 a subnormal number NaN not a number or 3403H The data in the device specified by d exceeds the following range An overflow has occurred d 21024 ...

Page 729: ... start device where the first addend data is stored 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Second addend data or the start device where the second addend data is stored 0 2 1022 s2 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL O...

Page 730: ... input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN not a number or 3403H The data in the device sp...

Page 731: ...the following for the precautions on setting input values using the engineering tool Page 49 Precautions Ladder ST Not supported Page 731 ED P when three operands are set FBD LD Not supported Page 731 ED P when three operands are set Instruction Execution condition ED ED P Operand Description Range Data type Data type label s Subtrahend data or the start device where subtrahend data is stored 0 2 ...

Page 732: ...rror Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or The value input to d is 0 a subnormal number NaN not a number or 3403H The data in the device specified by d exceeds the following range An overflow has occurred d 21024 ...

Page 733: ...1 Minuend data or the start device where minuend data is stored 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Subtrahend data or the start device where subtrahend data is stored 0 2 1022 s2 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL...

Page 734: ... an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN not a number or 3403H The data in the device...

Page 735: ...ata type Data type label s1 Multiplicand data or the start device where multiplicand data is stored 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Multiplier data or the start device where multiplier data is stored 0 2 126 s2 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BO...

Page 736: ... by s1 s2 and d When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN not a number or 3403H Th...

Page 737: ... Description Range Data type Data type label s1 Dividend data or the start device where dividend data is stored 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Divisor data or the start device where divisor data is stored 0 2 126 s2 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition ...

Page 738: ...ue is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3400H The data divisor in the device specified by s2 is 0 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN...

Page 739: ... Data type Data type label s1 Multiplicand data or the start device where multiplicand data is stored 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Multiplier data or the start device where multiplier data is stored 0 2 1022 s2 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition ...

Page 740: ... underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnorm...

Page 741: ...d Description Range Data type Data type label s1 Dividend data or the start device where dividend data is stored 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Divisor data or the start device where divisor data is stored 0 2 1022 s2 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condi...

Page 742: ...esult turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3400H The data divisor in the device specified by s2 is 0 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value i...

Page 743: ...n condition INT2FLT INT2FLTP Operand Description Range Data type Data type label s Integral data to be converted to a single precision real number or the device containing integral data 32768 to 32767 16 bit signed binary ANY16_S d Start device for storing the converted single precision real number Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOO...

Page 744: ...the 16 bit signed binary data in the device specified by s to a single precision real number and store the converted data in the device specified by d Operation error There is no operation error d b31 b16 1234 0 4000H C49AH b15 b0 D101 D100 s 1234 FB2EH b15 b0 D0 SM402 s d M0 MOVP K 1234 D0 INT2FLT D0 D100 ...

Page 745: ...ution condition UINT2FLT UINT2FLTP Operand Description Range Data type Data type label s Integral data to be converted to a single precision real number or the device containing integral data 0 to 65535 16 bit unsigned binary ANY16_U d Start device for storing the converted single precision real number Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit...

Page 746: ... the 16 bit unsigned binary data in the device specified by s to a single precision real number and store the real number in the device specified by d Operation error There is no operation error d b31 b16 1234 0 4000H 449AH b15 b0 D101 D100 s 1234 04D2H b15 b0 D0 SM402 s d M0 MOVP K1234 D0 UINT2FLT D0 D100 ...

Page 747: ...tion DINT2FLT DINT2FLTP Operand Description Range Data type Data type label s Integral data to be converted to a single precision real number or the start device containing integral data 2147483648 to 2147483647 32 bit signed binary ANY32_S d Start device for storing the converted single precision real number Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution res...

Page 748: ...imal For this reason if the integer value exceeds the range from 16777216 to 16777215 24 bit binary value an error occurs in the converted value The operation result is an integer value in which the 25th bit from upper bits is rounded off Operation error There is no operation error 1 Rounded down 2 Rounded off d b31 b16 123456 0 2000H C7F1H b15 b0 D101 D100 s b31 b16 123456 1DC0H FFFEH b15 b0 D1 D...

Page 749: ... d FBD LD Instruction Execution condition UDINT2FLT UDINT2FLTP Operand Description Range Data type Data type label s Integral data to be converted to a single precision real number or the start device containing integral data 0 to 4294967295 32 bit unsigned binary ANY32_U d Start device for storing the converted single precision real number Single precision real number ANYREAL_32 Operand Bit Word ...

Page 750: ...in decimal For this reason if the integer value exceeds the range from 0 to 16777215 24 bit binary value an error occurs in the converted value The operation result is an integer value in which the 25th bit from upper bits is rounded off Operation error There is no operation error 1 Rounded down 2 Rounded off d b31 b16 123456 0 2000H 47F1H b15 b0 D101 D100 s b31 b16 123456 E240H 0001H b15 b0 D1 D0...

Page 751: ...dition DBL2FLT DBL2FLTP Operand Description Range Data type Data type label s Integral data to be converted to a single precision real number or the start device containing integral data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the converted single precision real number Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution ...

Page 752: ...ounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the following range An overflow has occurred d 2128 s b63 b49 123456 7 240BH C0FEH D3 D2 D1 D0 b48 b32 d b31 b1...

Page 753: ...D Instruction Execution condition INT2DBL INT2DBLP Operand Description Range Data type Data type label s Integral data to be converted to a double precision real number or the device containing integral data 32768 to 32767 16 bit signed binary ANY16_S d Start device for storing the converted double precision real number Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Ex...

Page 754: ...752 7 APPLICATION INSTRUCTIONS 7 9 Real Number Instructions Operation error There is no operation error ...

Page 755: ...BD LD Instruction Execution condition UINT2DBL UINT2DBLP Operand Description Range Data type Data type label s Integral data to be converted to a double precision real number or the device containing integral data 0 to 65535 16 bit unsigned binary ANY16_U d Start device for storing the converted double precision real number Double precision real number ANYREAL_64 EN Execution condition Bit BOOL EN...

Page 756: ...754 7 APPLICATION INSTRUCTIONS 7 9 Real Number Instructions Operation error There is no operation error ...

Page 757: ...ion condition DINT2DBL DINT2DBLP Operand Description Range Data type Data type label s Integral data to be converted to a double precision real number or the start device containing integral data 2147483648 to 2147483647 32 bit signed binary ANY32_S d Start device for storing the converted double precision real number Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Exec...

Page 758: ...756 7 APPLICATION INSTRUCTIONS 7 9 Real Number Instructions Operation error There is no operation error ...

Page 759: ... Execution condition UDINT2DBL UDINT2DBLP Operand Description Range Data type Data type label s Integral data to be converted to a double precision real number or the start device containing integral data 0 to 4294967295 32 bit unsigned binary ANY32_U d Start device for storing the converted double precision real number Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Ex...

Page 760: ...758 7 APPLICATION INSTRUCTIONS 7 9 Real Number Instructions Operation error There is no operation error ...

Page 761: ...ction Execution condition FLT2DBL FLT2DBLP Operand Description Range Data type Data type label s Integral data to be converted to a single precision real number or the start device containing integral data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the converted double precision real number Double precision real number ANYREAL_64 EN Execution condition Bit BO...

Page 762: ...760 7 APPLICATION INSTRUCTIONS 7 9 Real Number Instructions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or ...

Page 763: ...pe Data type label s Character string data to be converted into single precision real number data or the start device containing the character string data String ANYSTRING_SINGLE d Start device for storing the converted single precision real number data Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specif...

Page 764: ...hown below The character string in the device specified by s to be converted to a single precision real number is converted by assuming that the six digits excluding the sign decimal point and exponent are effective and the seventh and subsequent digits are discarded 1 Single precision real number 1 Rounded down 2 Single precision real number s s 1 s 2 s 3 s 4 b15 b0 b7 b8 00H d d 1 ASCII code 1st...

Page 765: ...ter string in the device specified by s to be converted to a single precision real number is converted by assuming that the six digits excluding the sign decimal point and exponent are effective and the seventh and subsequent digits are discarded 1 Ignored 2 Single precision real number 1 Single precision real number 1 Rounded down 2 Single precision real number s s 1 s 2 s 3 s 4 b15 b0 b7 b8 00H ...

Page 766: ... by s 3401H An out of range value is set to s The integral part or decimal part contains a character other than 30H 0 to 39H 9 The specified string contains two or more 2EH The exponent of the specified string contains a character other than 45H E 65H e 2BH and 2DH The specified string contains more than one exponent 45H E or 65H e The exponent in the specified string contains a numerical value co...

Page 767: ...REXP EREXPP Operand Description Range Data type Data type label s1 Start device containing BCD floating point format data 16 bit signed binary ANY16_ARRAY Number of elements 5 s2 Number of digits in the decimal part 0 to 7 16 bit signed binary ANY16 d Start device for storing a single precision real number Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result...

Page 768: ...error s1 Sign Positive 0 Negative 1 s1 1 s1 2 BCD 7 digits s1 3 Sign of exponent Positive 0 Negative 1 s1 4 BCD exponent 0 to 38 s2 Number of digits in the decimal part 0 to 7 d 1 d Single precision real number Error code SD0 Description 3401H The value set to s1 as sign data is not 0 or 1 A value other than 0 to 9 exists at any digit of data set to s1 1 and s1 2 The value set to s1 3 as sign data...

Page 769: ...EG EN d ENO ENEGP EN d FBD LD Instruction Execution condition ENEG ENEGP Operand Description Range Data type Data type label d Start device containing the single precision real number data subject to sign inversion Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B ...

Page 770: ...d ENO EDNEGP EN d FBD LD Instruction Execution condition EDNEG EDNEGP Operand Description Range Data type Data type label d Start device containing the double precision real number subject to sign inversion Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY...

Page 771: ...Instruction Execution condition EMOV EMOVP Operand Description Range Data type Data type label s Data to be transferred or start device containing the data to be transferred 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing transferred data Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double w...

Page 772: ...n Execution condition EDMOV EDMOVP Operand Description Range Data type Data type label s Data to be transferred or start device containing the data to be transferred 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing transferred data Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word In...

Page 773: ... Instruction Execution condition SIN SINP Operand Description Range Data type Data type label s Angle data used for sine calculation or the start device containing the angle data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word...

Page 774: ...n result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RAD P and DEG P instructions Page 807 RAD P Page 809 DEG P Error code SD0 Description 3402H The value input to s is 0 a ...

Page 775: ...1 Instruction Execution condition COS COSP Operand Description Range Data type Data type label s Angle data used for cosine calculation or the start device containing the angle data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit W...

Page 776: ...on result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RAD P and DEG P instructions Page 807 RAD P Page 809 DEG P Error code SD0 Description 3402H The value input to s is 0 a...

Page 777: ... 1 Instruction Execution condition TAN TANP Operand Description Range Data type Data type label s Angle data used for tangent calculation or the start device containing the angle data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit...

Page 778: ...ool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Precautions If the angle specified by s is 2 radian or 3 2 radian no operation error will be issued because of the truncation error in the radian value Operation error For the angle radian conversion refer to the RAD P and DEG P instructions Page 807 RAD ...

Page 779: ...D LD 1 Instruction Execution condition ASIN ASINP Operand Description Range Data type Data type label s Sine data used for arc sine calculation or the start device containing the sine data 1 0 to 1 0 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bi...

Page 780: ...0 or an underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RAD P and DEG P instructions Page 807 RAD P Page 809 DEG P Error code SD0 Descripti...

Page 781: ... LD 1 Instruction Execution condition ACOS ACOSP Operand Description Range Data type Data type label s Cosine data used for arc cosine calculation or the start device containing the cosine data 1 0 to 1 0 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Opera...

Page 782: ...s 0 or an underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RAD P and DEG P instructions Page 807 RAD P Page 809 DEG P Error code SD0 Descrip...

Page 783: ... 1 Instruction Execution condition ATAN ATANP Operand Description Range Data type Data type label s Tangent data used for arc tangent calculation or the start device containing the tangent data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL O...

Page 784: ...or an underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RAD P and DEG P instructions Page 807 RAD P Page 809 DEG P Error code SD0 Description...

Page 785: ... Instruction Execution condition SIND SINDP Operand Description Range Data type Data type label s Angle data used for sine calculation or the start device containing the angle data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit ...

Page 786: ...urns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RADD P and DEGD P instructions Page 811 RADD P Page 813 DEGD P Error code SD0 Description 3402H The value input to s is 0 a subnor...

Page 787: ...LD 1 Instruction Execution condition COSD COSDP Operand Description Range Data type Data type label s Angle data used for cosine calculation or the start device containing the angle data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operan...

Page 788: ...turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RADD P and DEGD P instructions Page 811 RADD P Page 813 DEGD P Error code SD0 Description 3402H The value input to s is 0 a subno...

Page 789: ...1 Instruction Execution condition TAND TANDP Operand Description Range Data type Data type label s Angle data used for tangent calculation or the start device containing the angle data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand ...

Page 790: ...ding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Precautions If the angle specified by s is 2 radian or 3 2 radian no operation error will be issued because of the truncation error in the radian value Operation error For the angle radian conversion refer to the RADD P and DEGD P instructions Page 811 RADD P Page ...

Page 791: ...D LD 1 Instruction Execution condition ASIND ASINDP Operand Description Range Data type Data type label s Sine data used for arc sine calculation or the start device containing the sine data 1 0 to 1 0 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand ...

Page 792: ...derflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RADD P and DEGD P instructions Page 811 RADD P Page 813 DEGD P Error code SD0 Description 340...

Page 793: ... LD 1 Instruction Execution condition ACOSD ACOSDP Operand Description Range Data type Data type label s Cosine data used for arc cosine calculation or the start device containing the cosine data 1 0 to 1 0 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Ope...

Page 794: ...underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RADD P and DEGD P instructions Page 811 RADD P Page 813 DEGD P Error code SD0 Description 3...

Page 795: ... 1 Instruction Execution condition ATAND ATANDP Operand Description Range Data type Data type label s Tangent data used for arc tangent calculation or the start device containing the tangent data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BO...

Page 796: ...rflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error For the angle radian conversion refer to the RADD P and DEGD P instructions Page 811 RADD P Page 813 DEGD P Error code SD0 Description 3402H...

Page 797: ...P Operand Description Range Data type Data type label s Data used for sine calculation or the device containing the data 0 to 9999 BCD 4 digit ANY16 d Start device for storing the operation result BCD 4 digit ANY16_ARRAY Number of elements 3 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ...

Page 798: ...of the operation result to be stored in the device specified by d 0 is stored when the operation result is positive and 1 is stored when the operation result is negative The operation result to be stored in the devices specified by d 1 and d 2 is a BCD value in the range from 1 000 to 1 000 The operation result is a value whose 5th decimal place is rounded off Operation error d Sign d 1 Integral p...

Page 799: ...SP Operand Description Range Data type Data type label s Data used for cosine calculation or the device containing the data 0 to 9999 BCD 4 digit ANY16 d Start device for storing the operation result BCD 4 digit ANY16_ARRAY Number of elements 3 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J...

Page 800: ... sign of the operation result to be stored in the device specified by d 0 is stored when the operation result is positive and 1 is stored when the operation result is negative The operation result to be stored in the devices specified by d 1 and d 2 is a BCD value in the range from 1 000 to 1 000 The operation result is a value whose 5th decimal place is rounded off Operation error d Sign d 1 Inte...

Page 801: ...ANP Operand Description Range Data type Data type label s Data used for tangent calculation or the device containing the data 0 to 9999 BCD 4 digit ANY16 d Start device for storing the operation result BCD 4 digit ANY16_ARRAY Number of elements 3 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY...

Page 802: ...result to be stored in the device specified by d 0 is stored when the operation result is positive and 1 is stored when the operation result is negative The operation result to be stored in the devices specified by d 1 and d 2 is a BCD value in the range from 57 2901 to 57 2903 The operation result is a value whose 5th decimal place is rounded off Operation error d Sign d 1 Integral part d 2 Decim...

Page 803: ...BASIN BASINP Operand Description Range Data type Data type label s Start device containing the data used for arc sine calculation 0 to 9999 BCD 4 digit ANY16_ARRAY Number of elements 3 d Device for storing the operation result BCD 4 digit ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J...

Page 804: ...tore a BCD value for the integral part of calculation data in s 1 and a BCD value for the decimal part in s 2 A value from 0 to 1 0000 can be set The operation result to be stored in the device specified by d is a BCD value in the range from 0 to 90 or 270 to 360 in DEG unit The operation result is a value whose decimal part is rounded off Operation error s Sign s 1 Integral part s 2 Decimal part ...

Page 805: ... BACOS BACOSP Operand Description Range Data type Data type label s Start device containing the data used for arc cosine calculation 0 to 9999 BCD 4 digit ANY16_ARRAY Number of elements 3 d Device for storing the operation result BCD 4 digit ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX F...

Page 806: ...gative Store a BCD value for the integral part of calculation data in s 1 and a BCD value for the decimal part in s 2 A value from 0 to 1 0000 can be set The operation result to be stored in the device specified by d is a BCD value in the range from 0 to 180 in DEG unit The operation result is a value whose decimal part is rounded off Operation error s Sign s 1 Integral part s 2 Decimal part Error...

Page 807: ... BATAN BATANP Operand Description Range Data type Data type label s Start device containing the data used for arc tangent calculation 0 to 9999 BCD 4 digit ANY16_ARRAY Number of elements 3 d Device for storing the operation result BCD 4 digit ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX ...

Page 808: ...n data is negative Store a BCD value for the integral part of calculation data in s 1 and a BCD value for the decimal part in s 2 A value from 0 to 9999 9999 can be set The operation result to be stored in the device specified by d is a BCD value in the range from 0 to 90 or 270 to 360 in DEG unit The operation result is a value whose decimal part is rounded off Operation error s Sign s 1 Integral...

Page 809: ... RAD RADP Operand Description Range Data type Data type label s Angle for which the unit is to be changed to radian or the start device containing the angle 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the angle in radians Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect ...

Page 810: ...rmed as follows When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the following range An overflow has oc...

Page 811: ...d Description Range Data type Data type label s Angle in radians for which the unit is to be changed to the degree or the start device containing the angle in radians 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the value converted in degrees Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word D...

Page 812: ...rmed as follows When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the following range An overflow has oc...

Page 813: ...RADD RADDP Operand Description Range Data type Data type label s Angle for which the unit is to be changed to radian or the start device containing the angle 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the angle in radians Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indire...

Page 814: ...derflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the...

Page 815: ...nd Description Range Data type Data type label s Angle in radians for which the unit is to be changed to the degree or the start device containing the angle in radians 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the value converted in degrees Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Wor...

Page 816: ...derflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the...

Page 817: ...QRT ESQRTP Operand Description Range Data type Data type label s Data used for square root operation or the start device containing the data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Co...

Page 818: ...value can be calculated When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H The value in the device specified by s is a negative number s...

Page 819: ...SQRT EDSQRTP Operand Description Range Data type Data type label s Data used for square root operation or the start device containing the data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specificatio...

Page 820: ... or an underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H The value in the device s...

Page 821: ...FBD LD 1 Instruction Execution condition EXP EXPP Operand Description Range Data type Data type label s Data used for exponential operation or the start device containing the data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Wor...

Page 822: ...ions on setting input values using the engineering tool Page 49 Precautions Operation error The EXP P instruction performs operation using the natural logarithm To determine a value using the common logarithm determine a value by dividing the common logarithm value by 0 43429 and specify it in the device specified by s Error code SD0 Description 3402H The value input to s is 0 a subnormal number N...

Page 823: ...BD LD 1 Instruction Execution condition EXPD EXPDP Operand Description Range Data type Data type label s Data used for exponential operation or the start device containing the data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit ...

Page 824: ...er to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error The EXPD P instruction performs operation using the natural logarithm To determine a value using the common logarithm determine a value by dividing the common logarithm value by 0 43429 and specify it in the device specified by s Error code SD0 Description 3402H The value ...

Page 825: ...r ST 1 ENO LOGP EN s d FBD LD 1 Instruction Execution condition LOG LOGP Operand Description Range Data type Data type label s Data used for natural logarithm operation or the start device containing the data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution re...

Page 826: ...ulated When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H An out of range value is set to s The specified value is a negative number The...

Page 827: ...ST 1 ENO LOGDP EN s d FBD LD 1 Instruction Execution condition LOGD LOGDP Operand Description Range Data type Data type label s Data used for natural logarithm operation or the start device containing the data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution...

Page 828: ...occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H An out of range value is set to s The spec...

Page 829: ...sult in the device specified by d The operation result is a value whose 5th decimal place is rounded down Ladder ST ENO BSQRT EN s d ENO BSQRTP EN s d FBD LD Instruction Execution condition BSQRT BSQRTP Operand Description Range Data type Data type label s Data used for square root operation or the device containing the data 0 to 9999 BCD 4 digit ANY16 d Start device for storing the operation resu...

Page 830: ...828 7 APPLICATION INSTRUCTIONS 7 9 Real Number Instructions Operation error Error code SD0 Description 3405H The data in the device specified by s is not a BCD value ...

Page 831: ...RT BDSQRTP Operand Description Range Data type Data type label s Data used for square root operation or the start device containing the data 0 to 99999999 BCD 8 digit ANY32 d Start device for storing the operation result BCD 4 digit ANY16_ARRAY Number of elements 2 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y ...

Page 832: ... The value to be specified in s is a BCD value with a maximum of 8 digits 0 to 99999999 A BCD value from 0 to 9999 9999 is stored as the operation result in the device specified by d The operation result is a value whose 5th decimal place is rounded down Operation error s 1 s 2 word data d Integral part d 1 Decimal part Error code SD0 Description 3405H The data in the device specified by s is not ...

Page 833: ...pient data or the start device containing the exponentiation recipient data 0 2 126 s1 2128 Single precision real number ANYREAL_32 s2 Exponentiation data or the start device containing the data 0 2 126 s2 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL...

Page 834: ...6 setting value stored value 2128 If the operation result is 0 or an underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s1 or s2 is 0 a...

Page 835: ...pient data or the start device containing the exponentiation recipient data 0 2 1022 s1 21024 Double precision real number ANYREAL_64 s2 Exponentiation data or the start device containing the data 0 2 1022 s2 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit ...

Page 836: ...alue 21024 If the operation result is 0 or an underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s1 or s2 is 0 a subnormal number NaN n...

Page 837: ... Execution condition LOG10 LOG10P Operand Description Range Data type Data type label s Data used for common logarithm operation or the start device containing the data 0 2 126 s 2128 Single precision real number ANYREAL_32 d Start device for storing the operation result Single precision real number ANYREAL_32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double wo...

Page 838: ...0 or an underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H An out of range value is...

Page 839: ... Execution condition LOG10D LOG10DP Operand Description Range Data type Data type label s Data used for common logarithm operation or the start device containing the data 0 2 1022 s 21024 Double precision real number ANYREAL_64 d Start device for storing the operation result Double precision real number ANYREAL_64 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Doubl...

Page 840: ...underflow occurs the operation result turns out to 0 When an input value is set using the engineering tool a rounding error may occur Refer to the following for the precautions on setting input values using the engineering tool Page 49 Precautions Operation error Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H An out of range value is set to ...

Page 841: ... Operand Description Range Data type Data type label s Single precision real number used for maximum value search or the start device containing single precision real numbers 0 2 126 s 2128 Single precision real number ANYREAL_32 1 d Start device for storing the search result d to d 1 Maximum value d 2 Position d 3 The number of search target data points Single precision real number ANY_REAL_32_AR...

Page 842: ...rom s in the device specified by d 2 and the number of maximum values in the device specified by d 3 The start of the block data in the device specified by s is counted as the 1st point when the search result location is counted When n is 0 the processing is not performed Operation error d d 1 Maximum value d 2 Location d 3 Number of maximum values Error code SD0 Description 3402H The block data i...

Page 843: ...XP Operand Description Range Data type Data type label s Double precision real number used for maximum value search or the start device containing double precision real numbers 0 2 1022 s 21024 Double precision real number ANYREAL_64 1 d Start device for storing the search result d to d 3 Maximum value d 4 Position d 5 The number of search target data points Double precision real number ANY_REAL_6...

Page 844: ...e device specified by d 4 and the number of maximum values in the device specified by d 5 The start of the block data in the device specified by s is counted as the 1st point when the search result location is counted When n is 0 the processing is not performed Operation error d d 1 d 2 d 3 Maximum value d 4 Location d 5 Number of maximum values Error code SD0 Description 3402H The block data in t...

Page 845: ... Operand Description Range Data type Data type label s Single precision real number used for minimum value search or the start device containing single precision real numbers 0 2 126 s 2128 Single precision real number ANYREAL_32 1 d Start device for storing the search result d to d 1 Minimum value d 2 Position d 3 The number of search target data points Single precision real number ANY_REAL_32_AR...

Page 846: ...rom s in the device specified by d 2 and the number of minimum values in the device specified by d 3 The start of the block data in the device specified by s is counted as the 1st point when the search result location is counted When n is 0 the processing is not performed Operation error d d 1 Minimum value d 2 Location d 3 Number of minimum values Error code SD0 Description 3402H The block data i...

Page 847: ...NP Operand Description Range Data type Data type label s Double precision real number used for minimum value search or the start device containing double precision real numbers 0 2 1022 s 21024 Double precision real number ANYREAL_64 1 d Start device for storing the search result d to d 3 Minimum value d 4 Position d 5 The number of search target data points Double precision real number ANY_REAL_6...

Page 848: ...e device specified by d 4 and the number of minimum values in the device specified by d 5 The start of the block data in the device specified by s is counted as the 1st point when the search result location is counted When n is 0 the processing is not performed Operation error d d 1 d 2 d 3 Minimum value d 4 Location d 5 Number of minimum values Error code SD0 Description 3402H The block data in t...

Page 849: ...ates random numbers according to a certain calculation expression The calculation expression uses the previous calculation result as a coefficient Operation error There is no operation error Ladder ST ENO RND EN d ENO RNDP EN d FBD LD Instruction Execution condition RND RNDP Operand Description Range Data type Data type label d Device for storing the random number 16 bit signed binary ANY16 EN Exe...

Page 850: ... specified by s The SRND P instruction can change the random number calculation pattern Operation error There is no operation error Ladder ST ENO SRND EN s ENO SRNDP EN s FBD LD Instruction Execution condition SRND SRNDP Operand Description Range Data type Data type label s Random number sequence data 32768 to 32767 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bi...

Page 851: ...and specify the array label element Applicable devices Ladder ST ENO ZPUSH EN d ENO ZPUSHP EN d FBD LD Instruction Execution condition ZPUSH ZPUSHP Operand Description Range Data type Data type label d Start device to which the index register will be saved 16 bit signed binary ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification ...

Page 852: ... stack Page 851 ZPOP P A nesting structure can be created by specifying the area specified by d of the ZPUSH P instruction in d of the ZPUSH P instruction again The number of saves d is incremented by 1 every time the ZPUSH P instruction is executed When another area is specified in d of the ZPUSH P instruction in the nesting structure the content of the index register is saved to the specified an...

Page 853: ...r When the content of the index register is read the number of saves d is decremented by 1 Refer to the following for the configuration of the areas used after d Page 849 ZPUSH P Operation error Ladder ST ENO ZPOP EN d ENO ZPOPP EN d FBD LD Instruction Execution condition ZPOP ZPOPP Operand Description Range Data type Data type label d Start device to which the index register will be restored 16 b...

Page 854: ...H_2 EN s d ENO ZPUSHP_2 EN s d FBD LD is replaced by ZPUSH_2 or ZPUSHP_2 Instruction Execution condition ZPUSH ZPUSHP Operand Description Range Data type Data type label s Type of the index register and long index register to be saved 1 to 3 16 bit unsigned binary ANY16 d Start device to which the index register and long index register will be saved 16 bit signed binary ANY16 1 EN Execution condit...

Page 855: ...on in d of the ZPUSH P instruction again The number of saves d is incremented by 1 every time the ZPUSH P instruction is executed When another area is specified in d of the ZPUSH P instruction in the nesting structure the content of the index register or long index register is saved to the specified another area In the nesting structure every time the ZPUSH P instruction is executed saved data is ...

Page 856: ...o used for the system Do not change the values Changing the values may cause malfunction of the module Operation error Error code SD0 Description 3405H An out of range value is set to s The specified value is other than 1 to 3 When the number of index register points is 0 2 is specified When the number of long index register points is 0 3 is specified The value stored in the system reserved area i...

Page 857: ... saved to the index register and long index register is read the number of saves d is decremented by 1 The date data in the device specified by s is regarded as dummy data and ignored Refer to the following for the configuration of the areas used after d Page 852 ZPUSH P Ladder ST ENO ZPOP_2 EN s d ENO ZPOPP_2 EN s d FBD LD is replaced by ZPOP_2 or ZPOPP_2 Instruction Execution condition ZPOP ZPOP...

Page 858: ...n the area specified by d and later are also used for the system Do not change the values Changing the values may cause malfunction of the module Operation error Error code SD0 Description 3405H The number of saves in d 0 is 0 The value stored in the system reserved area in the area specified by d has been changed A value other than 1 to 3 is set to the Z LZ save type ...

Page 859: ...n Range Data type Data type label s1 LIMIT P Lower limit value minimum output threshold value 32768 to 32767 16 bit signed binary ANY16_S LIMIT P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 LIMIT P Upper limit value maximum output threshold value 32768 to 32767 16 bit signed binary ANY16_S LIMIT P _U 0 to 65535 16 bit unsigned binary ANY16_U s3 LIMIT P Input value to be controlled with the upp...

Page 860: ...etting range in s1 To control the input value only with the lower limit set the maximum value within the setting range in s2 Operation error Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 s2 s3 d Condition Output value Lower limit value s1 Input value s3 Lower limit value s1 Upper limit...

Page 861: ... 2147483647 32 bit signed binary ANY32_S DLIMIT P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 DLIMIT P Device for storing the upper limit value maximum output threshold value 2147483648 to 2147483647 32 bit signed binary ANY32_S DLIMIT P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s3 DLIMIT P Device for storing the input value controlled by upper lower limit control 2147483648 to 21...

Page 862: ...limit set the minimum value within the setting range in s1 To control the input value only with the lower limit set the maximum value within the setting range in s2 Operation error Condition Output value Lower limit value s1 s1 1 Input value s3 s3 1 Lower limit value s1 s1 1 Lower limit value s2 s2 1 Input value s3 s3 1 Upper limit value s2 s2 1 Lower limit value s1 s1 1 Input value s3 s3 1 Upper ...

Page 863: ...igned binary ANY16_S BAND P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 BAND P Upper limit of dead band no output band 32768 to 32767 16 bit signed binary ANY16_S BAND P _U 0 to 65535 16 bit unsigned binary ANY16_U s3 BAND P Input value to be controlled by dead band control 32768 to 32767 16 bit signed binary ANY16_S BAND P _U 0 to 65535 16 bit unsigned binary ANY16_U d BAND P Device for stori...

Page 864: ...67 Ex When s1 is 10 and s3 is 32768 output value is 32768 10 8000H 000AH 7FF6H 32758 The following example shows the case when the operation result of the BAND P _U instruction is out of the range from 0 to 65535 Ex When s1 is 100 and s3 is 50 output value is 50 100 0032H 0064H FFCEH 65486 Operation error Condition Output value Dead band lower limit value s1 input value s3 Input value s3 dead band...

Page 865: ...AND P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 DBAND P Device for storing the upper limit value of dead band no output band 2147483648 to 2147483647 32 bit signed binary ANY32_S DBAND P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s3 DBAND P Device for storing the input value controlled by dead band control 2147483648 to 2147483647 32 bit signed binary ANY32_S DBAND P _U 0 to 4294...

Page 866: ...2147483648 1000 80000000H 000003E8H 7FFFFC18H 2147482648 The following example shows the case when the operation result of the DBAND P _U instruction is out of the range from 0 to 4294967295 Ex When s1 s1 1 is 100 and s3 s3 1 is 50 output value is 50 100 00000032H 00000064H FFFFFFCEH 4294967246 Operation error Condition Output value Dead band lower limit value s1 s1 1 Input value s3 s3 1 Input val...

Page 867: ...0 to 65535 16 bit unsigned binary ANY16_U s2 ZONE P Positive bias value to be added to the input value 32768 to 32767 16 bit signed binary ANY16_S ZONE P _U 0 to 65535 16 bit unsigned binary ANY16_U s3 ZONE P Input value used for zone control 32768 to 32767 16 bit signed binary ANY16_S ZONE P _U 0 to 65535 16 bit unsigned binary ANY16_U d ZONE P Device for storing the output value controlled by zo...

Page 868: ...o 32767 Ex When s1 is 100 and s3 is 32768 output value is 32768 100 8000H FF9CH 7F9CH 32668 The following example shows the case where the operation result of the ZONE P _U instruction is out of the range from 0 to 65535 Ex When s2 is 100 and s3 is 65535 output value is 65535 100 FFFFH 0064H 0063H 99 The ZONE P _U instruction treats the data in the device specified by s1 as dummy and does not use ...

Page 869: ...signed binary ANY32_U s2 DZONE P Device for storing the positive bias value to be added to the input value 2147483648 to 2147483647 32 bit signed binary ANY32_S DZONE P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s3 DZONE P Device for storing the Input value used for zone control 2147483648 to 2147483647 32 bit signed binary ANY32_S DZONE P _U 0 to 4294967295 32 bit unsigned binary ANY32_U d...

Page 870: ...lue is 2147483648 1000 80000000H FFFFFC18H 7FFFFC18H 2147482648 The following example shows the case where the operation result of the DZONE P _U instruction is out of the range from 0 to 4294967295 Ex When s2 s2 1 is 1000 and s3 s3 1 is 4294967295 output value is 4294967295 1000 FFFFFFFFH 00003E8H 000003E7H 999 The DZONE P _U instruction treats the data in the device specified by s1 and s1 1 as d...

Page 871: ...cution condition SCL SCL_U SCLP SCLP_U Operand Description Range Data type Data type label s1 SCL P Input value to be scaled or the device containing the input value 32768 to 32767 16 bit signed binary ANY16_S SCL P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 SCL P Start device containing scaling conversion data 16 bit signed binary 1 ANY16_S 2 SCL P _U 16 bit unsigned binary 1 ANY16_U 2 d SCL...

Page 872: ...data of the scaling conversion data in ascending order Set the value in s1 within the range of the scaling conversion data device value in s2 If two or more points indicate the same X coordinate the Y coordinate value of the largest point number is output Specify a value from 1 to 65535 for the number of coordinate points of the scaling conversion data specified by s2 Setting item n is the number ...

Page 873: ... binary search is faster The maximum number of searches is 16 and therefore when coordinate point 17 or later is specified by s1 the number of binary searches is equal to or greater than the number of sequential searches and accordingly the processing speed of the binary search becomes faster 1 The processing speed of the binary search is faster because the number of sequential searches is less th...

Page 874: ...ition DSCL DSCL_U DSCLP DSCLP_U Operand Description Range Data type Data type label s1 DSCL P Input value to be scaled or the start device containing the input value 2147483648 to 2147483647 32 bit signed binary ANY32_S DSCL P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 DSCL P Start device containing scaling conversion data 32 bit signed binary 1 ANY32_S 2 DSCL P _U 32 bit unsigned binary...

Page 875: ...onversion data in ascending order Set the value in s1 within the range of the scaling conversion data device value in s2 s2 1 If two or more points indicate the same X coordinate the Y coordinate value of the largest point number is output Specify a value from 1 to 4294967295 for the number of coordinate points of the scaling conversion data specified by s2 Setting item n is the number of coordina...

Page 876: ...binary search is faster The maximum number of searches is 32 and therefore when coordinate point 33 or later is specified by s1 the number of binary searches is equal to or greater than the number of sequential searches and accordingly the processing speed of the binary search becomes faster 1 The processing speed of the binary search is faster because the number of sequential searches is less tha...

Page 877: ...n condition SCL2 SCL2_U SCL2P SCL2P_U Operand Description Range Data type Data type label s1 SCL2 P Input value to be scaled or the device containing the input value 32768 to 32767 16 bit signed binary ANY16_S SCL2 P _U 0 to 65535 16 bit unsigned binary ANY16_U s2 SCL2 P Start device containing scaling conversion data 16 bit signed binary 1 ANY16_S 2 SCL2 P _U 16 bit unsigned binary 1 ANY16_U 2 d ...

Page 878: ...tput Specify a value from 1 to 65535 for the number of coordinate points of the scaling conversion data Precautions When the scaling conversion data is sorted in ascending order the search method varies depending on the status of SM755 and therefore the processing speed also varies For details refer to the SCL P _U instruction Page 869 SCL P _U Operation error Setting item n is the number of coord...

Page 879: ...DSCL2 DSCL2_U DSCL2P DSCL2P_U Operand Description Range Data type Data type label s1 DSCL2 P Input value to be scaled or the start device containing the input value 2147483648 to 2147483647 32 bit signed binary ANY32_S DSCL2 P _U 0 to 4294967295 32 bit unsigned binary ANY32_U s2 DSCL2 P Start device containing scaling conversion data 32 bit signed binary 1 ANY32_S 2 DSCL2 P _U 32 bit unsigned bina...

Page 880: ...om 1 to 4294967295 for the number of coordinate points of the scaling conversion data Precautions When the scaling conversion data is sorted in ascending order the search method varies depending on the status of SM755 and therefore the processing speed also varies For details refer to the DSCL P _U instruction Page 872 DSCL P _U Operation error Setting item n is the number of coordinate points spe...

Page 881: ...UDCNT1 EN s1 s2 d FBD LD Instruction Execution condition UDCNT1 Operand Description Range Data type Data type label s1 s1 0 Count input number Bit ANYBIT_ARRAY 1 Number of elements 2 s1 1 Count up down flag Off indicates count up counting up the current value On indicates count down counting down the current value d Number of the counter device name to be counted by the UDCNT1 instruction Device n...

Page 882: ...rval of the CPU module The interrupt interval of the CPU module is 1ms The set value cannot be changed during counting by the UDCNT1 instruction while the execution command is on To change the set value turn off the execution command in advance The counter specified by the UDCNT1 instruction cannot be used by any other instruction If another instruction uses it normal counting is disabled The UDCN...

Page 883: ...modules 2 Only C can be used Ladder ST ENO UDCNT2 EN s1 s2 d FBD LD Instruction Execution condition UDCNT2 Operand Description Range Data type Data type label s1 s1 0 Count input number phase A pulse Bit ANYBIT_ARRAY 1 Number of elements 2 s1 1 Count input number phase B pulse d Number of the counter device name to be counted by the UDCNT2 instruction Device name ANY16 2 s2 Set value 32768 to 3276...

Page 884: ... interrupt interval of the CPU module is 1ms The set value cannot be changed during counting by the UDCNT2 instruction while the execution command is on To change the set value turn off the execution command in advance The counter specified by the UDCNT2 instruction cannot be used by any other instruction If another instruction uses it normal counting is disabled The UDCNT2 instruction can be used...

Page 885: ...abel d d 0 Device for storing the measurement value 16 bit signed binary ANY16_ARRAY Number of elements 2 d 1 Device for the system of CPU module s Multiplier of measurement value 0 to 2 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U ...

Page 886: ... TTMR instruction implements time measurement Do not use the JMP instruction to skip the TTMR instruction Otherwise accurate measurement is disabled Do not change the multiplier specified by s during execution of the TTMR instruction Otherwise accurate values cannot be determined The device specified by d 1 is used by the system of the CPU module Do not change the value If the value is changed an ...

Page 887: ...can Operand Description Range Data type Data type label s1 Timer device or timer type label Device name ANY16 s2 Set value 0 to 32767 16 bit signed binary ANY16 d d 0 Off delay timer output Bit ANYBIT_ARRAY Number of elements 4 d 1 After off one shot timer output d 2 After on one shot timer output d 3 On delay off delay timer output EN Execution condition Bit BOOL ENO Execution result Bit BOOL Ope...

Page 888: ...h as by the JMP instruction normal measurement is not performed The measurement unit of the timer specified by d is the same as that of the low speed timer A value from 0 to 32767 can be specified in s2 If a value out of the range is specified no processing is performed Do not use the OUT instruction for the timer specified by s1 If the same timer device or timer type label is used for the STMR an...

Page 889: ... an STMR instruction within the range for changing the ladder block online or writing data to the running programmable controller the STMR instruction is executed For details refer to the following MELSEC iQ R CPU Module User s Manual Application Operation error There is no operation error ...

Page 890: ...d binary s 2 Call item number 16 bit unsigned binary n1 Number of table divisions 2 to 65535 16 bit unsigned binary ANY16 n2 Number of low speed sections 0 to less than n1 16 bit unsigned binary ANY16 d d 0 Phase A input signal Bit ANYBIT_ARRAY Number of elements 8 d 1 Phase B input signal d 2 0 point detection input signal d 3 High speed forward rotation output signal reserved for the system d 4 ...

Page 891: ...he rising or falling edge when phase A is on d 2 is the 0 point detection signal that turns on when the 0th item reaches the 0th counter When the device specified by d 2 turns on during execution of the ROTC instruction the device specified by s 0 is cleared Start shortcut control with the ROTC instruction after performing this clearing operation d 3 to d 7 are output signals for controlling table...

Page 892: ...ry table so that the items rotate at short cut The item number is specified by D2 and the counter number is specified by D1 The table is rotated at low speeds in two front and rear sections Operation error There is no operation error X0 X1 X2 M0 M1 M2 M0 END K2 K10 D0 ROTC X10 X002 9 8 7 6 5 4 3 2 1 0 X000 X001 Rotary table Zero point detection Forward rotation Item Detection switch Station No 1 S...

Page 893: ...s2 Last value 32768 to 32767 16 bit signed binary ANY16 d1 d1 0 Current value 16 bit signed binary ANY16_ARRAY Number of elements 2 d1 1 Number of executions n Number of shifts 1 to 32767 16 bit signed binary ANY16 d2 d2 0 Completion device Bit ANYBIT_ARRAY Number of elements 2 d2 1 Bit for selecting data retention at completion EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand...

Page 894: ... restarts shifting from the initial value Do not change the values in s1 and s2 before the completion device specified by d2 0 turns on The value to be stored in d1 1 is calculated using the same calculation formula every scan and therefore changing the values in s1 and s2 may result in a sudden change When making the digit specification using a bit device in d1 specify it in K8Dn format Precautio...

Page 895: ...7 APPLICATION INSTRUCTIONS 7 16 Ramp Signal Instruction 893 7 Operation error There is no operation error ...

Page 896: ...T ENO SPD EN s1 s2 d FBD LD Instruction Execution condition SPD Operand Description Range Data type Data type label s1 Pulse input device number Bit ANY_BOOL 1 s2 Measurement time or the device number of the device containing the measurement time unit ms 32768 to 32767 16 bit signed binary ANY16 d Device for storing the measurement result 16 bit signed binary ANY16 EN Execution condition Bit BOOL ...

Page 897: ...ule and performs the actual count operation using system interrupts The device data stored in the work area of the CPU module is cleared by turning off the execution command or setting it to STOP then RUN For this reason the pulses that can be counted must have longer on off time than the interval of the CPU module The interrupt interval of the CPU module is 1ms The SPD instruction can be used a m...

Page 898: ...n d FBD LD Instruction Execution condition PLSY Operand Description Range Data type Data type label s Frequency or the start number of the device containing the frequency 1 to 100 16 bit signed binary ANY16 1 n Number of outputs or the start number of the device containing the number of outputs 0 to 65535 16 bit unsigned binary ANY16 d Device used for pulse output Bit ANY_BOOL EN Execution conditi...

Page 899: ...he command When the command turns off the PLSY instruction stops pulse output Operation error There is no operation error The PLSY instruction stores the device data of the argument in the work area of the CPU module and performs the actual output operation using system interrupts The device data stored in the work area of the CPU module is cleared by turning off the execution command or setting i...

Page 900: ...NO PWM EN s1 s2 d FBD LD Instruction Execution condition PWM Operand Description Range Data type Data type label s1 On time or the start number of the device containing the on time Unit ms 1 to 65535 16 bit unsigned binary ANY16 1 s2 Period or the start number of the device containing the period Unit ms 1 to 65535 16 bit unsigned binary ANY16 d Pulse output device number Bit ANY_BOOL EN Execution ...

Page 901: ...ion stores the device data of the argument in the work area of the CPU module and performs the actual output operation using system interrupts The device data stored in the work area of the CPU module is cleared by turning off the execution command or setting it to STOP then RUN The interrupt interval of the CPU module is 1ms The PWM instruction can be used only once in all programs running in the...

Page 902: ...licable devices 1 Only X can be used 2 Only Y can be used Ladder ST ENO MTR EN s n d1 d2 FBD LD Instruction Execution condition MTR Operand Description Range Data type Data type label s Start device of input Bit ANY_BOOL 1 3 d1 Start device of output Bit ANY_BOOL 2 3 d2 Start device for storing the matrix input data Bit ANY_BOOL 3 n Number of input columns 2 to 8 16 bit unsigned binary ANY16 EN Ex...

Page 903: ...nnected to X10 and later and stores the read data to M0 and later when X0 turns on Operation The device number specified by s d1 or d2 is not a multiple of 16 The device specified by s is outside the range of actual inputs The device specified by d1 is outside the range of actual outputs In the device specified by d2 and later 16 n points of data is outside the range of the relevant device n is ou...

Page 904: ...in the program The MTR instruction execution interval should be longer than the total response time of the input and output modules If the MTR instruction execution interval is shorter than the above time inputs cannot be read normally If the scan time in the program is short select the constant scan and set longer scan time than the total of the response time Operation error Error code SD0 Descri...

Page 905: ...engineering tool with version 1 020W or later Ladder ST ENO CCD EN s n d ENO CCDP EN s n d FBD LD Instruction Execution condition CCD CCDP Operand Description Range Data type Data type label s Start device where target data is stored 16 bit signed binary ANY16 d Start device for storing the calculated data 16 bit signed binary ANY16_ARRAY Number of elements 2 n Number of data 0 to 65535 16 bit uns...

Page 906: ...8 bits are stored to d and d 1 respectively Ex When n 6 Calculation of addition data value In 16 bit conversion mode addition data is determined by adding 6 bytes in the following shaded portion The addition data is thus determined as 0315H and therefore 0315H is stored in the device specified by d Calculation of horizontal parity value In 16 bit conversion mode the above shaded portion becomes th...

Page 907: ...number of ON 1 bits is calculated to determine the parity value which becomes ON 1 when the number of ON 1 bits is finally odd or OFF 0 when it is finally even The horizontal parity value is stored in the device specified by d 1 In the following table C2H is stored in the device specified by d 1 Operation error There is no operation error Bit horizontal parity value b7 b6 b5 b4 b3 b2 b1 b0 Value L...

Page 908: ...n SERDATA SERDATAP Operand Description Range Data type Data type label s1 Search data or the device containing the search data 32768 to 32767 16 bit signed binary ANY16 s2 Data to be searched or the start device containing the data to be searched 16 bit signed binary ANY16 1 d Start device for storing the search result 16 bit signed binary ANY16_ARRAY Number of elements 2 n Number of search target...

Page 909: ...following figure shows an example of binary search 1 SM702 is a special relay for setting the search method SM702 is off Sequential search linear search This method compares the search data with the data to be searched for starting from the start of data SM702 is on Binary search For the data that has been sorted in ascending order this method checks the center value of the search range determinin...

Page 910: ...rand Description Range Data type Data type label s1 Search data or the start device containing the search data 2147483648 to 2147483647 32 bit signed binary ANY32 s2 Data to be searched or the start device containing the data to be searched 32 bit signed binary ANY32 1 d Start device for storing the search result 16 bit signed binary ANY16_ARRAY Number of elements 2 n Number of search target data ...

Page 911: ...lowing figure shows an example of binary search 1 SM702 is a special relay for setting the search method SM702 is off Sequential search linear search This method compares the search data with the data to be searched for starting from the start of data SM702 is on Binary search For the data that has been sorted in ascending order this method checks the center value of the search range determining w...

Page 912: ...Operand Description Range Data type Data type label s1 Start device in which the same data maximum value and minimum value are searched 16 bit signed binary ANY16 s2 Data to be searched for or device storing data 16 bit signed binary ANY16 d Start device storing number of the same data maximum value and minimum value detected by search 16 bit unsigned binary ANY16_ARRAY Number of elements 5 n Numb...

Page 913: ...When there are two or more maximum or minimum values in the searched data the last position of the maximum minimum values is stored If the value specified in n is 0 no processing is performed The following table shows example of configuration of search result table and data n 10 The following table shows the search result table obtained by the above example Operation error There is no operation er...

Page 914: ...MP Operand Description Range Data type Data type label s1 Start device in which the same data maximum value and minimum value are searched 32 bit signed binary ANY32 s2 Data to be searched for or device storing data 32 bit signed binary ANY32 d Start device storing number of the same data maximum value and minimum value detected by search 32 bit unsigned binary ANY32_ARRAY Number of elements 5 n N...

Page 915: ...r minimum values in the searched data the last position of the maximum minimum values is stored If the value specified in n is 0 no processing is performed The following table shows example of configuration of search result table and data n 10 The following table shows the search result table obtained by the above example Operation error There is no operation error Searched device s1 Searched data...

Page 916: ...dition SUM SUMP Operand Description Range Data type Data type label s Device containing data in which the total number of 1 bits is to be counted 32768 to 32767 16 bit signed binary ANY16 d Device for storing the total number of bits 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L S...

Page 917: ...7 APPLICATION INSTRUCTIONS 7 20 Data Processing Instructions 915 7 Operation error There is no operation error ...

Page 918: ...scription Range Data type Data type label s Start device containing data in which the total number of 1 bits is to be counted 2147483648 to 2147483647 32 bit signed binary ANY32 d Device for storing the total number of bits 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB F...

Page 919: ...7 APPLICATION INSTRUCTIONS 7 20 Data Processing Instructions 917 7 Operation error There is no operation error ...

Page 920: ...ring tool with version 1 020W or later Ladder ST ENO BON EN s n d ENO BONP EN s n d FBD LD Instruction Execution condition BON BONP Operand Description Range Data type Data type label s Device storing the data 16 bit signed binary ANY16 d Bit device for storing the result Bit ANY_BOOL n Bit position to be checked 0 to 15 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Execution ...

Page 921: ...device specified by d When the result above is on these instructions turn d on When the result above is off these instructions turn d off Operation error Error code SD0 Description 3405H The value specified for n is outside the following range 0 to 15 n s b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 0 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 4 5 6 7 0 1 2 3 8 9 10 11 12 13 14 15 n 5 n 8 0 OFF 1 ON d...

Page 922: ...ng tool with version 1 020W or later Ladder ST ENO DBON EN s n d ENO DBONP EN s n d FBD LD Instruction Execution condition DBON DBONP Operand Description Range Data type Data type label s Device storing the data 32 bit signed binary ANY32 d Bit device for storing the result Bit ANY_BOOL n Bit position to be checked 0 to 31 16 bit unsigned binary ANY16_U EN Execution condition Bit BOOL ENO Executio...

Page 923: ...n the result above is on these instructions turn d on When the result above is off these instructions turn d off Operation error Error code SD0 Description 3405H The value specified for n is outside the following range 0 to 31 n s 1 s b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 b10 b11 b12 b13 b14 b15 0 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 4 5 6 7 0 1 2 3 8 9 10 11 12 13 14 15 b16 1 16 b17 1 17 b29 1 29 b30 0 30 b31 1...

Page 924: ...LD 1 Instruction Execution condition MAX MAX_U MAXP MAXP_U Operand Description Range Data type Data type label s MAX P Start device where the search target data is stored 16 bit signed binary ANY16_S 1 MAX P _U 16 bit unsigned binary ANY16_U 1 d MAX P Start device for storing the search result of the maximum value 16 bit signed binary ANY16_S_ARRAY Number of elements 3 MAX P _U 16 bit unsigned bin...

Page 925: ... value in the device specified by d Each instruction searches data starting from the device specified by s and detects first the maximum value in the xth point from s and stores x in d 1 and the number of maximum values in d 2 Operation error There is no operation error d Maximum value d 1 Location d 2 Number of maximum values 1234 BIN 5678 BIN 5678 BIN 5214 BIN 5555 BIN n s s 1 s n 2 s n 1 s 2 56...

Page 926: ...D 1 Instruction Execution condition DMAX DMAX_U DMAXP DMAXP_U Operand Description Range Data type Data type label s DMAX P Start device where the search target data is stored 32 bit signed binary ANY32_S 1 DMAX P _U 32 bit unsigned binary ANY32_U 1 d DMAX P Start device for storing the search result of the maximum value 32 bit signed binary ANY32_S_ARRAY Number of elements 4 DMAX P _U 32 bit unsig...

Page 927: ...fied by d and d 1 Each instruction searches data starting from the device specified by s and detects first the maximum value in the xth point from s and stores x in d 2 and the number of maximum values in d 3 Operation error There is no operation error d d 1 Maximum value d 2 Location d 3 Number of maximum values 54321000 BIN 4321000 BIN 3254000 BIN 54321000 BIN 12345678 BIN n 54321000 BIN 1 2 s 1...

Page 928: ...LD 1 Instruction Execution condition MIN MIN_U MINP MINP_U Operand Description Range Data type Data type label s MIN P Start device where the search target data is stored 16 bit signed binary ANY16_S 1 MIN P _U 16 bit unsigned binary ANY16_U 1 d MIN P Start device for storing the search result of the minimum value 16 bit signed binary ANY16_S_ARRAY Number of elements 3 MIN P _U 16 bit unsigned bin...

Page 929: ... value in the device specified by d Each instruction searches data starting from the device specified by s and detects first the minimum value in the xth point from s and stores x in d 1 and the number of minimum values in d 2 Operation error There is no operation error d Minimum value d 1 Location d 2 Number of minimum values 5015 BIN 6192 BIN 5571 BIN 5015 BIN 5571 BIN n s s 1 s n 2 s n 1 s 2 50...

Page 930: ...D 1 Instruction Execution condition DMIN DMIN_U DMINP DMINP_U Operand Description Range Data type Data type label s DMIN P Start device where the search target data is stored 32 bit signed binary ANY32_S 1 DMIN P _U 32 bit unsigned binary ANY32_U 1 d DMIN P Start device for storing the search result of the minimum value 32 bit signed binary ANY32_S_ARRAY Number of elements 4 DMIN P _U 32 bit unsig...

Page 931: ...ces specified by d and d 1 Each instruction searches data starting from the device specified by s and detects first the minimum value in the xth point from s and stores x in d 2 and the number of minimum values in d 3 Operation error There is no operation error d d 1 Minimum value d 2 Location d 3 Number of minimum values 22342001 BIN 37282010 BIN 22342001 BIN 59872019 BIN n 22342001 BIN s 1 s s 7...

Page 932: ...Data type label s1 SORTD Start device of the table data to be sorted 16 bit signed binary ANY16_S 1 SORTD_U 16 bit unsigned binary ANY16_U 1 n Number of sort data 0 to 65535 16 bit unsigned binary ANY16 s2 Number of data to be compared once 0 to 65535 16 bit unsigned binary ANY16 d1 Number of the bit device to be turned on upon completion of sort Bit ANY_BOOL d2 Device used by the system 16 bit si...

Page 933: ...pletion of sorting the device specified by d1 is kept on Turn it off as needed The two points from the device specified by d2 are used by the system at execution of the SORT _U instruction Do not change the two points from the device specified by d2 If they are changed an error may occur Error code 3405H If the value in n is changed during sorting the new number of sort data is used for sorting If...

Page 934: ... Data type label s1 DSORTD Start device of the table data to be sorted 32 bit signed binary ANY32_S 1 DSORTD_U 32 bit unsigned binary ANY32_U 1 n Number of sort data 0 to 65535 16 bit unsigned binary ANY16 s2 Number of data to be compared once 0 to 65535 16 bit unsigned binary ANY16 d1 Number of the bit device to be turned on upon completion of sort Bit ANY_BOOL d2 Device used by the system 16 bit...

Page 935: ...d by d1 is kept on Turn it off as needed The two points from the device specified by d2 are used by the system at execution of the DSORTD _U instruction Do not change the two points from the device specified by d2 If they are changed an error may occur Error code 3405H If the value in n is changed during sorting the new number of sort data is used for sorting If the execution command is turned off...

Page 936: ... WSUM WSUM_U WSUMP WSUMP_U Operand Description Range Data type Data type label s WSUM P Start device where the data for calculating the total value are stored 16 bit signed binary ANY16_S 1 WSUM P _U 16 bit unsigned binary ANY16_U 1 d WSUM P Start device for storing the total value 32 bit signed binary ANY32_S WSUM P _U 32 bit unsigned binary ANY32_U n Number of data 0 to 65535 16 bit unsigned bin...

Page 937: ...e instructions add the n points of 16 bit binary data in the device starting from the one specified by s and store the result in the device specified by d Operation error There is no operation error s s 1 s 4 s 5 s 2 s 3 4444 BIN 3333 BIN 1234 BIN 5426 BIN 329 BIN 10000 BIN n 13914 BIN d 1 d ...

Page 938: ...ition DWSUM DWSUM_U DWSUMP DWSUMP_U Operand Description Range Data type Data type label s DWSUM P Start device where the data for calculating the total value are stored 32 bit signed binary ANY32_S 1 DWSUM P _U 32 bit unsigned binary ANY32_U 1 d DWSUM P Start device for storing the total value 64 bit signed binary ANY32_ARRAY Number of elements 2 DWSUM P _U 64 bit unsigned binary n Number of data ...

Page 939: ...d the n points of 32 bit binary data in the device starting from the one specified by s and store the result in the device specified by d Operation error There is no operation error s 1 s s 3 s 2 s 9 s 8 s 5 s 4 s 7 s 6 32767000 BIN 6000 BIN 35392000 BIN 11870000 BIN 12345000 BIN n d 1 d d 2 d 3 68640000 BIN ...

Page 940: ... condition MEAN MEAN_U MEANP MEANP_U Operand Description Range Data type Data type label s MEAN P Start device where the data for calculating the average value are stored 16 bit signed binary ANY16_S 1 MEAN P _U 16 bit unsigned binary ANY16_U 1 d MEAN P Device for storing the mean value 16 bit signed binary ANY16_S MEAN P _U 16 bit unsigned binary ANY16_U n Number of data or the device number wher...

Page 941: ...oints of 16 bit binary data in the devices starting from the one specified by s and stores the average value in the device specified by d If the calculation result is not an integer the first decimal place is rounded down When n is 0 the processing is not performed Operation error There is no operation error 1 Mean value n d s s 1 s 2 s n 1 1 ...

Page 942: ...tion DMEAN DMEAN_U DMEANP DMEANP_U Operand Description Range Data type Data type label s DMEAN P Start device where the data for calculating the average value are stored 32 bit signed binary ANY32_S 1 DMEAN P _U 32 bit unsigned binary ANY32_U 1 d DMEAN P Start device for storing the average value 32 bit signed binary ANY32_S DMEAN P _U 32 bit unsigned binary ANY32_U n Number of data or the device ...

Page 943: ...32 bit binary data in the devices starting from the one specified by s and stores the average value in the device specified by d If the calculation result is not an integer the first decimal place is rounded down When n is 0 the processing is not performed Operation error There is no operation error 1 Mean value n d 1 d s 1 s s 3 s 2 s 2 n 1 s 2 n 2 1 ...

Page 944: ...mal places are rounded down s d Operation error There is no operation error The RnCPU and RnENCPU with firmware version 17 or later support these instructions Use an engineering tool with version 1 020W or later Ladder ST 1 ENO SQRTP EN s d FBD LD 1 Instruction Execution condition SQRT SQRTP Operand Description Range Data type Data type label s Device where the data whose square root is to be calc...

Page 945: ... RnCPU and RnENCPU with firmware version 17 or later support these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO DSQRT EN s d ENO DSQRTP EN s d FBD LD Instruction Execution condition DSQRT DSQRTP Operand Description Range Data type Data type label s Device where the data whose square root is to be calculated is stored 0 to 4294967295 32 bit unsigned binary ANY32 d...

Page 946: ...n Execution condition CRC CRCP Operand Description Range Data type Data type label s Start device where the target data of CRC value generation is stored 16 bit signed binary ANY16 d Device where the generated CRC value is stored 16 bit signed binary ANY16 n Number of 8 bit data unit byte for which the CRC value is generated or the device storing the number of 8 bit data unit byte 0 to 65535 16 bi...

Page 947: ...y s The operation result is stored to 16 bits in one device specified in d Ex When n 6 In 16 bit conversion mode the six bytes in the following shaded portion become an operation target The CRC value is determined as A57BH and therefore A57BH is stored in the device specified by d 8 bit conversion mode while SM772 is ON CRC operation is executed only for lower 8 bits lower byte of the device speci...

Page 948: ...d construct a database Execution condition Setting data Descriptions ranges and data types Ladder ST ENO DBIMPORT EN s d1 d2 ENO DBIMPORTP EN s d1 d2 FBD LD Instruction Execution condition DBIMPORT DBIMPORTP Operand Description Range Data type Data type label s Start device for storing the Unicode text file name Example 2 database1 recipe recipe_db txt Within 255 characters Unicode string ANYSTRIN...

Page 949: ...nstruction has been completed with an error while the database access instruction is being executed When To Use or Not to Use the Built in Database Access is set to Use in the module parameter of the CPU module the DBIMPORT P instruction cannot be executed while SM1498 CPU module database start up flag is off 1 If executed no processing is performed When DBIMPORT P instruction is executed if a dat...

Page 950: ...The database name contains an invalid character The total number of characters used in the database name specified in the Unicode text file and those used in the folder path including the drive path character specified by s exceeds 128 The database that is already open exists and the DBIMPORT P instruction is executed The number of characters on the comment line exceeds the maximum number A charac...

Page 951: ...se folder path Example 2 database1 recipe Within 128 characters Unicode string ANYSTRING_DOUBLE d1 Completion device start device that turns on one scan upon completion of instruction d1 0 Completion signal d1 1 Error completion signal Bit ANYBIT_ARRAY Number of elements 2 d2 Completion status 0000 Normal completion Other than 0000 Error completion error code Word ANY16 EN Execution condition Bit ...

Page 952: ...e instruction has been completed with an error while the database access instruction is being executed When To Use or Not to Use the Built in Database Access is set to Use in the module parameter of the CPU module the DBEXPORT P instruction cannot be executed while SM1498 CPU module database start up flag is off 1 If executed no processing is performed During transaction the DBEXPORT P instruction...

Page 953: ...Operation error For the error code stored in the completion status of the operand refer to the following Page 986 Error codes related to database access instructions Error code SD0 Description 2840H A numerical value other than 2 is specified for the drive number in s ...

Page 954: ...thin 128 characters Unicode string ANYSTRING_DOUBLE d1 Database identification number 1 to 4 16 bit signed binary ANY16 d2 Completion device start device that turns on one scan upon completion of instruction d2 0 Completion signal d2 1 Error completion signal Bit ANYBIT_ARRAY Number of elements 2 d3 Completion status 0000 Normal completion Other than 0000 Error completion error code Word ANY16 EN ...

Page 955: ... the DBOPEN P instruction cannot be executed while SM1498 CPU module database start up flag is off 1 If executed no processing is performed 1 For the firmware versions supporting SM753 and SM1498 refer to the list of special relay areas MELSEC iQ R CPU Module User s Manual Application Precautions In the following cases the error termination signal in d2 1 is turned on and an error code is stored i...

Page 956: ...er 1 to 4 16 bit signed binary ANY16 d1 Completion device start device that turns on one scan upon completion of instruction d1 0 Completion signal d1 1 Error completion signal Bit ANYBIT_ARRAY Number of elements 2 d2 Completion status 0000 Normal completion Other than 0000 Error completion error code Word ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double ...

Page 957: ...o Use the Built in Database Access is set to Use in the module parameter of the CPU module the DBCLOSE P instruction cannot be executed while SM1498 CPU module database start up flag is off 1 If executed no processing is performed 1 For the firmware versions supporting SM753 and SM1498 refer to the list of special relay areas MELSEC iQ R CPU Module User s Manual Application Precautions In the foll...

Page 958: ...SERTP Operand Description Range Data type Data type label s1 Database identification number 1 to 4 16 bit signed binary ANY16 s2 Start device for storing the database table names 1 Unicode string ANYSTRING_DOUBLE s3 Start device for storing the database field names 1 Word ANY16 2 s4 Start device for storing insertion data Word ANY16 2 d1 Completion device start device that turns on one scan upon c...

Page 959: ... value equal to or less than the number of fields of the table specified in s2 If 0 is specified all fields of the table are subject to output 1 0 to 128 2 User 1 to Field name Specify the name of each field Specify field names each fixed to 32 characters by the number of fields with Unicode character strings For the name less than 32 characters the character string should be right justified and f...

Page 960: ...ze Specify the size of one record Depends on the data type User 2 to Value to be added Specify the data for the number of fields specified by s3 for the number of records m specified by s4 0 Depends on the data type User Data type of field Data size unit word BOOL 1 WORD 1 DWORD 2 INT 1 DINT 2 REAL 2 LREAL 4 STRING Even number of characters Number of characters 2 1 Odd number of characters Roundin...

Page 961: ...ID Product Size x Size y Size z Product information table proInfo AAA1 BBB2 CCC3 WORD type WSTRING type 15 characters WORD type WORD type WORD type Database DBINSERT D0 proInfo D100 0005H D100 D300 M0 D500 D300 0001H D301 K20 1 D302 0003H 2 D303 3 D306 3 D307 0000H D318 0000H D319 K40 4 D320 K80 5 D321 K40 6 D101 I D132 0000H D133 P D140 0000H D164 0000H r o d u c t D165 S D172 0000H D196 0000H D2...

Page 962: ...ompletion status in the device d2 The following figure shows the operation of the completion device at completion of the DBINSERT P instruction SM753 File being accessed turns on while the DBINSERT P instruction is executed 2 While SM753 is on the DBINSERT P instruction cannot be executed If executed no processing is performed However the instruction has been completed with an error while the data...

Page 963: ...ith firmware version earlier than 28 The table name specified by s2 does not exist The number of characters of the table name specified by s2 exceeds 32 An out of range value is specified in s3 for the number of fields to be added An out of range field name is set in the field name specified by s3 1 to s3 An out of range value is specified in s4 for the number of records to be added Database inser...

Page 964: ...e label s1 Database identification number 1 to 4 16 bit signed binary ANY16 s2 Start device for storing the table name of the database table to be updated 1 Unicode string ANYSTRING_DOUBLE s3 Start device for storing the field name of the database to be updated 1 Word ANY16 2 s4 Start device for storing the updated data Word ANY16 2 s5 Start device for storing the update conditions a maximum of tw...

Page 965: ...ption Setting range Set by 0 Number of fields Specify the number of fields to be updated 1 to 128 1 User 1 to Field name Specify the name of each field Specify field names each fixed to 32 characters by the number of fields with Unicode character strings For the name less than 32 characters the character string should be right justified and filled with 0000H to become a 32 character string The las...

Page 966: ... Other than the determination value 3 Smaller than the determination value 4 Greater than the determination value 5 Equal to or less than the determination value 6 Equal to or greater than the determination value 7 is NULL NULL no value is set 8 is not NULL Not NULL a value is set Logical operator setting value 3 Set the operator with an adjacent condition 0 No operator 1 AND 2 OR When one update ...

Page 967: ...g value is used Set K0 6 Set K2 for the determination value ID 0001H 0002H 0003H Output 32 35 38 Product Production result table proReport AAA1 BBB2 CCC3 Database DBUPDATE D0 proReport D100 0001H D100 D300 D200 M0 D500 D300 0001H 1 2 3 D D304 0000H D333 0000H D334 K1 4 D335 K0 5 D336 K2 6 D101 O p u D107 0000H D132 0000H t u t D200 0001H D202 K35 I 0000H The program updates the information of ID 0...

Page 968: ...updated data is New Product1 the following occurs When the DBUPDATE P instruction updates the table recipeA record that matches field1 2 and field1 3 of the update condition in which the update target field name is 2 and the updated data is New Product1 the following occurs Upon successful completion the completion signal in the completion device d1 0 is turned on and 0 is stored as the completion...

Page 969: ... s1 A database built or operated with a programmable controller CPU with firmware version 28 or later is specified by s1 for a programmable controller CPU with firmware version earlier than 28 The table name specified by s2 does not exist The number of characters of the table name specified by s2 exceeds 32 An out of range value is specified in s3 for the number of fields to be updated An out of r...

Page 970: ...ype label s1 Database identification number 1 to 4 16 bit signed binary ANY16 s2 Start device for storing the table name of the database to be searched 1 Unicode string ANYSTRING_DOUBLE s3 Start device for storing the field name of the database to be searched 1 Word ANY16 2 s4 Start device for storing the search conditions a maximum of two conditions Word ANY16 2 d1 Search result Word ANY16 2 d2 C...

Page 971: ... by 0 Number of fields Specify the number of fields to be searched If 0 is specified all fields of the table are subject to output 0 to 128 1 User 1 to Field name Specify each search target field name with 32 characters The last address in s3 varies according to the number of fields 33 n Specify field names each fixed to 32 characters by the number of fields with Unicode character strings For the ...

Page 972: ...termination value Field name 1 Specify field names each fixed to 32 characters by the number of fields with Unicode character strings For the name less than 32 characters the character string should be right justified and filled with 0000H to become a 32 character string Condition number 2 Set the number indicating a search condition 1 Equal to the determination value 2 Other than the determinatio...

Page 973: ...utput value The value of the records that meet the condition set in s4 is output Records are output right justified in the range from d1 to d1 maximum output size and any record that does not fit in the range is not output Depends on the data type System s4 s4 1 s4 2 s4 3 s4 38 s4 36 s4 37 s4 71 s4 72 s4 73 b15 b0 Condition number Logical operator setting value Determination value Condition number...

Page 974: ... value 9 K60 is output in WORD type 1 word ID 0001H 0002H Size x 80 40 Size y 100 90 Size z 60 40 Product Product information table proInfo AAA1 BBB2 Database DBSELECT D0 D10 D100 D300 D200 M0 D500 D200 0001H 1 D201 0000H 2 D202 K20 3 D203 D204 K0 4 5 D D206 0000H D235 0000H D236 K1 6 D237 K0 7 D238 K20 8 D10 p I n o D17 0000H D42 0000H f r o D100 0001H I D101 S D108 0000H i z e z D132 0000H 9 D30...

Page 975: ...ting value is used Set K0 12 Set K3 for the determination value 13 K40 is output in WORD type 1 word ID 0001H 0002H Size x 80 40 Size y 100 90 Size z 60 40 0003H 60 110 50 Product Product information table proInfo AAA1 BBB2 CCC3 Database DBSELECT D0 D10 D100 D300 D200 M0 D500 D200 0001H 1 D201 0001H 2 D202 K20 3 D203 D204 K0 4 5 D D206 0000H D235 0000H D236 K4 6 D237 K1 7 D238 K1 8 D270 0000H D271...

Page 976: ... the operation of the completion device at completion of the DBSELECT P instruction SM753 File being accessed turns on while the DBSELECT P instruction is executed 1 While SM753 is on the DBSELECT P instruction cannot be executed If executed no processing is performed However the instruction has been completed with an error while the database access instruction is being executed When To Use or Not...

Page 977: ... the maximum value An out of range field name is set in the field name specified by s3 1 to s3 The number of records to be searched according to s4 exceeds the maximum value The size of the field to be searched according to s4 is outside the range Database selection processing failed The number of records output to d1 exceeds the number specified by s4 The size of the records output to d1 exceeds ...

Page 978: ...tion condition DBDELETE DBDELETEP Operand Description Range Data type Data type label s1 Database identification number 1 to 4 16 bit signed binary ANY16 s2 Start device for storing the table name of the database to be deleted 1 Unicode string ANYSTRING_DOUBLE s3 Start device for storing the deletion conditions a maximum of two conditions Word ANY16 2 d1 Completion device start device that turns o...

Page 979: ...ers fixed For the name less than 32 characters the character string should be right justified and filled with 0000H to become a 32 character string Condition number 2 Set the number indicating a deletion condition 1 Equal to the determination value 2 Other than the determination value 3 Smaller than the determination value 4 Greater than the determination value 5 Equal to or less than the determin...

Page 980: ...ed turns on while the DBDELETE P instruction is executed 2 While SM753 is on the DBDELETE P instruction cannot be executed If executed no processing is performed However the instruction has been completed with an error while the database access instruction is being executed When To Use or Not to Use the Built in Database Access is set to Use in the module parameter of the CPU module the DBDELETE P...

Page 981: ...han 28 The table name to be deleted according to s2 does not exist The number of characters of the table name specified by s2 exceeds 32 An out of range value is specified in s3 for the deletion condition Database deletion processing failed An out of range value is specified in s3 for the logical operator setting value The logical operator setting value specified by s3 35 is 1 or 2 and that in s3 ...

Page 982: ...bel s Database identification number 1 to 4 16 bit signed binary ANY16 d1 Completion device start device that turns on one scan upon completion of instruction d1 0 Completion signal d1 1 Error completion signal Bit ANYBIT_ARRAY Number of elements 2 d2 Completion status 0000 Normal completion Other than 0000 Error completion error code Word ANY16 EN Execution condition Bit BOOL ENO Execution result...

Page 983: ...een completed with an error while the database access instruction is being executed When To Use or Not to Use the Built in Database Access is set to Use in the module parameter of the CPU module the DBTRANS P instruction cannot be executed while SM1498 CPU module database start up flag is off 1 If executed no processing is performed 1 For the firmware versions supporting SM753 and SM1498 refer to ...

Page 984: ...l s Database identification number 1 to 4 16 bit signed binary ANY16 d1 Completion device start device that turns on one scan upon completion of instruction d1 0 Completion signal d1 1 Error completion signal Bit ANYBIT_ARRAY Number of elements 2 d2 Completion status 0000 Normal completion Other than 0000 Error completion error code Word ANY16 EN Execution condition Bit BOOL ENO Execution result B...

Page 985: ...ed no processing is performed 1 For the firmware versions supporting SM753 and SM1498 refer to the list of special relay areas MELSEC iQ R CPU Module User s Manual Application Precautions In the following cases the error completion signal in d1 1 is turned on and an error code is stored as the completion status in the device d2 The DBCOMMIT P instruction is executed during execution of the databas...

Page 986: ...Database identification number 1 to 4 16 bit signed binary ANY16 d1 Completion device start device that turns on one scan upon completion of instruction d1 0 Completion signal d1 1 Error completion signal Bit ANYBIT_ARRAY Number of elements 2 d2 Completion status 0000 Normal completion Other than 0000 Error completion error code Word ANY16 EN Execution condition Bit BOOL ENO Execution result Bit B...

Page 987: ...U module database start up flag is off 1 If executed no processing is performed 1 For the firmware versions supporting SM753 and SM1498 refer to the list of special relay areas MELSEC iQ R CPU Module User s Manual Application Precautions In the following cases the error completion signal in d1 1 is turned on and an error code is stored as the completion status in the device d2 The DBROLBAK P instr...

Page 988: ...ase related file 094CH The field name contains an invalid character Do not include any invalid character in the field name 094DH The specified field name is duplicated Check for duplicated field names in Unicode text files or instruction arguments If any correct it to prevent duplication 094EH A non existent field is specified Check that the specified field exists in the table 0950H An invalid cha...

Page 989: ...IMPORT P instruction on a programmable controller CPU with firmware version earlier than 28 using the output Unicode text file 09D7H BOOL data is not specified Specify BOOL data 09F9H A non existent field is specified to add a record Check the table structure 0A0AH A prohibited field name is specified Specify another field name 0A16H An attempt was made to add a record with a null value set in the...

Page 990: ...e data size of each field matches the size of the data to be added or updated 1013H A data type which is not supported is specified Check the data type of the Unicode text 1014H Another database is opened during execution of the transaction The DBEXPORT P instruction is executed during transaction Do not open a database newly during execution of the transaction Execute the DBEXPORT P instruction a...

Page 991: ...that set in another row Check the Unicode text file to verify that the number of columns set in the field row number of fields matches that set in another row 200DH The number of indexes in the Unicode text file exceeds the maximum number Check that the number of indexes in the Unicode text file does not exceed the number of table fields 200EH The number of characters of the main key name in the U...

Page 992: ...ule or reset it or the error database check file 2 CPUDB ErrorDB txt exists and it lists a database which resides under other than the CPUDB folder or its subfolder delete the dbmaintainpath txt file on the MELPRJ DBASYS folder in the SD memory card delete all database folders excluding the CPUDB folder and then create a new database using the DBIMPORT P instruction Others The character code of th...

Page 993: ...NO RSETP EN s FBD LD Instruction Execution condition RSET RSETP Operand Description Range Data type Data type label s Block number data to be changed or the device number where the block number data is stored 0 to 32767 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY...

Page 994: ... are those linked to the new block number Precautions For the restrictions of the file register refer to the following Page 65 Restrictions on using file registers Operation error Error code SD0 Description 2820H The specified file register does not exist 3405H The block number in the device specified by s does not exist R0 R32767 R32767 R0 R32767 R0 s Execution of the instruction Block number set...

Page 995: ...FILE File name Instruction Execution condition QDRSET QDRSETP Operand Description Range Data type Data type label File name String data of drive number file name of the file register to be set or the start device where the string data is stored Example 1 ABC Unicode string ANYSTRING_DOUB LE EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specific...

Page 996: ...se the file name specified by the QDRSET P instruction even when the CPU module switch is changed from STOP to RUN execute the QDRSET P instruction using SM402 that triggers one scan when the switch is changed from STOP to RUN When a file register is specified for the refresh device do not use the QDRSET P instruction to change the file name of the file register Precautions Even when the NULL code...

Page 997: ...nstruction Execution condition ZRRDB ZRRDBP Operand Description Range Data type Data type label s Serial byte number of the file register to be read 0 to 4294967295 32 bit unsigned binary ANY32 d Start number of the device for storing the data that has been read 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specificat...

Page 998: ...peration error 1 Data areas when an odd number is specified 2 Data areas when an even number is specified 1 Specifying the read target area 1 Specifying the read target area Error code SD0 Description 2820H The specified device number serial byte number is out of range d b15 b8 b7 b0 00H s ZR0 ZR32767 ZR32768 ZR65535 ZR65536 Data read from the file register Serial byte number Specifying the read t...

Page 999: ...truction Execution condition ZRWRB ZRWRBP Operand Description Range Data type Data type label s1 Serial byte number of the file register to be written 0 to 4294967295 32 bit unsigned binary ANY32 s2 Device number where the write data is stored 32768 to 32767 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification ...

Page 1000: ...ber is specified 2 Data areas when an even number is specified 1 Specifying the write target area 2 Ignored 1 Specifying the write target area 2 Ignored Error code SD0 Description 2820H The specified device number serial byte number is out of range s2 b15 b8 b7 b0 s1 ZR0 ZR32767 ZR32768 ZR65535 ZR65536 Serial byte number Specifying the write target area Writing data to the file register File regis...

Page 1001: ...DRSET ADRSETP Operand Description Range Data type Data type label s Number of the device from which the indirect address is to be read Device name ANY_ELEMENTARY d Start number of the device for storing the indirect address of the device specified by s 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Consta...

Page 1002: ... The data address of W100 stored in D100 and D101 is specified 3 1234 is written to W100 Label Description Global label specifying a device When using it as an indirect address use the indirect specification of the device specified in the global label Example of ST ADRSET TRUE intVar gvAddr Read the intVar indirect address to gvAddr INC TRUE D0 Use the indirect specification of device D0 specified...

Page 1003: ...ERDP EN d FBD LD Instruction Execution condition DATERD DATERDP Operand Description Range Data type Data type label d Start device for storing the clock data that has been read 16 bit signed binary ANY16_ARRAY Number of elements 7 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD...

Page 1004: ... specified by d is a 4 digit year Day of week stored in the device specified by d 6 is a number from 0 to 6 corresponding to Sunday to Saturday Data is automatically corrected in leap years Operation error There is no operation error Data d d 1 d 2 d 3 d 4 d 5 d 6 Clock element Year Month Day Hour Minute Second Day of week Setting range 1980 to 2079 1 to 12 1 to 31 0 to 23 0 to 59 0 to 59 0 to 6 D...

Page 1005: ...tion condition DATEWR DATEWRP Operand Description Range Data type Data type label s Start device where the clock data to be written to the clock element is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 7 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J...

Page 1006: ... 4 Set the second data in the range from 0 to 59 in the device specified by s 5 Set the day of week in the range from 0 to 6 corresponding to Sunday to Saturday in the device specified by s 6 Operation error When clock data is changed clock setting event code 24000 is saved to the event history That is clock setting is saved to the event history when this instruction is executed Data d d 1 d 2 d 3...

Page 1007: ...ce where the augend clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 3 s2 Start device where the addend time clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 3 d Start device for storing the addition result time clock data 16 bit signed binary ANY16_ARRAY Number of elements 3 EN Execution condit...

Page 1008: ...are subtracted from the resultant time to produce the operation result For example when 20 20 20 is added to 14 20 30 the operation result is 10 40 50 rather than 34 40 50 Operation error Error code SD0 Description 3405H The data in the device specified by s1 or s2 is out of range s1 s1 1 s1 2 s2 s2 1 s2 2 d d 1 d 2 hour minute second hour minute second hour minute second 0 to 23 0 to 59 0 to 59 0...

Page 1009: ... device where minuend clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 3 s2 Start device where the subtrahend time clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 3 d Start device for storing the subtraction result time clock data 16 bit signed binary ANY16_ARRAY Number of elements 3 EN Executi...

Page 1010: ...ve value 24 hours are added to the resultant time to produce the operation result For example when 10 42 12 is subtracted from 4 50 32 the operation result is 18 8 20 rather than 6 8 20 Operation error Error code SD0 Description 3405H The data in the device specified by s1 or s2 is out of range s1 s1 1 s1 2 s2 s2 1 s2 2 d d 1 d 2 hour minute second hour minute second hour minute second 0 to 23 0 t...

Page 1011: ...IME2SECP Operand Description Range Data type Data type label s Start device where the time data to be converted is stored 16 bit signed binary ANY16_ARRAY Number of elements 3 d Start device for storing the clock data after conversion 32 bit signed binary ANY32 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L ...

Page 1012: ...ice number specified by s and later to second data and store the operation result in the device specified by d Ex 4 29 31 is specified in s Operation error Error code SD0 Description 3405H The data in the device specified s is out of range s s 1 s 2 d 1 d hour minute second second 0 to 23 0 to 59 0 to 59 d 1 d 16171 s s 1 s 2 4 29 31 ...

Page 1013: ...2TIMEP Operand Description Range Data type Data type label s Start device where the time data to be converted is stored 0 to 86399 32 bit signed binary ANY32 d Start device for storing the clock data after conversion 16 bit signed binary ANY16_ARRAY Number of elements 3 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others...

Page 1014: ...y s and later to time data hour minute second and store the operation result in the device specified by d and later Ex 45325 seconds are specified in s Operation error Error code SD0 Description 3405H The data in the device specified s is out of range d d 1 d 2 s 1 s hour minute second second 0 to 23 0 to 86399 0 to 59 0 to 59 s 1 s 45325 d d 1 d 2 12 35 25 ...

Page 1015: ...s2 s3 ENO ANDDT_ EN s1 s2 s3 ENO ORDT_ EN s1 s2 s3 is replaced by any of the following EQ NE GT LE LT GE 2 FBD LD is replaced by a combination of LDDT_ ANDDT_ or ORDT_ and EQ NE GT LE LT or GE 2 Instruction Execution condition LDDT ANDDT ORDT Every scan Operand Description Range Data type Data type label s1 Start device where the data to be compared is stored 16 bit signed binary ANY_DT 1 s2 Start...

Page 1016: ...with the date data in the device specified by s2 in accordance with the conditions set by s3 Devices are used as a normally open contact 1 Relational operator 2 Comparison result Comparing the specified date data with the current date These instructions compare the date data in the device specified by s1 with the current date data in accordance with the conditions set by s3 Devices are used as a n...

Page 1017: ...wing table lists the comparison operation results of each instruction Ex The date data A B and C are compared s3 value when comparing two specified date data s3 value when comparing the specified date data with the current date Comparison target Description 0001H 8001H Day Only data in the device specified by s1 2 is compared 0002H 8002H Month Only data in the device specified by s1 1 is compared ...

Page 1018: ...cution condition Operation error There is no operation error Comparison target data Condition 1 A B B C A C Day Continuity Non continuity Non continuity Month Non continuity Continuity Non continuity Month day Non continuity Continuity Non continuity Year Continuity Continuity Continuity Year day Continuity Continuity Continuity Year month Continuity Continuity Continuity Year month day Continuity...

Page 1019: ..._ EN s1 s2 s3 ENO ANDTM_ EN s1 s2 s3 ENO ORTM_ EN s1 s2 s3 is replaced by any of the following EQ NE GT LE LT GE 2 FBD LD is replaced by a combination of LDTM_ ANDTM_ or ORTM_ and EQ NE GT LE LT or GE 2 Instruction Execution condition LDTM ANDTM ORTM Every scan Operand Description Range Data type Data type label s1 Start device where the data to be compared is stored 16 bit signed binary ANY_TM 1 ...

Page 1020: ...e time data hour minute second in the device specified by s2 in accordance with the conditions set by s3 Devices are used as a normally open contact 1 Relational operator 2 Comparison result Comparing the specified time data with the current time data These instructions compare the time data in the device specified by s1 with the current time data in accordance with the conditions set by s3 Device...

Page 1021: ...tion results of each instruction Ex The time data A B and C are compared s3 value when comparing two specified time data s3 value when comparing with current time data Comparison target time Description 0001H 8001H Second Only data in the device specified by s1 2 is compared 0002H 8002H Minute Only data in the device specified by s1 1 is compared 0003H 8003H Minute second Data in the device areas ...

Page 1022: ...hich is always on for EN If the ORTM_ instruction is used in the program written in FBD LD and EN is set to TRUE ENO turns on EN will not be an execution condition Operation error There is no operation error Comparison target data Condition 1 A B B C A C Second Continuity Non continuity Non continuity Minute Non continuity Continuity Non continuity Minute second Non continuity Continuity Non conti...

Page 1023: ...struction Execution condition TCMP TCMPP Operand Description Range Data type Data type label s1 Start device for storing the time data hour to be compared 0 to 23 16 bit signed binary ANY16 s2 Start device for storing the time data minute to be compared 0 to 59 16 bit signed binary ANY16 s3 Start device for storing the time data second to be compared 0 to 59 16 bit signed binary ANY16 s4 Start dev...

Page 1024: ... Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 1 s2 1 s3 1 s4 d 2 s1 hour s2 minute s3 second s4 hour s4 1 minute s4 2 second Error code SD0 Description 3405H The value specified by s1 and s4 is outside the following range 0 to 23 The value specified by s2 s3 s4 1 and s4 2 is outside t...

Page 1025: ...bel s1 Start device for storing the lower limit value of the time data hour minute second to be compared Refer to the function details 16 bit signed binary ANY16_ARRAY Number of elements 3 s2 Start device for storing the upper limit value of the time data hour minute second to be compared Refer to the function details 16 bit signed binary ANY16_ARRAY Number of elements 3 s3 Start device for storin...

Page 1026: ...2 If s1 is set to a value greater than s2 s2 is treated as the same value as s1 Operation error Device Clock data Data range s1 s2 s3 Hour 0 to 23 s1 1 s2 1 s3 1 Minute 0 to 59 s1 2 s2 2 s3 2 Second 0 to 59 Error code SD0 Description 3405H The value specified by s1 s2 or s3 is outside the following range 0 to 23 The value specified by s1 1 s2 1 s3 1 s1 2 s2 2 or s3 2 is outside the following range...

Page 1027: ...LD Instruction Execution condition S DATERD SP DATERD Operand Description Range Data type Data type label d Start device for storing the clock data that has been read 16 bit signed binary ANY16_ARRAY Number of elements 8 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R Z...

Page 1028: ... store it in the device even when incorrect click data is set in the CPU module Example February 30 When setting clock data with the DATEWR P instruction or engineering tool be careful not to set incorrect clock data When millisecond clock data is read the maximum error is 2ms This error means the difference between the data stored in clock elements in the CPU module and the data read by the S P D...

Page 1029: ... Start device where the augend clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 5 s2 Start device where the addend time clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 5 d Start device for storing the addition result time clock data 16 bit signed binary ANY16_ARRAY Number of elements 5 EN Execu...

Page 1030: ...nversion When clock data is read by the S P DATERD instruction day of week is inserted between second and millisecond If the S P DATE instruction is used to read clock data the data can be directly used for addition since it does not perform calculation for the day of week Operation error Error code SD0 Description 3405H The data in the device specified by s1 or s2 is out of range s1 s1 1 s1 2 s1 ...

Page 1031: ...el s1 Start device where minuend clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 5 s2 Start device where the subtrahend time clock data is stored Refer to Processing details 16 bit signed binary ANY16_ARRAY Number of elements 5 d Start device for storing the subtraction result time clock data 16 bit signed binary ANY16_ARRAY Number of elements 5...

Page 1032: ...ted without conversion When clock data is read by the S P DATERD instruction day of week is inserted between second and millisecond If the S P DATE instruction is used to read clock data the data can be directly used for subtraction since it does not perform calculation for the day of week Operation error Error code SD0 Description 3405H The data in the device specified by s1 or s2 is out of range...

Page 1033: ... condition DUTY Operand Description Range Data type Data type label n1 Number of scans during which the clock is turned on 0 to 65535 16 bit unsigned binary ANY16 n2 Number of scans during which the clock is turned off 0 to 65535 16 bit unsigned binary ANY16 d Special relay device number of user timing clock to be operated SM420 to SM424 Bit ANY_BOOL 1 EN Execution condition Bit BOOL ENO Execution...

Page 1034: ...ses SM420 to SM424 When 0 is specified in n1 and n2 is equal to or greater than 0 SM420 to SM424 stay off When n1 is greater than 0 and n2 is 0 SM420 to SM424 stay on When the DUTY instruction is executed the data specified by n1 n2 and d is stored in the system and the timing pulses are turned on or off by the END processing Operation error n1 n1 scans n2 n2 scans Error code SD0 Description 2820H...

Page 1035: ...ge Data type Data type label s1 Device for storing the current value measured unit 100ms 16 bit signed binary ANY16 s2 Set value for measurement or the device where the set value for measurement is stored unit 100ms 0 to 32767 16 bit signed binary ANY16 d Device to be turned on at time up Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indire...

Page 1036: ...cution command The current value in the device specified by s1 and the on state of the device specified by d are retained even after the execution command turns off The current value measured is stored in units of 100ms Set the measurement time in increments of 100ms If 0 is specified in s2 the current value in the device specified by s1 is cleared to 0 and the device specified by d is turned off ...

Page 1037: ...on 1 020W or later Ladder ST ENO HOURM EN s d1 d2 FBD LD Instruction Execution condition HOURM Operand Description Range Data type Data type label s Time after which the alarm d2 is set to on unit hour 0 to 32767 16 bit signed binary ANY16 d1 Device where the measured current value is stored 16 bit signed binary ANY16_ARRAY Number of elements 2 d2 Device to be turned on when a timeout occurs alarm...

Page 1038: ... reaches the maximum value 3599 the measurement is stopped This instruction operates even if a negative value is set in the device specified by d1 Changing clock data including time adjustment by the daylight saving time function does not affect the operation of the HOURM instruction Precautions In cases such as measuring the ON time from initial value or continuing to the measurement even after t...

Page 1039: ...W or later Ladder ST ENO DHOURM EN s d1 d2 FBD LD Instruction Execution condition DHOURM Operand Description Range Data type Data type label s Time after which the alarm d2 is set to on unit hour 0 to 2147483647 32 bit signed binary ANY32 d1 Device where the measured current value is stored 32 bit signed binary ANY32_ARRAY Number of elements 2 d2 Device to be turned on when a timeout occurs alarm ...

Page 1040: ...mum value 2147483647 and also d1 2 reached reaches the maximum value 3599 the measurement is stopped This instruction operates even if a negative value is set in the device specified by d1 Changing clock data including time adjustment by the daylight saving time function does not affect the operation of the DHOURM instruction Precautions In cases such as measuring the ON time from initial value or...

Page 1041: ...s 1 Only X and Y can be used Ladder ST ENO RFS EN s n ENO RFSP EN s n FBD LD Instruction Execution condition RFS RFSP Operand Description Range Data type Data type label s Start device to be refreshed Bit ANY_BOOL 1 n Number of refreshed points 1 to 4096 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Co...

Page 1042: ... the I O refresh instruction forcibly refreshes the relevant input X and output Y during program execution and therefore can output pulse signals to the outside during one scan To refresh the input X or output Y in units of points use the direct access input DX or direct access output DY Ex When a program using the RFS instruction is changed to a program using direct access input output Operation ...

Page 1043: ... CC Link IE Field Network Basic 1 Link refresh of the MELSECNET H module Intelligent function module refresh Refresh of multiple CPU system using the CPU buffer memory in END processing Import of input output outside the group of multiple CPU system Device label access service processing communication with the engineering tool GOT or other external devices Description SM775 is off SM775 is on I O ...

Page 1044: ...g is performed by the COM P instruction while an Ethernet device is connected to the Ethernet port the processing time of the instruction may be extended The COM P instruction cannot be used in the interrupt program Operation error There is no operation error 1 I O refresh import of input output of non controlled modules in a multiple CPU system 2 Link refresh of the CC Link module 3 Link refresh ...

Page 1045: ...label J Own station network number 1 to 239 Device name ANY16 U Start I O number first three digits in four digit hexadecimal representation of a module 0H to FFH EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others J U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E J U Link refre...

Page 1046: ...OM P instruction 1 Refresh processing When the scan time of the sequence program of the host station is longer than that of another station the S P ZCOM instruction is used to ensure the import of data from the other station When the S P ZCOM instruction is not used When the S P ZCOM instruction is used When the link scan time is longer than the sequence program scan time using the S P ZCOM instru...

Page 1047: ... d ENO FROMP EN U H s n d ENO DFROM EN U H s n d ENO DFROMP EN U H s n d FBD LD Instruction Execution condition FROM DFROM FROMP DFROMP Operand Description Range Data type Data type label U H Start I O number first three digits in four digit hexadecimal representation of a module or CPU module 0H to FFH 3E0H to 3E3H 16 bit unsigned binary ANY16 s Start address of buffer memory or CPU built in memo...

Page 1048: ...ule name of a CPU module specify the read start I O number as in the following table Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U H s d 1 n 1 Specify K4 or H4 as the start I O number of the read target module CPU module Read start I O number CPU No 1 3E0H CPU No 2 3E1H CPU No 3 3E2H ...

Page 1049: ...specified by s in the module specified by U H or another CPU module If the read data n is 0 no processing is performed An instruction which has been executed will result in non processing if it fails to access the target module because the module is faulty or busy in processing Reading word data from module Reading word data from another CPU module Reading double word data from module Reading doub...

Page 1050: ...uctions can read data from the buffer memory address with a capacity of 64K or less To read data from the buffer memory address with a capacity exceeding 64K use the FROMD P or DFROMD P instruction Page 1054 FROMD P DFROMD P Error code SD0 Description 2820H The module with the I O number specified by U does not have buffer memory 2823H The module with the I O number specified by H does not have bu...

Page 1051: ...n ENO DTO EN U H s1 s2 n ENO DTOP EN U H s1 s2 n FBD LD Instruction Execution condition TO DTO TOP DTOP Operand Description Range Data type Data type label U H Start I O number first three digits in four digit hexadecimal representation of a module or CPU module 0H to FFH 3E0H to 3E3H 16 bit unsigned binary ANY16 s1 Start address of buffer memory or CPU built in memory to which data is to be writt...

Page 1052: ... name of a CPU module specify the read start I O number as in the following table Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U H s1 s2 1 n 1 Specify K4 or H4 as the start I O number of the write target module CPU module Read start I O number CPU No 1 3E0H CPU No 2 3E1H CPU No 3 3E2H ...

Page 1053: ...An instruction which has been executed will result in non processing if it fails to access the target module because the module is faulty or busy in processing Writing word data to a module Writing word data to the host CPU module Writing word data to a module Writing word data to the host CPU module s2 s1 CPU module Buffer memory n points n words s2 s1 n points n words Device label memory CPU buf...

Page 1054: ...2 words from the specified buffer memory address Writing double word data to a module Writing double word data to the host CPU module Writing double word data to a module Writing double word data to the host CPU module s2 s1 n 2 words n 2 points CPU module Buffer memory s2 s1 n 2 words n 2 points Device label memory CPU buffer memory of the host CPU module U H s2 s1 s1 1 0 70000 70000 70000 70000 ...

Page 1055: ...tion The TO P and DTO P instructions can write data to the buffer memory address with a capacity of 64K or less To write data to the buffer memory address with a capacity exceeding 64K use the TOD P or DTOD P instruction Page 1058 TOD P DTOD P Error code SD0 Description 2820H The module with the I O number specified by U does not have buffer memory 2823H The module with the I O number specified by...

Page 1056: ...n d ENO DFROMD EN U H s n d ENO DFROMDP EN U H s n d FBD LD Instruction Execution condition FROMD DFROMD FROMDP DFROMDP Operand Description Range Data type Data type label U H Start I O number first three digits in four digit hexadecimal representation of a module or CPU module 0H to FFH 3E0H to 3E3H 16 bit unsigned binary ANY16 s Buffer memory from which the data is read or the start device where...

Page 1057: ...ule name of a CPU module specify the read start I O number as in the following table Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U H s1 s2 1 n 1 Specify K4 or H4 as the start I O number of the read target module CPU module Read start I O number CPU No 1 3E0H CPU No 2 3E1H CPU No 3 3E2...

Page 1058: ... or busy in processing DFROMD P These instructions read n 2 words of data from the buffer memory address specified by s in the module specified by U H or another CPU module Reading word data from module Reading word data from another CPU module Reading double word data from module Reading double word data from another CPU module s d Buffer memory CPU module n points n words d s n points n words De...

Page 1059: ...sed to write data to the CPU buffer memory MELSEC iQ R CPU Module User s Manual Application The FROMD P and DFROMD P instructions can read data from the buffer memory address with a capacity exceeding 64K Error code SD0 Description 2820H The module with the I O number specified by U does not have buffer memory 2823H The module with the I O number specified by H does not have buffer memory The addr...

Page 1060: ... s2 n ENO DTODP EN U H s1 s2 n FBD LD Instruction Execution condition TOD DTOD TODP DTODP Operand Description Range Data type Data type label U H Start I O number first three digits in four digit hexadecimal representation of a module or CPU module 0H to FFH 3E0H to 3E3H 16 bit unsigned binary ANY16 s1 Buffer memory to which the data is written or the start device where the start address of CPU me...

Page 1061: ...le name of a CPU module specify the read start I O number as in the following table Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U H s1 s2 1 n 1 Specify K4 or H4 as the start I O number of the write target module CPU module Read start I O number CPU No 1 3E0H CPU No 2 3E1H CPU No 3 3E2...

Page 1062: ...n instruction which has been executed will result in non processing if it fails to access the target module because the module is faulty or busy in processing Writing word data to a module Writing word data to the host CPU module Writing word data to a module Writing word data to the host CPU module s2 s1 CPU module Buffer memory n points n words s2 s1 n points n words Device label memory CPU buff...

Page 1063: ... executed will result in non processing if it fails to access the target module because the module is faulty or busy in processing Writing double word data to a module Writing double word data to the host CPU module Writing double word data to a module Writing double word data to the host CPU module s2 s1 n 2 words n 2 points CPU module Buffer memory s2 s1 n 2 words n 2 points Device label memory ...

Page 1064: ...TO P and DTO P instructions can write data to the buffer memory address with a capacity exceeding 64K Error code SD0 Description 2820H The module with the I O number specified by U does not have buffer memory 2823H The module with the I O number specified by H does not have buffer memory The address specified by s1 is outside the range of buffer memory or CPU buffer memory The n points of data sta...

Page 1065: ...ta type label H Start I O number first three digits in four digit hexadecimal representation of a model read target module 0H to FFH 3E0H to 3E3H 16 bit unsigned binary ANY16 d d 0 Instruction execution result d 1 to d 9 Module name Word ANY16_ARRAY Number of elements 10 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Other...

Page 1066: ... setting differs from that of the mounted module the module name held by the mounted module is stored CPU module Input module Output module I O combined module Intelligent function module 1 Specify K4 or H4 as the start I O number of the read target module CPU module Read start I O number CPU No 1 3E0H CPU No 2 3E1H CPU No 3 3E2H CPU No 4 3E3H Condition d 0 d 1 to d 9 The read target module has a ...

Page 1067: ...racter string of the module selected on the Element Selection window for the Module Configuration of the engineering tool is stored Nine words are used The name is stored in ASCII characters 00H is stored in the 18th character If the number of characters is less than 17 00H is stored in the remaining characters A character string consisting of a combination of character string indicating the modul...

Page 1068: ... name The value 0 is stored Indicates that the model name has been read and stored successfully The model name that has been written to the module is stored If the number of characters read is less than 17 the remaining areas and the area for the 18th character are filled with 00Hs 4EH N 1 b15 b8 b7 b0 55H U 5FH _ 36H 6 00H 00H 00H 00H 00H 00H 00H 00H 49H I 50H P 54H T 31H 1 00H 00H D0 D1 D2 D3 D4...

Page 1069: ...condition UNIINFRD UNIINFRDP Operand Description Range Data type Data type label H Start I O number first three digits in four digit hexadecimal representation of an information read target module 0H to FFH 16 bit unsigned binary ANY16 d Start device for storing module information Word ANY16 1 n Number of read data points 0 to 256 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Ex...

Page 1070: ... assignment the status of the mounted module is read For H specify the start I O number of the module whose information is to be read with upper 3 digits when it is represented by 4 hexadecimal digits If an I O number other than the start I O number of the read target module is specified module information in which only the module mount status is on and any other status is off is stored 1 Specify ...

Page 1071: ...10 MELSEC Q series module 011 MELSEC iQ R series module 111 Unknown b9 b10 b11 Group number 000 CPU No 1 control 001 CPU No 2 control 010 CPU No 3 control 011 CPU No 4 control b12 b13 b14 Start of slot 0 Not start of slot 1 Start of slot b15 Module mounted 0 Module not mounted 1 Module mounted 2 d 1 b0 Error 00 Normal 01 Minor error 10 Medium error 11 Major error b1 b2 Module ready 0 Not ready 1 R...

Page 1072: ...ynchronized 9 Fixed to 0 10 Module ready 11 Normal operation no module error 1 A 32 point module is connected in the latter 16 points 2 All 0s because information is stored in D0 and D1 1 All 0s because information is stored in D0 and D1 RX10 RX10 RX10 RJ71EN71 RX10 CPU RX10 0000H 0010H 0020H 0030H 0040H 0060H PW H n d M0 UNIINFRD D0 K2 K4 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 D0 1...

Page 1073: ... mounting status 2 Start of slot 3 CPU No 1 control 4 MELSEC iQ R series module 5 Input module 6 16 point module 1 Module access enabled 2 Fixed to 0 3 Not during online module change 4 Fixed to 0 5 No fuse blown 6 Fixed to 0 7 Fixed to 0 8 Inter module synchronized 9 Fixed to 0 10 Module ready 11 Normal operation no module error Error code SD0 Description 2800H The value set to H is out the range...

Page 1074: ...SP_RTREAD EN s d FBD LD Instruction Execution condition S RTREAD SP RTREAD Operand Description Range Data type Data type label s Transfer destination network number 1 to 239 16 bit signed binary ANY16 d Start device for storing the read data Word ANY16_ARRAY Number of elements 3 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Consta...

Page 1075: ...and later The following figure shows the data stored in the device specified by d and later The specification ranges of relay station number are as follows Operation error Start device Item Range d Relay network number 1 to 239 d 1 Relay station number Refer to the following table d 2 Dummy Network type Specification range MELSECNET H 1 to 64 CC Link IE Controller Network 1 to 120 CC Link IE Field...

Page 1076: ...tion Execution condition S RTWRITE SP RTWRITE Operand Description Range Data type Data type label s1 Transfer destination network number 1 to 239 16 bit signed binary ANY16 s2 Start device where the write data is stored Word ANY16_ARRAY Number of elements 3 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F...

Page 1077: ...r specified by s1 is deleted from parameter Operation error Start device Item Range s2 Relay network number 1 to 239 s2 1 Relay station number Refer to the following table s2 2 Dummy Network type Specification range MELSECNET H 1 to 64 CC Link IE Controller Network 1 to 120 CC Link IE Field Network master station Fixed to 125 CC Link IE Field Network local station 1 to 120 Error code SD0 Descripti...

Page 1078: ... the LOGTRG instruction is executed no processing is performed in the following cases Ladder ST ENO LOGTRG EN s FBD LD Instruction Execution condition LOGTRG Operand Description Range Data type Data type label s Logging setting number 1 to 10 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others ...

Page 1079: ...7 APPLICATION INSTRUCTIONS 7 29 Logging Instructions 1077 7 Operation error Error code SD0 Description 3405H The value set to s is out of the range 1 to 10 ...

Page 1080: ...setting number in the device specified by s If the instruction is executed while buffer data is saved to an SD memory card the execution of the instruction is made to wait until all data is saved completely Operation error Ladder ST ENO LOGTRGR EN s FBD LD Instruction Execution condition LOGTRGR Operand Description Range Data type Data type label s Logging setting number 1 to 10 16 bit signed bina...

Page 1081: ...PU Module User s Manual Application Ladder ST FILE File name ENO PSTOP EN filename ENO PSTOPP EN filename FBD LD FILE File name Instruction Execution condition PSTOP PSTOPP Operand Description Range Data type Data type label file name Character string data of the file name of the program to be changed to a standby type or the start device where the character string data is stored Unicode string AN...

Page 1082: ...on takes precedence even when the execution type is specified in parameter Extension PRG does not need to be specified as a part of file name Only PRG files can be processed by these instructions Operation error For how to change the program execution type refer to the following MELSEC iQ R CPU Module User s Manual Application Error code SD0 Description 2840H The program with the file name specifi...

Page 1083: ...odule User s Manual Application Ladder ST FILE File name ENO POFF EN filename ENO POFFP EN filename FBD LD FILE File name Instruction Execution condition POFF POFFP Operand Description Range Data type Data type label file name File name of the program to be changed to the standby type with output set to off or the device where the file name is stored Unicode string ANYSTRING_DOUBLE EN Execution co...

Page 1084: ...ondition contact set to off A B Program name 1 Specify the program A and execute the POFF instruction 2 The program A is not executed 3 The program A changes to a standby type program The operation results of each coil instruction after the non execution processing will be as follows regardless of the on off state of the condition contact OUT instruction The output is forcibly turned off SET RST S...

Page 1085: ... iQ R CPU Module User s Manual Application Ladder ST FILE File name ENO PSCAN EN filename ENO PSCANP EN filename FBD LD FILE File name Instruction Execution condition PSCAN PSCANP Operand Description Range Data type Data type label file name File name of the program to be changed to a scan execution type or the start device where the file name is stored Unicode string ANYSTRING_DOUBLE EN Execution...

Page 1086: ... need to be specified as a part of file name Only PRG files can be processed by these instructions Operation error For how to change the program execution type refer to the following MELSEC iQ R CPU Module User s Manual Application For the operation when the SFC program is specified refer to the following MELSEC iQ R Programming Manual Program Design Sc Scan 1 The program D is executed Error code ...

Page 1087: ...COPEN Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit signed binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 10 d Device that turns on for one scan upon completion of the instruction When the instruction completes with an error d 1 also turns on Bit ANYBIT...

Page 1088: ...2 to s2 9 of control data 0000H 8000H User 1 Completion status The completion status is stored upon completion of the instruction 0000H Completed successfully Other than 0000H Completed with an error error code System 2 Application setting area Specify the application of a connection 1 Communication method protocol b8 0 TCP IP 1 UDP IP 2 Socket communications function procedure b9 1 No procedure f...

Page 1089: ... the completion status s2 1 For the error code stored in the completion status s2 1 refer to the following MELSEC iQ R Ethernet User s Manual Application Completion device d This device turns on during END processing of the scan where the SP SOCOPEN instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on th...

Page 1090: ...o 16 16 bit signed binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 2 d Device that turns on for one scan upon completion of the instruction When the instruction completes with an error d 1 also turns on Bit ANYBIT_ARRAY Number of elements 2 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double w...

Page 1091: ...nstruction is issued and the connection is closed Operand s2 Device Item Description Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0000H Completed successfully Other than 0000H Completed with an error error code System Completion device d This device turns on during END processing of the scan where the SP SOCCLOSE instruct...

Page 1092: ...l Ladder ST ENO SP_SOCRCV EN U s1 s2 d1 d2 FBD LD Instruction Execution condition SP SOCRCV Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit signed binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 2 d1 Start device for storing the receive data Word ANY16 1 d...

Page 1093: ...r byte of the device where the last receive data is stored Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U s1 s2 d1 d2 Operand s2 Device Item Description Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0000H Compl...

Page 1094: ...ion device of the SP SOCRCV instruction to the execution instruction through a normally closed contact data can be read continuously even when it is received continuously Completion device d2 This device turns on during END processing of the scan where the SP SOCRCV instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or o...

Page 1095: ...ment of the array label Applicable devices Ladder ST ENO S_SOCRCVS EN U s d FBD LD Instruction Execution condition S SOCRCVS Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s Connection number 1 to 16 16 bit unsigned binary ANY16 d Start device for storing the receive data Word ANY16 1 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Wor...

Page 1096: ... receive processing using the S SOCRCVS instruction Precautions When reading receive data from the same connection do not use this command together with the SP SOCRCV instruction Operand d Device Item Description Setting range Set by 0 Receive data length The length of the data read from the socket communications receive data area is stored Number of bytes 0 to 10238 System 1 to Receive data The d...

Page 1097: ... data the SP SOCRMODE instruction can be used to set the size of receive data to limit the amount of receive data Error code SD0 Description 2820H The amount of data received exceeds the relevant setting area in the device label memory in the receive data storage device 3405H The connection number specified by s is a value other than 1 to 16 ...

Page 1098: ...String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit signed binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 2 s3 Start device for storing the send data Word ANY16 1 d Device that turns on for one scan upon completion of the instruction When the instruction completes with an error d 1 also turns on Bit ANYBIT_ARRAY Numbe...

Page 1099: ...scription Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0000H Completed successfully Other than 0000H Completed with an error error code System Operand s3 Device Item Description Setting range Set by 0 Send data length Specify the send data length Number of bytes 1 to 10238 User 1 to Send data Specify the send data 1 User ...

Page 1100: ... and an error code is stored in the completion status s2 1 For the error code stored in the completion status s2 1 refer to the following MELSEC iQ R Ethernet User s Manual Application Error code SD0 Description 3405H The connection number specified by s1 is a value other than 1 to 16 END 0 OFF OFF OFF OFF OFF ON END 0 END 0 END 0 ON ON Sequence scan Open completion signal SD1504 n Completion devi...

Page 1101: ...n Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit unsigned binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 2 d Head device for storing connection information Word ANY16_ARRAY Number of elements 5 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word D...

Page 1102: ...d d Device Item Description Setting range Set by 0 1 IP address of external device Store the IP address of an external device 00000001H to FFFFFFFFH 00000000H No communication destination FFFFFFFFH simultaneous broadcast System 2 Destination port number Store the destination port number of an external device 0001H to FFFFH FFFFH Simultaneous broadcast System 3 Own station port number Store the own...

Page 1103: ...tion SP SOCCSET Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit unsigned binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 5 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others U X...

Page 1104: ...T instruction to change the communication destination during execution of the SP SOCSND instruction Operation error When completed with an error an error code is stored in the completion status s2 1 For the error code stored in the completion status s2 1 refer to the following MELSEC iQ R Ethernet User s Manual Application Operand s2 Device Item Description Setting range Set by 0 System area 1 Com...

Page 1105: ...cution condition SP SOCRMODE Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit signed binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 4 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant...

Page 1106: ...data when data is read from the socket communications receive data area using the SP SOCRCV or S SOCRCVS instruction the instruction stores the data in the socket communications receive data area and turns on SD1506 socket communications receive status signal Ex When 500 bytes of data is received while the receive data size is set to 300 bytes Operand s2 Device Item Description Setting range Set b...

Page 1107: ...00 bytes of data is received continuously while the receive data size is set to 300 bytes Effective use of devices The receive data storage device used by the SP SOCRCV or S SOCRCVS instruction needs a 1024 word area by default Specifying the receive data size in 1024 words or less enables effective use of the device Preventing receive data from being divided Depending on the line type data to be ...

Page 1108: ...letion status s2 1 refer to the following MELSEC iQ R Ethernet User s Manual Application When the receive status signal does not turn on in TCP fixed length receive mode the data received as of the current time can be read with the SP SOCRDATA instruction to check whether the data sent from the external device is missing Error code SD0 Description 3405H The connection number specified by s1 is a v...

Page 1109: ...d ENO SP_SOCRDATA EN U s1 s2 n d FBD LD Instruction Execution condition S SOCRDATA SP SOCRDATA Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit signed binary ANY16 s2 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 2 d Head device for storing the data that has been read Wo...

Page 1110: ...CRMODE instruction to specify the size of the data to be received next time the SP SOCRCV or S SOCRCVS instruction can be used to read the data of this time As a result based on the data received this time the size of data to be received next can be specified Operation error When completed with an error an error code is stored in the completion status s2 1 For the error code stored in the completi...

Page 1111: ...iption Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Connection number 1 to 16 16 bit unsigned binary ANY16 s2 Number of protocols to be executed continuously 1 to 8 16 bit unsigned binary ANY16 s3 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 2 d Device that turns on for one scan upon completion of the instruction When...

Page 1112: ...ixth 0 1 to 128 User 8 Execution protocol number 7 Specify the number of the protocol to be executed seventh 0 1 to 128 User 9 Execution protocol number 8 Specify the number of the protocol to be executed eighth 0 1 to 128 User 10 Collation match Receive packet number 1 If receiving is included in the communication type of the protocol that has been executed first the receive packet number success...

Page 1113: ...cution of the sixth protocol 0 is stored If the number of protocols executed is less than 6 0 is stored 0 1 to 16 System 16 Collation match Receive packet number 7 If receiving is included in the communication type of the protocol that has been executed seventh the receive packet number successful in collation match is stored If the communication type is receive only 0 is stored If an error occurs...

Page 1114: ... R Ethernet User s Manual Application Completion device d This device turns on during END processing of the scan where the SP ECPRTCL instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the SP ECPRTCL instruction When completed successfully The device remains off When completed ...

Page 1115: ...hen the protocol execution status is 1 Waiting for transmission OFF OFF OFF OFF ON ON The Ethernet module will no longer receive data nor execute protocols 1 Cancellation requested 2 Cancellation completed Protocol cancellation for the connection number specified by s1 The processing stops CPU module External device SP ECPRTCL instruction CPU module Completion device d Send packet Send packet Comp...

Page 1116: ...lation requested 2 Cancellation completed Protocol cancellation for the connection number specified by s1 The processing stops CPU module External device SP ECPRTCL instruction CPU module Completion device d Send packet Send packet Completion status indication device d 1 Completed with an error Standby time The Ethernet module finishes sending the packet currently being sent OFF OFF OFF OFF ON ON ...

Page 1117: ...rnal device SP ECPRTCL instruction CPU module Completion device d Completion status indication device d 1 Completed with an error t Receive wait time or destination existence confirmation time The processing stops OFF OFF ON ON OFF OFF The Ethernet module will no longer execute protocols 1 Cancellation requested 2 Cancellation completed Protocol cancellation for the connection number specified by ...

Page 1118: ...ted for the same connection the subsequent instruction is ignored and is not executed until the preceding instruction is completed If the receive waiting time is set to 0 Infinite wait the SP ECPRTCL instruction is not completed until the data specified in the protocol setting is received Error code SD0 Description 3405H s1 is not a value in the range from 1 to 16 The SP ECPRTCL instruction is com...

Page 1119: ... s2 d1 d2 FBD LD Instruction Execution condition SP SLMPSND Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Start device where control data is stored Page 1118 Control data Word ANY16_ARRAY Number of elements 19 s2 Start device where a request frame is stored Page 1119 Request frame Word ANY16_ARRAY 1 d1 Start device for storing a response frame Page 1120 Res...

Page 1120: ...nel Specify the channel to be used by own station Since whether or not a serial number 2 is given to the request message depends on the channel specify the channel as follows according to the application 1 No serial number is given 2 to 9 Serial number is given 1 to 9 User 3 IP address of external device third and fourth octets Specify the IP address third and fourth octets of external device 3 4 ...

Page 1121: ...ata in s 13 and later is stored Note that the data in s1 13 and later is cleared when the instruction is completed successfully 0 Invalid 1 Valid System 13 Clock data Upper 8 bits Month 01H to 12H Lower 8 bits Year 00H to 99H Lower two digits of the year System 14 Upper 8 bits Hour 00H to 23H Lower 8 bits Day 01H to 31H 15 Upper 8 bits Second 00H to 59H Lower 8 bits Minute 00H to 59H 16 Upper 8 bi...

Page 1122: ...on results for the request data are set Some commands do not return response data System Request destination module I O No Header Footer Subheader Request destination station No Request destination network No Request destination multidrop station No Request data length Monitoring timer Request data s1 8 s1 3 to s1 5 s1 7 s1 6 Specified by s1 except some devices s1 9 s2 0 s2 1 s2 2 to s2 n Specifie...

Page 1123: ...on device d2 0 This device turns on during END processing of the scan where the SP SLMPSND instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or off depending on the completion status of the SP SLMPSND instruction When completed successfully The device remains off When completed with an error The device turns on during t...

Page 1124: ...rival monitoring time monitoring timer The SP SLMPSND instruction is successfully completed even if the target device returns an abnormal response When the SP SLMPSND instruction is completed successfully the response is whether normal or abnormal can be identified by the end code of the response frame When an abnormal response is returned check the manual of the SLMP compatible device being used ...

Page 1125: ...er support this instruction Use an engineering tool with version 1 025B or later Ladder ST ENO SP_FTPPUT EN U s1 s2 s3 d FBD LD Instruction Execution condition SP FTPPUT Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 4 s2 Name of files stored in the CPU mo...

Page 1126: ... R ZR RD U G J U3E H G Z LT LST LC LZ K H E U s1 s2 s3 d 1 Operand s1 Device Item Description Setting range Set by 0 Application setting area 1 Transfer completion file delete setting b2 Specify whether to delete transfer completion files or not 0 Do not delete 1 Delete 2 Temporary file create setting b3 Specify whether to create a temporary file FTPCLI_I TMP during the file transfer processing or...

Page 1127: ...the transfer processing will be stopped upon detection of the error and the rest of target files will not be transferred Untransferable files will not be transferred even though the wild card specification conditions are satisfied If the number of characters in the file path which includes a file name and an extension exceeds 255 files will not be transferred even though the wild card specificatio...

Page 1128: ...turns off when disconnected SM753 File access in progress turns on while the SP FTPPUT instruction is being executed While SM753 is on the SP FTPPUT instruction cannot be executed If executed no processing is performed If the SP FTPPUT instruction is executed while the SP FTPPUT or SP FTPGET instruction is being executed the instruction is ignored and not executed until the currently executing ins...

Page 1129: ...ted character is included in the file name or the folder name specified by s2 and s3 the character is converted to _ and processed When wild card characters are used and an unsupported character is included in the name of files stored in the transfer source CPU module the character is converted to _ and processed For this reason the corresponding file is transferred in the same way as files having...

Page 1130: ...struction Use an engineering tool with version 1 025B or later Ladder ST ENO SP_FTPGET EN U s1 s2 s3 d FBD LD Instruction Execution condition SP FTPGET Operand Description Range Data type Data type label U Dummy String ANYSTRING_SINGLE s1 Start device where control data is stored Refer to the control data Word ANY16_ARRAY Number of elements 4 s2 Name of files stored in the FTP server transfer sour...

Page 1131: ...ate setting b3 Specify whether to create a temporary file FTPCLI_I TMP during the file transfer processing or not Setting this bit to 0 prevents files from becoming undefined in the transfer destination when a cable is disconnected or power is shut off during the file transfer processing 0 Create 1 Do not create Refer to the Description column User 1 Completion status The completion status is stor...

Page 1132: ... 2 and the number of transferred files is stored in s1 3 Specify the folder path where the transfer source files are stored on the FTP server and the file name including an extension in s2 in Unicode string The maximum number of characters used in a file path is 255 The specified file path shall be a relative path from home directory of the FTP server Use one byte or as a delimiter to specify the ...

Page 1133: ...ath length 255 characters supported by the CPU module The delimiter at the end of a string can be omitted When omitted is assumed to be set at the end If a nonexistent folder path is specified a folder is automatically created by the system at execution of the instruction and then the processing is performed If a file with the same name exists in the transfer destination the file will be overwritt...

Page 1134: ...n there is no free space in the transfer destination or when b3 Temporary file create setting of s1 0 is set to 0 Create but there is not enough free space for storing transfer target files and a temporary file same size as transfer target files in the transfer destination Even though the operating status of the CPU module is switched from RUN to STOP during the file transfer processing the CPU mo...

Page 1135: ...s included in the name of files stored in the transfer source FTP server files cannot be retrieved properly How to treat unsupported characters depends on the specifications of the FTP server Operation error Unnecessary file Delete operation Temporary file FTPCLI_I TMP A temporary file left in the FTP client will be automatically deleted at the start of next file transfer processing to the same fo...

Page 1136: ...to tuning function This function automatically sets the proportional gain KP integral time TI and derivative time TD The auto tuning is performed in two methods limit cycle method and step response method Operation method of the PID operation instruction The instruction performs PID operation in the velocity type or the process value derivative type Type Application Reference Overview Reference De...

Page 1137: ...f Process value for the sampling period this time L Filter coefficient PVnf 1 Process value for the sampling period last time after filtering Action Bit 0 of s3 1 Operational expression Direct action Off Reverse action On Symbol Meaning EVn Deviation in the sampling period this time EVn 1 Deviation in the sampling period last time SV Set value PVnf Process value of the sampling period this time af...

Page 1138: ...e sampling time TS value is small The variation in the maximum error may become a problem Set the constant scan and execute the instruction or program it in the timer interrupt routine When the sampling time value is shorter than one operation cycle of the programmable controller A PID operation error 11A6H occurs but PID operation is executed assuming that the sampling time TS equals to the opera...

Page 1139: ...in s3 24 Page 1141 Alarm output flag s3 24 Input variation bit 1 of s3 1 To use the input variation alarm the following bit needs to be on and the values need to be set to the following devices Output variation bit 2 of s3 1 To use the output variation alarm the following bits need to be on and the values need to be set to the following devices Setting item Description Setting range Action setting...

Page 1140: ...e this function turn off the bit 2 of s3 1 MV Manipulated value ULV Output upper limit value LLV Output lower limit value t Time Setting item Description Setting range Action setting ACT s3 1 Bit 2 Output variation alarm Off always Bit 5 Output upper lower limit value setting On Enabled Off Disabled s3 22 s3 23 ULV LLV MV t Without the limits With the limits Values exceeding the limits are not out...

Page 1141: ...g range 1 to 32767 PID control Proportional action The manipulated value MV increases in proportion to the deviation difference between the set value SV and the process value PV in proportional operation This ratio is called the proportional gain KP and represented by the following relational expression Manipulated value MV Proportional gain KP Deviation EV The reciprocal of the proportional gain ...

Page 1142: ... the derivative action is filtered The derivative gain KD affects only the derivative action If the derivative gain KD is decreased the output responds instantaneously to a change in the process value PV caused by a disturbance If the derivative gain KD is increased the output takes time to respond to a change in the process value PV caused by a disturbance First set the derivative gain KD to 0 an...

Page 1143: ...ively the control target from fluctuating due to a disturbance Alarm output flag s3 24 When the set input output variation is exceeded bits of s3 24 turn on as an alarm flag immediately after execution of the PID operation instruction When the input variation alarm bit 1 of s3 1 is on Derivative time TD TD3 TD2 TD1 EV Deviation MV Manipulated value t Time PV Process value TS Sampling time t Time B...

Page 1144: ...INSTRUCTION 9 1 Overview When the output variation alarm bit 2 of s3 1 is on MV Manipulated value TS Sampling time t Time Bit 2 and bit 3 of s3 24 Alarm flag ON ON MV TS t Rate of change Rate of change s3 24 bit2 s3 24 bit3 ...

Page 1145: ...tion with the bit 0 of s3 1 Action setting ACT 2 Select the limit cycle method Turn on the bit 6 of s3 1 Action setting ACT When the bit is off the step response method is selected 3 Turn on the auto tuning execution flag Turn on the bit 4 of s3 1 Action setting ACT 4 Set an input filter constant Set a value in s3 2 Input filter 5 Set a sampling time Set a value in s3 0 Sampling time TS 6 Set the ...

Page 1146: ...er completion of auto tuning set the SV back to the original value 2 Sampling time TS setting To perform auto tuning set the sampling time TS to 1000 ms or longer The sampling time should also be sufficiently longer than the output change period 3 Start auto tuning Turn on the bit 4 of s3 1 Action setting ACT to start auto tuning When the amount of variation from the process value PV at start of a...

Page 1147: ...tion Use an engineering tool with version 1 020W or later Ladder ST ENO PID EN s1 s2 s3 d FBD LD Instruction Execution condition PID Operand Description Range Data type Data type label s1 Device where the set value SV is stored 32768 to 32767 16 bit signed binary ANY16 s2 Device where the process value PV is stored 32768 to 32767 16 bit signed binary ANY16 s3 Start device where the control data ar...

Page 1148: ...ulated value before execution of the instruction During auto tuning the MV cannot be changed by the PID instruction 1 point Operand s3 Device Item Description Remarks 0 Sampling time TS 1 to 32767 ms The sampling time must be longer than the operation cycle of the programmable controller 1 Action setting ACT Bit 0 0 Direct action 1 Reverse action Action direction specification Bit 1 0 Input variat...

Page 1149: ...e proportional gain KP is out of the range KP 0 11A3H A value set for the integral time TI is out of the range TI 0 11A4H A value set for the derivative gain KD is out of the range KD 0 or 201 KD 11A5H A value set for the derivative time TD is out of the range TD 0 11A6H A value set for the sampling time TS is less than the operation cycle of the programmable controller 11A7H The process value var...

Page 1150: ...mit cycle method The measurement time for auto tuning limit cycle method has been exceeded and and on time cannot be obtained properly on on 0 0 11B6H Limit cycle method The proportional gain KP calculated by auto tuning limit cycle method overflowed 11B7H Limit cycle method The integral time TI calculated by auto tuning limit cycle method is out of the range 0 to 32767 11B8H Limit cycle method Th...

Page 1151: ... effective to actuate an operation end is not provided when a step change occurs in an exact differential system Exact differential is PID control that uses the input of a differential term as it is Operation method Two types of operation methods are available for PID control by using PID control instructions velocity type and process value differentiation type The following table summarizes each ...

Page 1152: ...alculation mode change Manual mode No Automatic mode Selecting an automatic mode Set 1 automatic mode to the manual automatic selection area in I O data Yes Manual mode Selecting a manual mode Set 0 manual mode to the manual automatic selection area in I O data Reading setting the process value PV Read out data from the A D converter module and store it in I O data Setting a manual manipulated val...

Page 1153: ...operation by the PIDCONT instruction starts The PID control data can be set to a word device area with any numbers Note that all the data for the number of loops used must be set in the area with consecutive device numbers For data assignment refer to the following Inexact differential Page 1160 S P PIDINIT Exact differential Page 1172 PIDINIT P PID control data are classified into two types data ...

Page 1154: ...t of the valid range it will be converted as follows If the value is smaller than 50 50 is used If the value is bigger than 2050 2050 is used 32768 to 32767 2 Manipulated value upper limit MVHL Upper limit of the manipulated value MV calculated by PID operation in automatic mode If the MV is bigger than the MVHL the MVHL is used as the MV 50 to 2050 1 32768 to 32767 2 Manipulated value variation r...

Page 1155: ...g period If this number is set PID operation is performed only for the set number of loops and PID operation for the rest of the loops that reach the sampling period will be performed in the next scan A Time required to measure sampling period B Time required to perform PID operation for a single loop n Number of loops When the number of loops that reach the sampling period exceeds the number of e...

Page 1156: ...riod is measured at execution of the PIDCONT instruction a value smaller than the program scan time cannot be set as the sampling period If set PID operation is performed with a scan time 19ms 19ms 19ms 19ms 19ms 19ms 19ms 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0ms 19ms 19 19 38ms 4 19 23ms 26 19 45ms 7 19 26ms 38 19 57ms 45 19 64ms PIDCONT PIDINIT PIDCONT PIDCONT PIDCONT PIDCONT PIDCONT ...

Page 1157: ... used If the value is bigger than 2050 2050 is used 32768 to 32767 2 Automatic manipulated value MV A manipulated value calculated by PID operation The value is output from the D A converter module to the control target 50 to 2050 1 32768 to 32767 2 Process value after filtering PVf A process value calculated by the following operational expression PVfn PVn PVfn 1 PVn 50 to 2050 1 32768 to 32767 2...

Page 1158: ...rol instructions Manual mode The CPU module controls the target with the MV calculated without performing PID operation using the PID control instructions Loops set in manual mode stores the process value PV in the set value storage area every sampling cycle Manipulated value upper lower limits control This function controls the upper or lower limit of the manipulated value MV calculated by PID op...

Page 1159: ...Use this method in a system where the mode is switched when the PV has fully neared the SV PID control in automatic mode can be executed immediately without the SV being changed step by step in the program Changing the setting range of PID control data and I O data The setting range of PID control data and I O data can be changed as desired To change the range turn on the bit corresponding to the ...

Page 1160: ...ID operation Block diagram of PID operation inexact differential Item When the PID limit is restricted When the PID limit is not restricted Number of PID control loops 32 maximum Sampling period TS 0 01 to 60 00s PID operation method Process value differentiation type inexact differential direct action reverse action PID constants setting range Proportional constant KP 0 01 to 100 00 Integral cons...

Page 1161: ... action Reverse action Symbol Meaning EVn Deviation in the sampling period this time EVn 1 Deviation in the sampling period last time SV Set value PVfn Process value of the sampling period this time after filtering PVfn 1 Process value of the sampling period last time after filtering PVfn 2 Process value of the sampling period two times before after filtering MV Output variation amount MVn Manipul...

Page 1162: ...instructions are used in a program executed in both systems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO S_PIDINIT EN s ENO SP_PIDINIT EN s FBD LD Instruction Execution condition S PIDINIT SP PIDINIT Operand Description Range Data type Data type label s Start device where t...

Page 1163: ...oops used s 1 Number of loops in one scan For loop No 1 14 words s 2 Operational expression selection s 3 Sampling period TS s 4 Proportional constant KP s 5 Integral constant TI s 6 Derivative constant TD s 7 Filter coefficient s 8 Manipulated value lower limit MVLL s 9 Manipulated value upper limit MVHL s 10 Manipulated value variation rate limit MVL s 11 Process value variation rate limit PVL s...

Page 1164: ...SD0 Description 3405H Out of range data is set in the device specified by s The value set for the PID control data is out of the setting range Number of loops used Number of loops executed in one scan Manipulated value upper limit Manipulated value lower limit The area fixed to 0 in the PID control data is not 0 ...

Page 1165: ... executed in both systems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO S_PIDCONT EN s ENO SP_PIDCONT EN s FBD LD Instruction Execution condition S PIDCONT SP PIDCONT Operand Description Range Data type Data type label s Start device assigned to the I O data area Word ANY16 ...

Page 1166: ... The I O data are assigned as follows 1 m n 1 23 10 The number of device points used for I O data setting is calculated by the following formula Number of device points 10 23 n n number of loops used Specify each data in binary The initial processing flag sets the processing to be performed at the start of PID operation Item I O data Write s 0 Initial processing flag Read write disabled s 1 s 9 Wo...

Page 1167: ... Unless the S P PIDCONT instruction is executed the bumpless function cannot be performed Apply an interlock using the READY signal of each module so that the S P PIDCONT instruction is executed only when the A D converter module used to obtain the process value PV and the D A converter module used to output the manipulated value MV are normal If the instruction is executed when these modules are ...

Page 1168: ...peration in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO S_PIDSTOP EN s ENO SP_PIDSTOP EN s FBD LD Instruction Execution condition S PIDSTOP SP PIDSTOP Operand Description Range Data type Data type label s Loop number to be stopped 1 to 32 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Execution resu...

Page 1169: ...am executed in both systems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO S_PIDRUN EN s ENO SP_PIDRUN EN s FBD LD Instruction Execution condition S PIDRUN SP PIDRUN Operand Description Range Data type Data type label s Loop number to be stopped 1 to 32 16 bit unsigned binary...

Page 1170: ...ems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO S_PIDPRMW EN s1 s2 ENO SP_PIDPRMW EN s1 s2 FBD LD Instruction Execution condition S PIDPRMW SP PIDPRMW Operand Description Range Data type Data type label s1 Loop number to be changed 1 to 32 16 bit unsigned binary ANY16 s2 S...

Page 1171: ...gral constant TI s2 4 Derivative constant TD s2 5 Filter coefficient s2 6 Manipulated value lower limit MVLL s2 7 Manipulated value upper limit MVHL s2 8 Manipulated value variation rate limit MVL s2 9 Process value variation rate limit PVL s2 10 0 s2 11 Derivative gain KD s2 12 0 s2 13 0 Error code SD0 Description 3405H Out of range data is set in the device specified by s1 The specified loop num...

Page 1172: ...D limit is restricted When the PID limit is not restricted Number of PID control loops 32 maximum Sampling period TS 0 01 to 60 00s PID operation method Process value differentiation type exact differential direct action reverse action PID constants setting range Proportional constant KP 0 01 to 100 00 Integral constant TI 0 1 to 3000 0s Derivative constant TD 0 00 to 300 00s Set value setting ran...

Page 1173: ...a area Page 1155 I O data Action Operational expression Direct action Reverse action Symbol Meaning EVn Deviation in the sampling period this time EVn 1 Deviation in the sampling period last time SV Set value PVfn Process value of the sampling period this time after filtering PVfn 1 Process value of the sampling period last time after filtering PVfn 2 Process value of the sampling period two times...

Page 1174: ...e instructions are used in a program executed in both systems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO PIDINIT EN s ENO PIDINITP EN s FBD LD Instruction Execution condition PIDINIT PIDINITP Operand Description Range Data type Data type label s Start device where the PID...

Page 1175: ... is disabled unless the PIDINIT P instruction has been executed Operation error Item PID control data Common to all loops s 0 Number of loops used s 1 Number of loops in one scan For loop No 1 10 words s 2 Operational expression selection s 3 Sampling period TS s 4 Proportional constant KP s 5 Integral constant TI s 6 Derivative constant TD s 7 Filter coefficient s 8 Manipulated value lower limit ...

Page 1176: ...m executed in both systems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO PIDCONT EN s ENO PIDCONTP EN s FBD LD Instruction Execution condition PIDCONT PIDCONTP Operand Description Range Data type Data type label s Start device assigned to the I O data area Word ANY16 1 EN Ex...

Page 1177: ...data are assigned as follows 1 m n 1 18 10 The number of device points used for I O data setting is calculated by the following formula Number of device points 10 18 n n number of loops used Specify each data in binary The initial processing flag sets the processing to be performed at the start of PID operation Item I O data Write s 0 Initial processing flag Read write disabled s 1 s 9 Work area f...

Page 1178: ...not be performed Apply an interlock using the READY signal of each module so that the PIDCONT P instruction is executed only when the A D converter module used to obtain the process value PV and the D A converter module used to output the manipulated value MV are normal If the instruction is executed when these modules are not normal PID operation cannot be performed normally as the result of fail...

Page 1179: ...ons on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO PIDSTOP EN s ENO PIDSTOPP EN s FBD LD Instruction Execution condition PIDSTOP PIDSTOPP Operand Description Range Data type Data type label s Loop number to be stopped 1 to 32 16 bit unsigned binary ANY16 EN Execution condition Bit BOOL ENO Executio...

Page 1180: ...s there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO PIDRUN EN s ENO PIDRUNP EN s FBD LD Instruction Execution condition PIDRUN PIDRUNP Operand Description Range Data type Data type label s Loop number to be stopped 1 to 32 16 bit unsigned binary ANY16 EN Execution condition Bit ...

Page 1181: ...systems there are restrictions on their operation in the standby system when the redundant system is in backup mode MELSEC iQ R CPU Module User s Manual Application Ladder ST ENO PIDPRMW EN s1 s2 ENO PIDPRMWP EN s1 s2 FBD LD Instruction Execution condition PIDPRMW PIDPRMWP Operand Description Range Data type Data type label s1 Loop number to be changed 1 to 32 16 bit unsigned binary ANY16 s2 Start...

Page 1182: ...on selection s2 1 Sampling period TS s2 2 Proportional constant KP s2 3 Integral constant TI s2 4 Derivative constant TD s2 5 Filter coefficient s2 6 Manipulated value lower limit MVLL s2 7 Manipulated value upper limit MVHL s2 8 Manipulated value variation rate limit MVL s2 9 Process value variation rate limit PVL Error code SD0 Description 3405H Out of range data is set in the device specified b...

Page 1183: ...xecution methods and precautions Basic loop types The following table summarizes basic loop types configured by combinations of process control instructions Loop type Configuration Application Two degree of freedom PID control S2PID Used for general PID control two degrees of freedom Speed type PID operation is performed every control cycle PID control SPID Used for general PID control Speed type ...

Page 1184: ...he manipulated value Batch counter SBC Performs valve on off control in the process of batch charging to the tank Program setter SPGS Outputs according to the temporal change of the value that has been set in advance Manual output SMOUT Operates the operation terminal for manual output Monitor SMON Inputs process values to detect process errors such as upper lower limit alarms Manual output with m...

Page 1185: ... common information is called a loop tag and the storage memory is called loop tag memory Loop monitoring and tuning can be performed by monitoring the loop tag Ex Block diagram of two degree of freedom PID control S2PID S IN S PHPL S 2PID S OUT1 Loop tag memory Process control instruction Process control instruction Process control instruction Process control instruction Operation constant 1 Oper...

Page 1186: ...T2FLT D0 R0 S IN R0 R100 R200 R1000 EMOV R100 R20 S PHPL R20 R120 R1000 EMOV R120 R40 S 2PID R40 R140 R240 R1000 R300 EMOV R140 R60 P1 K1 T0 CALL P1 RST T0 FEND T0 M0 S OUT1 R60 R160 R260 R1000 FLT2INT R160 D1 RET Use the table shared among the instructions Setting loop tag memory Setting operation constant Execution command Executed every scan ...

Page 1187: ... real number 48 S OUT1 DML 100 0 Single precision real number 50 S 2PID DVL 100 0 Single precision real number 52 S 2PID P 1 0 Single precision real number 54 S 2PID I 10 0 Single precision real number 56 S 2PID D 0 0 Single precision real number 58 S 2PID GW 0 0 Single precision real number 60 S 2PID GG 1 0 Single precision real number 62 S OUT1 MVP 0 0 Single precision real number 64 S 2PID 0 0 ...

Page 1188: ... and therefore a device which has 128 consecutive words should be specified when the loop memory area is allocated Loop tag memory The loop tag memory is an area 96 words in which the control information used commonly by the process control instructions specified by a loop type among the basic loop types Page 1181 Basic loop types is stored For the applications of the area used by process control ...

Page 1189: ...ored in the block word BW is specified for the input data for the next process control instruction connected by the loop Block bit BB The block bit BB is an area in which alarm data during execution of each process control instruction is stored Sixteen bits from b0 to b15 are represented as BB1 to BB16 If an alarm occurs in any of b1 to b15 BB2 to BB16 used by instructions 1 is stored in b0 BB1 Th...

Page 1190: ... of individual instructions Local work memory The local work memory is an area in which data is temporarily stored during operation of process control instructions The application and storage area of the local work memory vary depending on the instruction used Refer to the descriptions of individual instructions Setting input data Setting operation constant Executing a process control instruction ...

Page 1191: ...10 to 110 0 0 2 Single precision real number S OUT1 18 MH 10 to 110 100 0 Single precision real number S OUT1 20 ML 10 to 110 0 0 Single precision real number S PHPL 22 RH 999999 to 999999 100 0 Single precision real number S PHPL 24 RL 999999 to 999999 0 0 Single precision real number S PHPL 26 PH RL to RH 100 0 Single precision real number S PHPL 28 PL RL to RH 0 0 Single precision real number S...

Page 1192: ... lower limit System DPPA Positive direction variation rate alarm The variation rate exceeds the variation rate range on an upward trend System DPNA Negative direction variation rate alarm The variation rate underruns the variation rate range on a downward trend System DVLA Large deviation alarm The result of a deviation check shows that the deviation limit is exceeded The deviation check determine...

Page 1193: ...formed when the host computer is abnormal CCB COMPUTER CASCADE BACK UP Cascade operation backup performed when the host computer is abnormal LCM LOCAL MANIPULATED Local manual operation When the plant is started the operation and start up are performed by using equipment such as the machine side operation panel away from the operator station and the control mode is monitored at the operator statio...

Page 1194: ...control cycle is reached Specify the control cycle used in the loop tag memory Instructions such as S 2PID perform PID control based on the control cycle value specified in the loop tag memory Ex The S 2PID instruction performs monitoring every second and implements PID control every 5 seconds Setting the control cycle to an integral multiple of the execution cycle enables monitoring such as for c...

Page 1195: ...2PID and S OUT1 3 Measuring the execution cycle 4 Setting input data PV Reading PV from such as the A D conversion module 5 MV output Outputting MV from such as the D A conversion module 6 Specifying process control instructions S IN instruction S PHPL instruction S 2PID instruction S OUT1 instruction 7 Setting loop tag memory 8 Setting operation constants 9 Executing a command 1s K10 T0 T0 PLS M0...

Page 1196: ...function limits the upper or lower limit of the manipulated value MV output by the PID operation in automatic mode This output limiter processing function is only valid in automatic mode and is not executed in manual mode The output limiter processing function is not executed either even in automatic mode if the tracking bit TRK is set to 0 Disable tracking Cascade loop tracking The process contro...

Page 1197: ...is tracked to the manipulated value MV of Loop 0 The S SEL instruction specifies tracking according to the following operation constant items Setting item Setting Tracking bit TRK 1 Tracking performed Set value pattern SVPTN Set value pattern 0 Set value is upper loop MV Set value used 0 E2 is specified Operation constant Bit position Stored value s2 4 Tracking bit b0 0 Tracking not performed 1 Tr...

Page 1198: ...and specification Regardless of the program language used specify devices for the operations of process control instructions Do not specify labels Errors of process control instructions When an error occurs in process control instructions the detailed information of the error is stored in SD81 to SD111 detailed information 1 and SD113 to SD143 detailed information 2 For the information to be store...

Page 1199: ...S IN Operand Description Range Data type s1 Input data start device Refer to Input data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specifi...

Page 1200: ... Set by 0 1 EMAX Engineering value transformation upper limit 999999 to 999999 Single precision real number 100 0 User 2 3 EMIN Engineering value transformation lower limit 999999 to 999999 Single precision real number 0 0 User 4 5 NMAX Input upper limit 999999 to 999999 Single precision real number 100 0 User 6 7 NMIN Input lower limit 999999 to 999999 Single precision real number 0 0 User 8 9 HH...

Page 1201: ...unsigned binary 8H User system 3 ALM Alarm detection 0 to FFFFH SPA 0 Loop RUN 1 Loop STOP SEA 0 No alarm 1 Alarm 16 bit unsigned binary 0H User system 4 INH Disable alarm detection 0 to FFFFH 0 Alarm detection enabled 1 Alarm detection disabled 16 bit unsigned binary 0H User system 38 39 Filter coefficient 0 to 1 Single precision real number 0 2 User b15 b9 b10 b1 b2 b3 b4 b5 b6 b7 b8 b0 CMV CSV ...

Page 1202: ...ge check input limiter and digital filter processing The following is the processing block diagram of the S IN instruction The numbers 1 to 5 in the diagram indicate the order of the processing AND AND MAN OR SPA SEA ERRI SEI MODE E1 BW BB2 BB3 BB1 HH H L LL NMAX NMIN EMAX EMIN α 1 3 2 4 5 5 RUN SPA 0 STOP SPA 1 Range check Loop stop determination Digital filter Engineering value reverse conversio...

Page 1203: ...sformation of the input limiter result T1 according to the following expression Digital filter 4 The instruction applies a digital filter to the input value E1 according to the following expression The digital filter is used to reduce the effect of noise BW T2 last BW value T2 Range check Condition Range check result alarm output BB2 BB3 BB1 SEA Upper limit check E1 HH 1 1 1 1 E1 H 0 0 H E1 HH Las...

Page 1204: ...he control mode MODE is set to MAN All of the alarm bits BB1 BB2 and BB3 are set to 0 ALM SEA is set to 0 0 Performs range check 1 Error code SD0 Description 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 d1 s2 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Upper limit range error occurrence HH upper limit rang...

Page 1205: ...t data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U...

Page 1206: ...r limit 999999 to 999999 Single precision real number 0 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 1 MODE Control mode 0 to FFFFH 16 bit unsigned binary 8H User system 3 ALM Alarm detection 0 to FFFFH SPA 0 Loop RUN 1 Loop STOP DMLA SEA MHA MLA 0 No alarm 1 Alarm 16 bit unsigned binary 4000H User system 4 INH Disable alarm detection 0 to FFFFH TRKF 0 T...

Page 1207: ...tput lower limit value 10 to 110 Single precision real number 0 0 User 48 49 DML Output variation rate limit value 0 to 100 Single precision real number 100 0 User 54 55 I Integral constant 0 to 999999 s Single precision real number 10 0 User 62 63 MVP MV internal operation value 999999 to 999999 Single precision real number 0 0 System Operand d2 Position Symbol Name Recommended range Data type St...

Page 1208: ... The following is the processing block diagram of the S OUT1 instruction The numbers 1 to 6 in the diagram indicate the order of the processing MODE SPA ERRI MLI ERRI MHI ERRI DMLI MHA MLA DMLA TRKF BB2 BB3 BB1 AND AND OR BB4 AND BW 6 MAN E1 1 2 3 4 5 6 Other than MAN CMB CMV LCM Mode determination MAN CMB CMV LCM Input addition Variation rate upper lower limiter Reset windup Output conversion Loo...

Page 1209: ... and the MHA of the alarm detection ALM are set to 0 Note that the MHA2 of the alarm detection 2 ALM2 remains 1 3 If the MLI or ERRI of the disable alarm detection INH is set to 1 the output lower limit alarm BB3 and the MLA of the alarm detection ALM are set to 0 Note that the MHA2 of the alarm detection 2 ALM2 remains 1 Control mode MODE Processing details MAN CMB CMV LCM alarm clear processing ...

Page 1210: ...e is determined as RUN by Loop Stop Determination SM817 is used to specify whether to hold the manipulated value MV when a sensor error occurs SM817 OFF Do not hold the manipulated value MV SM817 ON Hold the manipulated value MV Operation error Condition Operational expression SPA status Processing details 1 The loop stops When the loop stops the following operations are performed and the S OUT1 i...

Page 1211: ... Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G...

Page 1212: ...0 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 1 MODE Control mode 0 to FFFFH 16 bit unsigned binary 8H User system 3 ALM Alarm detection 0 to FFFFH SPA 0 Loop RUN 1 Loop STOP DMLA SEA MHA MLA 0 No alarm 1 Alarm 16 bit unsigned binary 4000H User system 4 INH Disable alarm detection 0 to FFFFH 0 Alarm detection enabled 1 Alarm detection disabled 16 bit un...

Page 1213: ...at time The following is the processing block diagram of the S OUT2 instruction The numbers 1 to 4 in the diagram indicate the order of the processing BW BB2 BB3 BB1 BB4 MODE SPA ERRI MLI ERRI MHI ERRI DMLI MHA MLA DMLA AND AND AND OR MAN 4 E1 1 2 3 4 MH ML DML NMAX NMIN MV Mode determination Other than MAN CMB CMV LCM MAN CMB CMV LCM Variation rate upper lower limiter Output conversion Loop stop ...

Page 1214: ... according to the SPA status of the alarm detection ALM Hold processing 5 This processing specifies whether to hold the output value BW by the S OUT2 instruction when a sensor error occurs detected by the S IN instruction The hold processing is performed when the value is determined as RUN by Loop Stop Determination SM817 is used to specify whether to hold the manipulated value MV when a sensor er...

Page 1215: ...rol Instructions 1213 11 Operation error Error code SD0 Description 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 s2 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred ...

Page 1216: ...Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST...

Page 1217: ...on upper limit 999999 to 999999 Single precision real number 100 0 User 2 3 NMIN Output conversion lower limit 999999 to 999999 Single precision real number 0 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 1 MODE Control mode 0 to FFFFH 16 bit unsigned binary 8H User system 3 ALM Alarm detection 0 to FFFFH SPA 0 Loop RUN 1 Loop STOP 16 bit unsigned binary ...

Page 1218: ...details MAN CMB CMV LCM The manipulated value MV is used for the output value BW Output conversion processing 2 is performed AUT CAB CAS CCB CSV LCA LCC The last output value BW is held SPA status Processing details 0 Performs Mode determination 1 1 Performs the following operations and terminates the S MOUT instruction The last output value BW is held The control mode MODE is set to MAN Error cod...

Page 1219: ...n real number d1 Block memory start device Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT...

Page 1220: ...y 4000H User system 4 INH Disable alarm detection 0 to FFFFH TRKF 0 Tracking not set 1 Tracking set ERRI DMLI MHI MLI 0 Alarm detection enabled 1 Alarm detection disabled 16 bit unsigned binary 4000H User system 12 13 MV Manipulated value 10 to 110 Single precision real number 0 0 User system 18 19 MH Output upper limit value 10 to 110 Single precision real number 100 0 User 20 21 ML Output lower ...

Page 1221: ...rmined by assuming the time specified by the control output cycle CTDUTY as 100 The ON OFF time is switched every execution cycle The instruction also performs variation rate upper lower limiter and reset windup of the calculated manipulated value MV 68 69 CTDUTY Control output cycle 0 to 999999 s Set a value within the following range Single precision real number 1 0 User Operand d2 Position Symb...

Page 1222: ...I MHI ERRI MLI ERRI DMLI E1 1 2 3 4 7 6 5 MODE MHA MLA DMLA TRKF BB1 OR 7 MAN Output ON time conversion Output conversion Upper limit alarm Lower limit alarm Variation rate alarm Reset windup Variation rate upper lower limiter Mode determination Input addition Loop stop determination Alarm clear RUN SPA 0 STOP SPA 1 MAN CMB CMV LCM Other than MAN CMB CMV LCM MH ML DML CTDUTY MV MVP Loop stop proce...

Page 1223: ... output upper limit alarm BB2 and the MHA of the alarm detection ALM are set to 0 Note that the MHA2 of the alarm detection 2 ALM2 remains 1 3 If the MLI or ERRI of the disable alarm detection INH is set to 1 the output lower limit alarm BB3 and the MLA of the alarm detection ALM are set to 0 Note that the MLA2 of the alarm detection 2 ALM2 remains 1 Control mode MODE Processing details MAN CMB CM...

Page 1224: ...on Operational expression Condition Processing details The control output cycle CTDUTY has been reached The output ON counter is calculated using the following expression The output counter is cleared to 0 at this time The output ON counter is rounded off to the nearest whole number The control output cycle CTDUTY has not been reached The output counter is incremented by 1 and output conversion pr...

Page 1225: ...ary d1 Block memory start device Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ...

Page 1226: ...FFFH PHA DPPA 0 No alarm 1 Alarm 16 bit unsigned binary 4000H User system 4 INH Disable alarm detection 0 to FFFFH 0 Alarm detection enabled 1 Alarm detection disabled 16 bit unsigned binary 4000H User system 14 15 SV1 Set value 1 0 to 2147483647 32 bit unsigned binary 0 User 16 17 SV2 Set value 2 0 to 2147483647 32 bit unsigned binary 0 User 26 27 PH Upper limit alarm value 0 to 2147483647 32 bit...

Page 1227: ... alarm BB2 and PHA of the alarm detection ALM 1 If PHI or ERRI of the disable alarm detection INH is set to 1 the upper limit alarm BB2 and the PHA of the alarm detection ALM are set to 0 Variation rate check processing 2 A variation rate alarm check is performed during the variation rate alarm check time CTIM in the device specified by d2 For the variation rate alarm check the variation of the in...

Page 1228: ...e performed and the result is stored in output 1 BW1 output 2 BW2 Operation error Ec Execution cycle Condition BW1 BW2 E1 0 0 0 0 E1 SV1 0 E1 SV1 1 0 E1 SV2 0 E1 SV2 1 Error code SD0 Description 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Variation rate alarm ch...

Page 1229: ...1 Input data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW ...

Page 1230: ...ary User e2 Integration hold signal Operand d1 Position Symbol Name Recommended range Data type Standard value Set by 0 1 BW1 Output value integral part 0 to 2147483647 32 bit unsigned binary System 2 3 BW2 Output value decimal part 0 to 2147483647 Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 0 W Weight per pulse 1 to 999 16 bit unsigned binary 1 User 1 U Unit ...

Page 1231: ... uses this area as a work area To start the control from the initial status clear data by using a sequence program The loop tag past value memory occupies 32 words after the loop tag memory Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 116 117 E1n 1 Last input value System ...

Page 1232: ...f E1 Operation performed when the integration pattern is set to Return to 0 when HILMT is exceeded Operation performed when the integration pattern is set to Hold the HILMT value when HILMT is exceeded 0 0 e1 e2 HILMT BW E1 Reset Reset Hold cancel Reset Start Start Hold cancel Hold cancel Hold Hold When e1 turns off e2 also turns off Ring counter upper limit value Ring counter lower limit value 0 ...

Page 1233: ...essing the following processing is performed for the integrated values T2 T3 Operation error e1 e2 Input value increment T1 0 0 0 1 1 0 E1 E1n 1 1 1 e1 e2 Integrated value decimal part T2 integrated value decimal part T3 0 0 T2 0 T3 0 0 1 T2 0 T3 0 1 1 0 T4 T1 W U quotient integral part T5 T1 W U remainder decimal part T2 SUM1 T4 SUM2 T5 U quotient integral part T3 SUM2 T5 U remainder decimal part...

Page 1234: ... Range Data type s1 Input data start device Refer to Input data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 When E2 is used Set value start device When E2 is not used Dummy device Refer to Set value Single precision real numbe...

Page 1235: ...osition Symbol Name Recommended range Data type Standard value Set by 0 1 MTD Derivative gain 0 to 999999 Single precision real number 8 0 User 2 3 DVLS Large deviation alarm Hysteresis 0 to 100 Single precision real number 2 0 User 4 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 5 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned bin...

Page 1236: ...eering value upper limit 999999 to 999999 Single precision real number 100 0 User 24 25 RL Engineering value lower limit 999999 to 999999 Single precision real number 0 0 User 46 47 CT Control cycle 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 50 51 DVL Deviation limit value 0 to 100 Single precision real number 100 0 User 52 53 P Gain 0 to 999999 Sing...

Page 1237: ...not used specify a dummy device SD820 Execution cycle T Set the execution cycle T in SD816 and SD817 in single precision real number Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 96 Control cycle counter initialization completion flag System 97 Control cycle counter The value is rounded off to the nearest whole number 102 103 Bn 1 Last value 104 105 PVn Process ...

Page 1238: ...re satisfied If the set value E2 is the upper loop MV the TRKF of the disable alarm detection INH of the upper loop is set to 1 Control mode MODE setting Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer to the following expression is performed and then tracking processing 2 is performed If the set value E2 is not specified tracking p...

Page 1239: ...f the alarm detection ALM and the large deviation alarm BB1 are set to 0 Condition Operational expression Direct action PN 1 DV E1 SVn Reserve action PN 0 DV SVn E1 Condition Operational expression DV GW K GG DV GW Item Operational expression Bn Direct action PN 1 Reserve action PN 0 BW MV Condition Processing In either of the following cases 1 Derivative constant D 0 TD 0 2 Control mode MODE MAN ...

Page 1240: ...he loop stops the following operations are performed and the S PID instruction ends The output value BW MV is set to 0 The DVLA of alarm detection ALM is set to 0 The control mode MODE is set to MAN BB1 of BB is set to 0 0 The loop runs and control cycle determination processing 7 is performed Error code SD0 Description 3400H An invalid operation such as division by zero is performed 3402H The val...

Page 1241: ...ription Range Data type s1 Input data start device Refer to Input data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 When E2 is used Set value start device When E2 is not used Dummy device Refer to Set value Single precision rea...

Page 1242: ...ition Symbol Name Recommended range Data type Standard value Set by 0 1 MTD Derivative gain 0 to 999999 Single precision real number 8 0 User 2 3 DVLS Large deviation alarm hysteresis 0 to 100 Single precision real number 2 0 User 4 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 5 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binar...

Page 1243: ...neering value upper limit 999999 to 999999 Single precision real number 100 0 User 24 25 RL Engineering value lower limit 999999 to 999999 Single precision real number 0 0 User 46 47 CT Control cycle 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 50 51 DVL Deviation limit value 0 to 100 Single precision real number 100 0 User 52 53 P Gain 0 to 999999 Sin...

Page 1244: ...mber 0 0 User 66 67 Two degree offreedom parameter 0 to 1 Increasing decreases the effect of derivative control on the set value change Decreasing increases the effect of derivative control on the set value change Single precision real number 1 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 96 Control cycle counter initialization completion flag System 97 ...

Page 1245: ...ocessing SV setting processing 1 The following processing is performed depending on the control mode MODE setting Operand s3 Position Symbol Name Recommended range Data type Standard value Set by 0 1 E2 Set value 10 to 110 Single precision real number 0 0 User Control mode MODE setting Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer...

Page 1246: ...f freedom PID control operation is performed with the following operational expression KP K Gain P MD Derivative gain MTD TI Integral constant I TD Derivative constant D The tracking bit TRK is set to 1 The set value E2 is used The control mode MODE is set to any of the following MAN AUT CMV CMB CAB LCM LCA or LCC E2 SVn Condition Operational expression Direct action PN 1 DV E1 SVn Reserve action ...

Page 1247: ...ntrol mode MODE MAN LCM or CMV Bn 0 Dn 0 Note that the loop tag past value memory is set In any of the following cases 1 Integral constant I 0 TI 0 2 MHA2 or MLA2 of alarm detection 2 ALM2 is 1 and 3 MHA2 or MLA2 of alarm detection 2 ALM2 is 1 and Condition Result DVL DV DVLA BB1 1 1 DVL DVLS DV DVL DVLA BB1 Last value status hold 1 DV DVL DVLS DVLA BB1 0 SPA status Processing details 1 The loop s...

Page 1248: ...s2 s3 d1 d2 FBD LD Instruction Execution condition S PIDP Operand Description Range Data type s1 Input data start device Refer to Input data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 When E2 is used Set value start device Wh...

Page 1249: ...e Set by 0 1 MTD Derivative gain 0 to 999999 Single precision real number 8 0 User 2 3 DVLS Large deviation alarm hysteresis 0 to 100 Single precision real number 2 0 User 4 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 5 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binary 0 User 6 SVPTN Set value pattern 0 to 3 1 Use of set valu...

Page 1250: ...it value 10 to 110 Single precision real number 100 0 User 20 21 ML Output lower limit value 10 to 110 Single precision real number 0 0 User 22 23 RH Engineering value upper limit 999999 to 999999 Single precision real number 100 0 User 24 25 RL Engineering value lower limit 999999 to 999999 Single precision real number 0 0 User 46 47 CT Control cycle 0 to 999999 s Set a value within the following...

Page 1251: ...ycle T Set the execution cycle T in SD816 and SD817 in single precision real number 60 61 GG Gap gain 0 to 999999 Single precision real number 1 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 96 Control cycle counter initialization completion flag System 97 Control cycle counter The value is rounded off to the nearest whole number 100 101 In 1 Last value 1...

Page 1252: ...following is the processing block diagram of the S PIDP instruction The numbers 1 to 10 in the diagram indicate the order of the processing BW MAN SPA CT MODE ERRI DVLI ERRI MHI ERRI MLI ERRI DMLI MHA MLA DMLA DVLA AND AND AND OR BB3 BB5 BB4 BB1 E1 E2 AND 1 2 3 4 5 7 8 6 6 9 BB2 9 10 Upper limit alarm Lower limit alarm Variation rate alarm Alarm clear Output conversion Mode determination Loop stop...

Page 1253: ...t gain K is calculated under the following conditions Control mode MODE setting Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer to the following expression is performed and then tracking processing 2 is performed If the set value E2 is not specified tracking processing 2 is performed without performing engineering value transformati...

Page 1254: ...ry is set In any of the following cases 1 Integral constant I 0 TI 0 2 MHA2 of the alarm detection 2 ALM2 1 3 MLA2 of the alarm detection 2 ALM2 1 4 Control mode MODE MAN LCM or CMV When all of the following conditions are satisfied 1 b0 of SD818 bumpless switching function of S PIDP control 1 2 TRKF of the disable alarm detection INH 1 3 Control mode MODE Other than MAN LCM and CMV TRKF 0 Conditi...

Page 1255: ...MLA2 status of the alarm detection 2 ALM2 are held Output conversion processing 8 The output value BW is calculated from the following expression Loop stop processing 9 The following processing is performed according to the SPA status of the alarm detection ALM Control cycle determination 10 If the specified control cycle is not reached mode determination processing 6 is performed regarding T as M...

Page 1256: ...art device Refer to Input data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 When E2 is used Set value start device When E2 is not used Dummy device Refer to Set value Single precision real number EN Execution condition Bit ENO ...

Page 1257: ...t unsigned binary System Operand s2 Position Symbol Name Recommended range Data type Standard value Set by 0 1 DVLS Large deviation alarm Hysteresis 0 to 100 Single precision real number 2 0 User 2 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 3 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binary 0 User 4 SVPTN Set value pattern ...

Page 1258: ...99999 to 999999 Single precision real number 100 0 User 24 25 RL Engineering value lower limit 999999 to 999999 Single precision real number 0 0 User 46 47 ST Operating time 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 50 51 DVL Deviation limit value 0 to 100 Single precision real number 100 0 User 52 53 P Gain 0 to 999999 Single precision real number ...

Page 1259: ...loop is set If E2 is not used specify a dummy device SD820 Execution cycle T Set the execution cycle T in SD816 and SD817 in single precision real number Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 96 Control cycle counter initialization completion flag System 97 Sample counter The value is rounded off to the nearest whole number 98 Operating counter The value...

Page 1260: ...PI operation and deviation check The following is the processing block diagram of the S SPI instruction The numbers 1 to 7 in the diagram indicate the order of the processing ST HT ST HT ST HT STHT STHT STHT t MV MODE SPA DVLA ERRI DVLI E2 BW MAN ST STHT E1 AND BB1 6 7 1 2 3 4 5 6 OFF BW 0 BW 0 RL RH P I GW GG DL DVL DSLS RUN SPA 0 STOP SPA 1 SPI operation Operating time monitor Operating time Hol...

Page 1261: ...ral constant I BT execution cycle T Control mode MODE Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer to the following expression is performed and then tracking processing 2 is performed If the set value E2 is not specified tracking processing 2 is performed without performing engineering value transformation processing MAN AUT CMV ...

Page 1262: ...LM2 is 1 and Condition Result DVL DV DVLA BB1 1 1 DVL DVLS DV DVL DVLA BB1 Last value status hold 1 DV DVL DVLS DVLA BB1 0 SPA status Processing details 1 The loop stops When the loop stops the following operations are performed and the S SPI instruction ends The output value BW is set to 0 The DVLA of alarm detection ALM is set to 0 The control mode MODE is set to MAN BB1 of BB is set to 0 0 The ...

Page 1263: ...operation such as division by zero is performed 3402H The value specified by s1 s2 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Operating time ST 0 The execution cycle T setting is less than 0 Sampling cycle STHT 0 Operating time ST execution cycle T 32767 Sample cycle STHT execution cycle T 32767 ...

Page 1264: ...efer to Input data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 When E2 is used Set value start device When E2 is not used Dummy data Refer to Set value Single precision real number EN Execution condition Bit ENO Execution resu...

Page 1265: ...osition Symbol Name Recommended range Data type Standard value Set by 0 1 MTD Derivative gain 0 to 999999 Single precision real number 8 0 User 2 3 DVLS Large deviation alarm hysteresis 0 to 100 Single precision real number 2 0 User 4 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 5 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned bin...

Page 1266: ...eering value upper limit 999999 to 999999 Single precision real number 100 0 User 24 25 RL Engineering value lower limit 999999 to 999999 Single precision real number 0 0 User 46 47 CT Control cycle 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 50 51 DVL Deviation limit value 0 to 100 Single precision real number 100 0 User 52 53 P Gain 0 to 999999 Sing...

Page 1267: ...p is set If E2 is not used specify a dummy device SD820 Execution cycle T Set the execution cycle T in SD816 and SD817 in single precision real number Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 96 Control cycle counter initialization completion flag System 97 Control cycle counter The value is rounded off to the nearest whole number 102 103 Bn 1 Last value 10...

Page 1268: ...loop MV the TRKF of the disable alarm detection INH of the upper loop is set to 1 Control mode MODE setting Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer to the following expression is performed and then tracking processing 2 is performed If the set value E2 is not specified tracking processing 2 is performed without performing en...

Page 1269: ...e large deviation alarm BB1 are set to 0 Condition Operational expression Direct action PN 1 DV E1 SVn Reserve action PN 0 DV SVn E1 Condition Operational expression DV GW K GG DV GW Item Operational expression Bn Direct action PN 1 Reserve action PN 0 BW MV Direct action PN 1 Reserve action PN 0 Condition Processing In either of the following cases 1 Derivative constant D 0 TD 0 2 Control mode MO...

Page 1270: ...When the loop stops the following operations are performed and the S IPD instruction ends The output value BW is set to 0 The DVLA of alarm detection ALM is set to 0 The control mode MODE is set to MAN BB1 of BB is set to 0 0 The loop runs and control cycle determination processing 7 is performed Error code SD0 Description 3400H An invalid operation such as division by zero is performed 3402H The ...

Page 1271: ...ce Refer to Input data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 When E2 is used Set value start device When E2 is not used Dummy device Refer to Set value Single precision real number EN Execution condition Bit ENO Executio...

Page 1272: ...unsigned binary System Operand s2 Position Symbol Name Recommended range Data type Standard value Set by 0 1 DVLS Large deviation alarm hysteresis 0 to 100 Single precision real number 2 0 User 2 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 3 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binary 0 User 4 SVPTN Set value pattern 0 ...

Page 1273: ...cision real number 0 0 System 22 23 RH Engineering value upper limit 999999 to 999999 Single precision real number 100 0 User 24 25 RL Engineering value lower limit 999999 to 999999 Single precision real number 0 0 User 46 47 CT Control cycle 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 50 51 DVL Deviation limit value 0 to 100 Single precision real num...

Page 1274: ...e set value E2 specify the device offset 12 where the manipulated value MV of the upper loop is set If E2 is not used specify a dummy device SD820 Execution cycle T Set the execution cycle T in SD816 and SD817 in single precision real number Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 96 Control cycle counter initialization completion flag System 97 Control cy...

Page 1275: ...pper loop MV the TRKF of the disable alarm detection INH of the upper loop is set to 1 Control mode MODE setting Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer to the following expression is performed and then tracking processing 2 is performed If the set value E2 is not specified tracking processing 2 is performed without performi...

Page 1276: ...s of the alarm detection ALM Control cycle determination 7 If the specified control cycle is not reached output value BW is set to 0 and the S BPI instruction is terminated If the specified control cycle is reached SV setting processing 1 is performed Condition Operational expression Direct action PN 1 DV E1 SVn Reserve action PN 0 DV SVn E1 Condition Operational expression DV GW K GG DV GW Item O...

Page 1277: ...d operation such as division by zero is performed 3402H The value specified by s1 s2 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H The control cycle CT setting is less than 0 The execution cycle T setting is less than 0 The value divided the control cycle CT by the execution cycle T exceeds 32767 ...

Page 1278: ...gle precision real number d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 When E2 is used Set value start device When E2 is not used Dummy device Refer to Set value Single precision real number EN Execution condition Bit ENO Execution ...

Page 1279: ...y 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Position Symbol Name Recommended range Data type Standard value Set by 0 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binary 0 User 1 SVPTN Set value pattern 0 to 3 1 Use of set value Specify whether to use the set value E2 or not 0 Used 1 Not used 2 Set value pattern Specify whe...

Page 1280: ...r 0 0 User 16 17 BIAS Bias 999999 to 999999 Single precision real number 0 0 User 46 47 CT Control cycle 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 50 51 DR Variation rate limit value 0 to 999999 Single precision real number 100 0 User 52 53 RMAX Ratio upper limit value 999999 to 999999 Single precision real number 100 0 User 54 55 RMIN Ratio lower l...

Page 1281: ... engineering value transformation tracking and variation rate limiter SPR Set value Rn Current ratio value DR Variation rate limit value Cy Control cycle The following is the processing block diagram of the S R instruction The numbers 1 to 6 in the diagram indicate the order of the processing Operand s3 Position Symbol Name Recommended range Data type Standard value Set by 0 1 E2 Set value 10 to 1...

Page 1282: ...ng MAN AUT CMV CMB CAB LCM LCA or LCC Condition Operational expression SPR Rn DR Rn Rn 1 DR SPR Rn DR Rn Rn 1 DR SPR Rn DR Rn SPR SPA status Processing details 1 The loop stops When the loop stops the following operations are performed and the S R instruction ends The last output value BW is held The control mode MODE is set to MAN 0 The loop runs and control cycle determination processing 5 is pe...

Page 1283: ...cision real number d1 Block memory start device Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G...

Page 1284: ...d binary 4000H User system 4 INH Disable alarm detection 0 to FFFFH 0 Alarm detection enabled 1 Alarm detection disabled 16 bit unsigned binary 4000H User system 10 11 PV Process value RL to RH Single precision real number 0 0 System 22 23 RH Engineering value upper limit 999999 to 999999 Single precision real number 100 0 User 24 25 RL Engineering value lower limit 999999 to 999999 Single precisi...

Page 1285: ...arm hysteresis 0 to 999999 Single precision real number 0 0 User 42 43 CTIM Variation rate alarm check time 0 to 999999 s Set a value within the following range Single precision real number 0 0 User 44 45 DPL Variation rate alarm value 0 to 100 Single precision real number 100 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 124 Variation rate monitoring cou...

Page 1286: ...m indicate the order of the processing BB1 OR BB4 BB5 AND AND AND OFF BW PHA PLA ERRI PHI ERRI PLI ERRI HHI ERRI LLI ERRI DPPI ERRI DPNI HHA LLA DPPA DPNA E1 2 SPA 3 5 5 AND BW BB2 BB3 AND AND 1 4 LL HH PL PH LL HH PL PH RL RH DPL CTIM PV HS STOP SPA 1 RUN SPA 0 Upper lower limit check Upper upper limit check Lower lower limit check Positive Negative Loop stop determination Loop stop processing En...

Page 1287: ...med for the duration specified by the variation rate alarm check time CTIM The number of executions of a variation rate check is determined by the following expression Set CTIM and T so that m 2 No processing is performed when m 0 integral part Ex When m 4 operations are performed as shown below Check item Condition ALM BB2 BB3 Upper limit check E1 PH PHA 1 1 1 1 E1 PH HS PHA 0 0 Others PHA The la...

Page 1288: ... 0 E1n m E1n DPL DPNA 1 2 1 2 Others DPNA 0 0 SPA status Processing details 1 The loop stops When the loop stops the following operations are performed and the S PHPL instruction ends The instruction performs engineering value inverse transformation using the following expression The alarm bits BB1 BB2 BB3 BB4 and BB5 are set to 0 The DMLA MHA and DLA of alarm detection ALM are set to 0 0 The loop...

Page 1289: ...ut data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word d2 Local work memory start device Refer to Local work memory Single precision real number EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Oth...

Page 1290: ...value Set by 0 1 E1 Input value 999999 to 999999 Single precision real number User 2 e1 Actuating signal 0 Lead lag compensation 1 No lead lag compensation 16 bit unsigned binary User Operand d1 Position Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Position Symbol Name Recommended range Data type S...

Page 1291: ... 0 when T T 0 e1 1 BW E1 The input value is output as is Error code SD0 Description 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 d1 s2 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Lag time T1 0 or lead time T2 0 The execution cycle T setting is less than 0 BW T2 E1 E1n 1 T1 Last BW value T E1 T1 T 1 ...

Page 1292: ...data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM...

Page 1293: ...sion real number User 2 e1 Operation control signal 0 Integration operation performed 1 Integration operation not performed 16 bit unsigned binary User Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 T Integral ...

Page 1294: ...ta start device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word d2 Local work memory start device Refer to Local work memory Single precision real number EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X...

Page 1295: ...e Data type Standard value Set by 0 1 E1 Input value 999999 to 999999 Single precision real number User 2 e1 Operation control signal 0 Differentiation operation performed 1 Differentiation operation not performed 16 bit unsigned binary User Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Opera...

Page 1296: ...l Operation Instructions Operation error Error code SD0 Description 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 d1 s2 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred ...

Page 1297: ...e s1 Input data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Local work memory start device Refer to Local work memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W...

Page 1298: ... 999999 Single precision real number System 2 BB BB1 Data sufficiency bit 0 Data sufficient 1 Data insufficient 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 ST Data sampling interval 0 to 999999 Set a value within the following range Single precision real number 1 0 User 2 SN Sampling count 0 to 48 16 bit unsigned binary 0 User 3...

Page 1299: ... 1 The cycle counter value is rounded off to the nearest whole number Execution cycle T Set the execution cycle T in SD816 and SD817 in single precision real number Operand d2 Device Symbol Name Recommended range Data type Standard value Set by 0 Last value input e1 System 1 Cycle counter 1 2 Number of data blocks stored in the dead time table 3 4 Dead time table 1 5 6 Dead time table 2 2SN 1 2SN ...

Page 1300: ...and the output value BW equals the input value E1 Operation error SN Dead time table e1 OCHG Dead time BW 1 0 1 E1 1 0 0 ST SN Up to SN E1 when e1 changed from 1 to 0 After SN Least recent data 1 1 Up to SN YS After SN Least recent data 1 0 0 0 1 ST SN Least recent data 1 Error code SD0 Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 o...

Page 1301: ...art device Refer to Input data Word d1 Block memory start device Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST...

Page 1302: ...m value in E1 to En Single precision real number System 2 BB BB1 to BB1 6 Output selection 0 Corresponding input value is not the maximum value 1 Corresponding input value is the maximum value 16 bit unsigned binary System Input value E16 E15 E14 to E2 E1 Bit to be set to 1 at the maximum value BB16 BB15 BB14 to BB2 BB1 Condition Processing Two or more maximum values exist The bits corresponding t...

Page 1303: ...rt device Refer to Input data Word d1 Block memory start device Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST ...

Page 1304: ...m value in E1 to En Single precision real number System 2 BB BB1 to BB1 6 Output selection 0 Corresponding input value is not the minimum value 1 Corresponding input value is the minimum value 16 bit unsigned binary System Input value E16 E15 E14 to E2 E1 Bit to be set to 1 at the minimum value BB16 BB15 BB14 to BB2 BB1 Condition Processing Two or more minimum values exist The bits corresponding t...

Page 1305: ...ata type s1 Input data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M...

Page 1306: ...mediate value in the sorted values is selected Ex When the input data are 2 5 1 4 and 3 operations are performed as shown below In this example 3 is the intermediate value and accordingly the output select BB5 is set to 1 Operand s1 Device Symbol Name Recommended range Data type Standard value Set by 0 n Number of inputs 1 to 16 16 bit unsigned binary User 1 2 E1 Input value 1 999999 to 999999 Sin...

Page 1307: ...TROL INSTRUCTIONS 11 3 Control Operation Instructions 1305 11 Operation error Error code Error content 3402H s1 is a subnormal number or NaN not a number 3405H The number of inputs n is less than 1 or greater than 16 ...

Page 1308: ... device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Empty string specification Specify in ladder Specify in ST or FBD LD String s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L S...

Page 1309: ...ended range Data type Standard value Set by 0 n Number of inputs 1 to 16 16 bit unsigned binary User 1 2 E1 Input value 1 999999 to 999999 Single precision real number User 3 4 E2 Input value 2 2n 1 2n En Input value n Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value Mean value of E1 to En Single precision real number System Error code Error conte...

Page 1310: ...mory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1...

Page 1311: ...r limit alarm 0 No alarm 1 Alarm 16 bit unsigned binary System BB2 Lower limit alarm Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 HILMT Upper limit value 1 999999 to 999999 Single precision real number 100 0 User 2 3 LOLMT Lower limit value 1 999999 to 999999 Single precision real number 0 0 User 4 5 HS1 Upper limit hysteresis 0 to 999999 Single precision rea...

Page 1312: ...Error code Error content 3402H The value specified by s1 or s2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Upper hysteresis HS1 is greater than 0 or the lower hysteresis HS2 is smaller than 0 Lower limit value LOLMT is greater than upper limit value HILMT ...

Page 1313: ...on real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H...

Page 1314: ...2 Negative direction limit alarm Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 V1 Positive direction limit value 0 to 999999 s Single precision real number 100 0 User 2 3 V2 Negative direction limit value 0 to 999999 s Single precision real number 100 0 User 4 5 HS1 Positive direction hysteresis 0 to 999999 Single precision real number 0 0 User 6 7 HS2 Negativ...

Page 1315: ...1313 11 Operation error Error code Error content 3402H The value specified by s1 or s2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Positive direction hysteresis HS1 is less than 0 or the negative direction hysteresis HS2 is less than 0 ...

Page 1316: ...eal number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z...

Page 1317: ...rm 0 No alarm 1 Alarm 16 bit unsigned binary System BB2 Negative direction limit alarm Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 V1 Positive direction limit value 0 to 999999 s Single precision real number 100 0 User 2 3 V2 Negative direction limit value 0 to 999999 s Single precision real number 100 0 User 4 5 HS1 Positive direction hysteresis 0 to 999999...

Page 1318: ...tions Operation error Error code Error content 3402H The value specified by s1 or s2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Positive direction hysteresis HS1 is less than 0 or the negative direction hysteresis HS2 is less than 0 ...

Page 1319: ...ata Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 Set value start device when E2 is used Dummy device when E2 is not used Refer to Set value Single precision real number EN Execution condition Bit ENO Execution result Bit Operan...

Page 1320: ...1 Operation result 0 BW 50 1 BW 50 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 1 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binary 0 User 2 SVPTN Set value pattern 0 to 3 1 Use of set value Specify whether to use th...

Page 1321: ...H User system 12 13 MV Manipulated value 10 to 110 Single precision real number 0 0 User system 14 15 SV Set value RL to RH Single precision real number 0 0 User 16 17 DV Deviation 110 to 110 Single precision real number 0 0 System 18 19 HS0 Hysteresis 0 to 999999 Single precision real number 0 0 User 22 23 RH Engineering value upper limit 999999 to 999999 Single precision real number 100 0 User 2...

Page 1322: ...setting processing 1 The following processing is performed depending on the control mode MODE setting Operand s3 Device Symbol Name Recommended range Data type Standard value Set by 0 1 E2 Set value 10 to 110 Single precision real number 0 0 User system Control mode MODE setting Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer to the...

Page 1323: ...us of the alarm detection ALM Control cycle determination 7 If the specified control cycle is not reached the following processing is performed If the specified control cycle is reached SV setting processing 1 is performed The tracking bit TRK is set to 1 The set value E2 is used The control mode MODE is set to any of the following MAN AUT CMV CMB CAB LCM LCA or LCC E2 SVn Condition DV Direct acti...

Page 1324: ... as division by zero is performed 3402H The value specified by s1 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H The control cycle CT setting is less than 0 The execution cycle T setting is less than 0 Hysteresis HS0 hysteresis HS0 The value divided the control cycle CT by the execution cycle T exceeds 32767 ...

Page 1325: ... data Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 Set value start device when E2 is used Dummy device when E2 is not used Refer to Set value Single precision real number EN Execution condition Bit ENO Execution result Bit Oper...

Page 1326: ...CONTROL INSTRUCTIONS 11 3 Control Operation Instructions Input data Operand s1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 E1 Input value 999999 to 999999 Single precision real number User ...

Page 1327: ... range Data type Standard value Set by 0 PN Operation mode 0 Reverse action 1 Direct action 16 bit unsigned binary 0 User 1 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binary 0 User 2 SVPTN Set value pattern 0 to 3 1 Use of set value Specify whether to use the set value E2 or not 0 Used 1 Not used 2 Set value pattern Specify whether to use the upper loop MV as th...

Page 1328: ...e 10 to 110 Single precision real number 0 0 User system 14 15 SV Set value RL to RH Single precision real number 0 0 User 16 17 DV Deviation 110 to 110 Single precision real number 0 0 System 18 19 HS0 Hysteresis 0 0 to 999999 Single precision real number 0 0 User 20 21 HS1 Hysteresis 1 0 to 999999 Single precision real number 0 0 User 22 23 RH Engineering value upper limit 999999 to 999999 Singl...

Page 1329: ...ng 1 The following processing is performed depending on the control mode MODE setting Operand s3 Device Symbol Name Recommended range Data type Standard value Set by 0 1 E2 Set value 10 to 110 Single precision real number 0 0 User system Control mode MODE setting Processing details CAS CCB CSV If the set value E2 is specified engineering value transformation processing refer to the following expre...

Page 1330: ...ions Three position on off control 5 The BB operation results BB1 BB2 are output under the following conditions Loop stop processing 6 The following processing is performed according to the SPA status of the alarm detection ALM The tracking bit TRK is set to 1 The set value E2 is used The control mode MODE is set to any of the following MAN AUT CMV CMB CAB LCM LCA or LCC E2 SVn Condition DV Direct...

Page 1331: ...CMV or LCM Three position on off control 5 is processed assuming that the output value BW equals the manipulated value MV Error code Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H Hysteresis 0 HS0 is less than 0 The control cycle CT setting is less th...

Page 1332: ...tart device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 d1 s2...

Page 1333: ...99 Single precision real number System 2 BB BB1 Dead band operation 0 Out of dead band range 1 Within dead band range 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 D1 Dead band upper limit 999999 to 999999 Single precision real number 100 0 User 2 3 D2 Dead band lower limit 999999 to 999999 Single precision real number 0 0 User Co...

Page 1334: ...pecification Specify in ladder Specify in ST or FBD LD String d1 Block memory start device Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String d2 Loop tag memory start device Refer to Loop tag memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX ...

Page 1335: ...4 INH Disable alarm detection 0 to FFFFH 0 Alarm detection enabled 1 Alarm detection disabled 16 bit unsigned binary 4000H User system 10 PTNO Number of operation constant break points 0 to 16 16 bit unsigned binary 0 User 12 13 MV Manipulated value 10 to 110 Single precision real number 0 0 User system 14 15 SV Set value 0 to 999999 s Single precision real number 0 0 User system 16 TYPE Operation...

Page 1336: ... Execution cycle T Set the execution cycle T in SD816 and SD817 in single precision real number 54 55 MV1 Set output 1 10 to 110 Single precision real number 0 0 User 84 85 MV16 Set output 16 Operand d2 Position Symbol Name Recommended range Data type Standard value Set by ...

Page 1337: ...e Outputs data while holding the value of setting time 10 SV10 Return type Sets the set value SV to 0 and outputs the last value of the manipulated value MV Cyclic type Processes based on the setting time 1 SV1 to 10 SV10 and then restarts processing from setting time 1 SV1 MVPGS MV5 MV6 MV3 MV4 MV7 MV8 MV1 MV2 MV9 MV10 SV1 SV2 SV3 SV4SV5 SV6 SV7 SV8 SV9 SV10 SV BW MHA SPA PTNO OR MODE MLA BB1 3 4...

Page 1338: ...ration stop with the current SV and MV AUT CAB 0 Hold type operation 1 Return type operation CAS CCB CSV Cyclic type operation SPA status Processing details 1 The loop stops When the loop stops or the number of operation constant break points is 0 the following operations are performed and the S PGS instruction ends The output value BW is held All of the output alarm bits BB1 BB2 and BB3 are set t...

Page 1339: ...ror Error code Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H The number of operation constant break points PTNO is less than 0 or greater than 16 ...

Page 1340: ...a 1 start device Refer to Input data 1 Single precision real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Loop tag memory start device Refer to Loop tag memory Word s3 Input data 2 start device Refer to Input data 2 Single precision real number EN Execution condition Bit ENO Execution result Bit Operand Bit Wo...

Page 1341: ...e precision real number 100 0 User 2 3 NMIN Output conversion lower limit 999999 to 999999 Single precision real number 0 0 User 4 TRK Tracking bit 0 Tracking not performed 1 Tracking performed 16 bit unsigned binary 0 User 5 SVPTN Set value pattern 1 Input value selection e1 Specify whether to use E1 or E2 for the input value 0 E1 1 E2 2 Use of input value 1 E1 Specify whether to use the input va...

Page 1342: ...ystem 14 15 PV1 Process value 1 RL to RH Single precision real number 0 0 System 16 17 PV2 Process value 2 RL to RH Single precision real number 0 0 System 18 19 MH Output upper limit value 10 to 110 Single precision real number 100 0 User 20 21 ML Output lower limit value 10 to 110 Single precision real number 0 0 User 22 23 RH Engineering value upper limit 999999 to 999999 Single precision real ...

Page 1343: ...tern SVPTN to specify which input value is to be used 1 E1 or 2 E2 Input value selection e1 0 Input value 1 E1 is used Selected value PV process value 1 PV1 Input value selection e1 1 Input value 2 E2 is used Selected value PV process value 2 PV2 Selected No SLNO The bit corresponding to the input value E1 or E2 is set to 1 Operand s3 Position Symbol Name Recommended range Data type Standard value...

Page 1344: ...MODE Processing details MAN CMB CMV LCM Output conversion processing 5 is performed The MHA MLA and DMLA of the alarm detection ALM are set to 0 The alarm bits BB1 BB2 BB3 and BB4 are set to 0 AUT CAB CAS CCB CSV LCA LCC The instruction performs engineering value inverse transformation using the following expression Variation rate upper lower limiter processing 4 is performed Condition T BB4 DMLA ...

Page 1345: ...ration Instructions 1343 11 Operation error Error code Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 s2 d2 or s3 is a subnormal number or NaN not a number 3403H An overflow has occurred ...

Page 1346: ...ion S BUMP Operand Description Range Data type s1 Input data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word d2 Local work memory start device Refer to Local work memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indire...

Page 1347: ... User 2 3 E2 Output control value 999999 to 999999 Single precision real number User 4 e1 Mode switching signal 0 Manual mode 1 Automatic mode 16 bit unsigned binary User Operand d1 Position Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Position Symbol Name Recommended range Data type Standard value...

Page 1348: ...e following expressions Output value BW output control value E2 Initial deviation value Xq output control value E2 output set value E1 Deviation Xp output control value E2 output set value E1 In automatic mode mode switching signal e1 1 the instruction calculates the output value BW from the following expressions However in automatic mode in which lag time T execution cycle T output value BW outpu...

Page 1349: ...t device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB F...

Page 1350: ...ue 999999 to 999999 Single precision real number User 6 e1 Operation output signal e1 0 Manual mode 1 Automatic mode e2 0 Do not add 1 Add e3 0 Do not subtract 1 Subtract 16 bit unsigned binary User e2 Output addition signal e3 Output subtraction signal Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number ...

Page 1351: ...gnal e1 0 the output value BW equals the output set value E3 In automatic mode operation output signal e1 1 the instruction performs the following operations as specified by the output addition signal e2 and output subtraction signal e3 Operation error e2 e3 BW 1 0 BW BW E1 T provided that when d1 BW BW equals d1 0 1 BW BW E2 T provided that when BW d2 BW equals d2 1 1 BW BW 0 0 Error code Error c...

Page 1352: ...1 Input data start device Refer to Input data Single precision real number d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant 16 bit unsigned binary d2 Local work memory start device Refer to Local work memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect spe...

Page 1353: ...e Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 SN Number of break points 0 to 48 16 bit unsigned binary 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 0 1 X1 Break point coordinates 999999 to 999999 Single precision real number User 2 3 Y1 B...

Page 1354: ...Xi 1 Xi processing is stopped when n i 1 The subsequent data is ignored When there are two or more Xi for the same Yi the Y with smaller i is selected Operation error Condition Output value BW E1 X1 BW Y1 Xi 1 E1 Xi i 2 to n Xn E1 BW Yn Error code Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 or d2 is a subnormal number or NaN not a ...

Page 1355: ...Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant 16 bit unsigned binary d2 Local work memory start device Refer to Local work memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD ...

Page 1356: ...lected Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 SN Number of break points 0 to 48 16 bit unsigned binary 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 0 1 X1 Break...

Page 1357: ...ration error Error code Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 or d2 is a subnormal number or NaN not a number 3403H An overflow has occurred 3405H The number of break points SN is less than 0 or greater than 48 ...

Page 1358: ...ion real number d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word d2 Local work memory start device Refer to Local work memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST ...

Page 1359: ... insufficient Unsigned 16 bit binary data System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 ST Data sampling interval 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 2 SN Sampling count 0 to 48 16 bit unsigned binary 0 User Operand d2 Position Symbol Name Recommended range Data type Standard value Set by 0 1 ST Las...

Page 1360: ... data blocks SN the data sufficiency bit BB1 is set to 0 When the dead time table does not have sufficient data BB1 is set to 1 Until the dead time table is filled with data the past data is averaged and output Processing is performed by ST n T n is an integer Operation error Error code Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 s...

Page 1361: ...efer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T S...

Page 1362: ...l 0 Integration operation not performed 1 Integration operation not performed 16 bit unsigned binary User Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 ILC Input low cut value 999999 to 999999 Single precision...

Page 1363: ... data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L S...

Page 1364: ...ssure 999999 to 999999 Single precision real number User 6 e e1 E2 use flag 0 Not used 1 Used 16 bit unsigned binary User e2 E3 use flag Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 TEMP Designed temperature ...

Page 1365: ... Operation Instructions 1363 11 Operation error Error code Error content 3400H An invalid operation such as division by zero is performed 3402H The value specified by s1 or s2 is a subnormal number or NaN not a number 3403H An overflow has occurred ...

Page 1366: ...memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H...

Page 1367: ...e 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 RH Engineering value upper limit 999999 to 999999 Single precision real number 100 0 User 2 3 RL Engineering value lower limit 999999 to 999999 Single precision real number 0 0 User Error code Error content 3400H An invalid operation such as division by zero is...

Page 1368: ... d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U...

Page 1369: ... BW becomes 0 Operation error Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 RH Engineering value upper limit 999999 to 999999 Single precision real number 100 0 User 2 3 RL Engineering value lower limit 999999...

Page 1370: ... start device Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B...

Page 1371: ...E2 Input value 2 2n 1 2n En Input value n Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 n Number of coefficients 0 to 5 16 bit unsigned binary 0 User 1 2 K1 Coefficient 1 999999 to 999999 Single precision real n...

Page 1372: ...efer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T S...

Page 1373: ... User 3 4 E2 Input value 2 2n 1 2n En Input value n Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 n Number of coefficients 0 to 5 16 bit unsigned binary 0 User 1 2 K1 Coefficient 1 999999 to 999999 Single precis...

Page 1374: ... Refer to Input data Word d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T...

Page 1375: ...r User 3 4 E2 Input value 2 2n 1 2n En Input value n Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 n Number of coefficients 0 to 5 16 bit unsigned binary 0 User 1 2 K1 Coefficient 1 999999 to 999999 Single preci...

Page 1376: ...o Input data Single precision real number d1 Block memory start device Refer to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM ...

Page 1377: ... Name Recommended range Data type Standard value Set by 0 1 BW Output value 999999 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 A Coefficient 1 999999 to 999999 Single precision real number 1 0 User 2 3 K1 Coefficient 2 999999 to 999999 Single precision real number 1 0 User 4 5 K2 Coefficient 3 999999 to 999999 Si...

Page 1378: ...er to Block memory Single precision real number s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E...

Page 1379: ... Input value E1 Output low cut value OLC Operation error Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 0 to 999999 Single precision real number System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 OLC Output low cut value 0 to 999999 Single precision real number 0 0 User 2 3 K Coefficient 0 to 999999 Single...

Page 1380: ...ice Refer to Block memory Word s2 Empty string specification Specify in ladder Specify in ST or FBD LD String s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 d1...

Page 1381: ...esult to the sign determination bits BB1 and BB2 of the input value E1 Operation error Operand d1 Device Symbol Name Recommended range Data type Standard value Set by 0 1 BW Output value 0 to 999999 Single precision real number System 2 BB BB1 Sign determination of Input value E1 E1 0 BB1 1 E1 0 BB2 1 E1 0 BB1 BB2 0 16 bit unsigned binary System BB2 E1 status BB1 BB2 E1 0 1 0 E1 0 0 1 E1 0 0 0 Err...

Page 1382: ...ion Range Data type s1 Input data start device Refer to Input data Word d1 Block memory start device Refer to Block memory Word s2 Operation constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M...

Page 1383: ...mended range Data type Standard value Set by 0 1 BW Output value The same value as the input value 1 E1 is stored Single precision real number System 2 BB BB1 Comparison output The comparison result of E1 and E2 is stored 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 K Set value 999999 to 999999 Single precision real number 0 0 Us...

Page 1384: ...eration constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 d1 s2 s3 Operand s1 Device Symbol Name Recommende...

Page 1385: ...le precision real number System 2 BB BB1 Comparison output The comparison result of E1 and E2 is stored 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 K Set value 999999 to 999999 Single precision real number 0 0 User 2 3 HS Hysteresis 0 to 999999 Single precision real number 0 0 User Condition BB1 E1 E2 K 1 E1 E2 K HS 0 E2 K E1 E2...

Page 1386: ...tant start device Refer to Operation constant Single precision real number s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 d1 s2 s3 Operand s1 Device Symbol Nam...

Page 1387: ... 1 BW Output value The same value as the input value 1 E1 is stored Single precision real number System 2 BB BB1 Comparison output The comparison result of E1 and E2 is stored 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 K Set value 999999 to 999999 Single precision real number 0 0 User Condition BB1 E1 E2 K 1 E1 E2 K 0 Error cod...

Page 1388: ...eration constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 d1 s2 s3 Operand s1 Device Symbol Name Recommende...

Page 1389: ...le precision real number System 2 BB BB1 Comparison output The comparison result of E1 and E2 is stored 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 K Set value 999999 to 999999 Single precision real number 0 0 User 2 3 HS Hysteresis 0 to 999999 Single precision real number 0 0 User Condition BB1 E1 E2 K 1 E1 E2 K HS 0 E2 K HS E1...

Page 1390: ...eration constant start device Refer to Operation constant Word s3 Empty string specification Specify in ladder Specify in ST or FBD LD String EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW R ZR RD U G J U3E H G Z LT LST LC LZ K H E s1 d1 s2 s3 Operand s1 Device Symbol Name Recommende...

Page 1391: ...le precision real number System 2 BB BB1 Comparison output The comparison result of E1 and E2 is stored 16 bit unsigned binary System Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 1 K Set value 999999 to 999999 Single precision real number 0 0 User 2 3 HS Hysteresis 0 to 999999 Single precision real number 0 0 User Condition BB1 E1 E2 K 1 E1 E2 K HS 0 E2 K E1 E2...

Page 1392: ...ise manner and look how the process value PV varies When MV is changed in a stepwise manner PV begins to change slowly Soon the change speed becomes faster and then becomes slow again and finally is settled as a fixed value Draw a tangent line at the place where PV varies fastest and find the points of intersection A and B where the tangent line crosses the horizontal axis corresponding to the fir...

Page 1393: ...ocess is stabilized Disconnect the S 2PID S PID instruction of the tuning target loop and connect the S AT1 instruction to where the S 2PID S PID instruction was located Set the auto tuning start signal e1 to 1 Start Auto tuning The auto tuning completion status BB16 is set to 1 Completed at completion of auto tuning Set the auto tuning start signal e1 to 0 End The auto tuning completion status BB...

Page 1394: ...ompletion Time chart from auto tuning start till stop due to alarm occurrence MV MV MV AT1STEPMV BB1 to BB8 Start of auto tuning End of auto tuning PID constants are set e1 BB16 MV MV MV MV AT1STEPMV PID constants are not set Start of auto tuning BB1 to BB8 Cancellation of auto tuning Alarm e1 BB16 MV ...

Page 1395: ... Block memory start device Refer to Block memory 16 bit unsigned binary s2 Operation constant start device Refer to Operation constant 16 bit unsigned binary d2 Loop tag memory start device Refer to Loop tag memory Word d3 Local work memory start device Refer to Local work memory Word EN Execution condition Bit ENO Execution result Bit Operand Bit Word Double word Indirect specification Constant O...

Page 1396: ...d BB1 to BB8 0 No alarm 1 Alarm 16 bit unsigned binary System BB2 Input upper limit alarm BB3 Input lower limit alarm BB4 Output upper limit alarm BB5 Output lower limit alarm BB6 Timeout alarm BB7 Control mode alarm BB8 Identification alarm BB1 6 Auto tuning completion Operand s2 Device Symbol Name Recommended range Data type Standard value Set by 0 PN Operation mode 0 Reverse action 1 Direct act...

Page 1397: ...eal number 10 0 User system 56 57 D Derivative constant 0 to 999999 s Single precision real number 0 0 User system 70 71 AT1STEP MV AT1 step manipulated value 100 to 100 Single precision real number 0 0 User 72 73 AT1ST AT1 sampling cycle 0 to 999999 s Set a value within the following range Single precision real number 1 0 User 74 75 AT1TOUT 1 AT1 timeout time 0 to 999999 s Set a value within the ...

Page 1398: ...mber Operand d3 Device Symbol Name Recommended range Data type Standard value Set by 0 Sampling period counter initialization completion flag System 1 Sampling period counter 1 2 Timeout time counter initialization completion flag 3 Timeout time counter 1 4 Timeout time after maximum ramp counter initialization completion flag 5 Timeout time after maximum ramp counter 1 6 Step manipulated value se...

Page 1399: ...the following operations are performed and the S AT1 instruction ends Auto tuning completion BB16 is set to 1 When the step manipulated value set completion flag is 1 the following processing is performed MV MV AT1STEPMV 0 The loop runs and mode determination processing is performed Control mode MODE setting Processing details AUT CAB CAS CCB CSV LCA LCC The following processing is performed and t...

Page 1400: ...termination processing is performed Sampling cycle determination processing This function checks the AT1 sampling period AT1ST to determine whether the sampling period has been reached If the sampling period has not been reached the S AT1 instruction is terminated If the sampling period has been reached response waveform observation processing is performed Auto tuning processing Processing details...

Page 1401: ...ep manipulated value AT1STEPMV 0 Maximum ramp value Ramp T2 Maximum ramp value Ramp T2 Maximum ramp counter Counter from the start of auto tuning Maximum ramp PV Input value E1 Reset the timeout time after maximum ramp counter and start counting again Maximum ramp value Ramp T2 The last maximum ramp value remains unchanged Processing Item Response speed The response speed for calculation R and res...

Page 1402: ...ol method Proportional gain KP P Integral constant TI I Derivative constant TD D P 0 0 PI 3 33 L 0 PID 2 L 0 5 L PID constants are stored in the gain P integral constants I and derivative constants D Auto tuning completion BB16 is set to 1 The AT1 step manipulated value AT1SETPMV is subtracted from the manipulated value MV and the result is stored in the manipulated value MV MV MV AT1STEPMV Error ...

Page 1403: ...r D P DDWR instruction the fixed scan communication function of the system parameters needs to be set Instruction symbol Description Application D P DDRD Loads the device data of another CPU module to the device of the host CPU module Use these instructions to read or write data at the timing set by the fixed scan communication function D P DDWR Writes the device data of the host CPU module to the...

Page 1404: ...ation enables writing to or reading from every range of the device in another CPU module For example when the data register of the host CPU has 12K points while the data register of another CPU module has 16K points 16K points of data can be written to or read from the head of the data register of another CPU module Even if 0 is added to higher places of a device number the device is processed the...

Page 1405: ...d Maximum number of data points that can be written 2 modules 8192 point 8192 point 3 modules 4096 point 4096 point 4 modules 2048 point 2048 point Reading writing Number of blocks Example Read Number of blocks used by instructions 21 number of read data points 16 When the number of read data points is 100 Number of blocks used by instructions 21 100 16 7 blocks Write Number of blocks used by inst...

Page 1406: ...nother CPU module access instructions executed for CPU module No 3 is 5 specify 5 in SD798 When the number of blocks specified in any of SD796 to SD799 is exceeded the relevant special relay SM796 to SM799 turns on Precautions Execute the D P DDWR M P DDWR D P DDRD or M P DDRD instruction while the read write target CPU module is on If the instruction is executed while the target CPU is not on the...

Page 1407: ...1 s2 d1 d2 ENO M_DDRD EN U H s1 s2 d1 d2 ENO MP_DDRD EN U H s1 s2 d1 d2 FBD LD Instruction Execution condition D DDRD M DDRD DP DDRD MP DDRD Operand Description Range Data type Data type label U H Start I O number first three digits in four digit hexadecimal representation of another CPU module 3E0H to 3E3H 16 bit unsigned binary ANY16 s1 Start device of host CPU module where the control data is s...

Page 1408: ...d M P DDRD instructions Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U H s1 s2 d1 d2 Operand s1 Device Item Description Setting range Set by 0 Completion status The completion status is stored 0000H Completed successfully Other than 0000H Completed with an error error code System 1 Num...

Page 1409: ... Unchanged from off When completed with an error Turns on in END processing of the scan performed upon completion of the D P DDRD or M P DDRD instruction and turns off in the next END processing When completed with an error an error code is stored in the device completion status specified by s1 0 Error code SD0 Description 2800H The start I O number first three digits in four digit hexadecimal rep...

Page 1410: ...U H s1 s2 d1 d2 ENO M_DDWR EN U H s1 s2 d1 d2 ENO MP_DDWR EN U H s1 s2 d1 d2 FBD LD Instruction Execution condition D DDWR M DDWR DP DDWR MP DDWR Operand Description Range Data type Data type label U H Start I O number first three digits in four digit hexadecimal representation of another CPU module 3E0H to 3E3H 16 bit unsigned binary ANY16 s1 Start device of host CPU module where the control data...

Page 1411: ...and M P DDWR instructions Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U H s1 s2 d1 d2 Operand s1 Device Item Description Setting range Set by 0 Completion status The completion status is stored 0000H Completed successfully Other than 0000H Completed with an error error code System 1 N...

Page 1412: ... Unchanged from off When completed with an error Turns on in END processing of the scan performed upon completion of the D P DDWR or M P DDWR instruction and turns off in the next END processing When completed with an error an error code is stored in the device completion status specified by s1 0 Error code SD0 Description 2800H The start I O number first three digits in four digit hexadecimal rep...

Page 1413: ...between the status active or inactive of the specified step and the previous operation result s and output the operation result OR Single normally open contact parallel connection ORI Single normally closed contact parallel connection These instructions perform an OR operation between the status active or inactive of the specified step and the previous operation result s and output the operation r...

Page 1414: ...s on When no SFC program exists SM320 is off or SM321 is off the status on or off of the contact will be as follows Instruction Execution condition LD LDI AND ANI OR ORI Every scan Operand Description Range Data type Data type label s Device used as a contact Bit ANY_BOOL Operand Bit Word Double word Indirect specification Constant Others BL S X Y M L SM F B S SB FX FY J T ST C D W SD SW FD R ZR R...

Page 1415: ...13 SFC PROGRAM INSTRUCTIONS 13 1 SFC Control Instructions 1413 13 Operation error There is no operation error ...

Page 1416: ...ontact parallel connection ORI Single normally closed contact parallel connection These instructions perform an OR operation between the status active or inactive of the specified block and the previous operation result s and output the operation result Execution condition The RnCPU and RnENCPU with firmware version 12 or later support these instructions Use an engineering tool with version 1 015R...

Page 1417: ...SM321 is on Precautions When no SFC program exists SM320 is off or SM321 is off the status on or off of the contact will be as follows Operation error There is no operation error Operand Description Range Data type Data type label s Device used as a contact Bit ANY_BOOL Operand Bit Word Double word Indirect specification Constant Others BL X Y M L SM F B S SB FX FY J T ST C D W SD SW FD R ZR RD U ...

Page 1418: ...ocess with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO MOV EN s d ENO MOVP EN s d FBD LD Instruction Execution condition MOV MOVP Operand Description Range Data type Data type label s Device number where the transfer source data is stored 16 bit signed binary ANY16 d Transfer destination device number 16 bit signed bin...

Page 1419: ...ad to D1 The status of each step is stored in other bits If the read target range exceeds the number of steps in the specified block 0 is stored in the bits exceeding the existing step No Ex When the last step No in the block is 26 and the status of steps No 16 to No 31 are read to D1 The status of each step is stored in other bits If the block No that does not exist or does not include the read t...

Page 1420: ... current block of an SFC program use K4S To specify a step in another block of an SFC program use BL K4S To specify a step of a sequence program use BL K4S Error code SD0 Description 2820H When a block No is specified the specified block No is out of the range 0 to 319 When a block No is specified the specified step No is out of the range 0 to 511 ...

Page 1421: ...re version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO DMOV EN s d ENO DMOVP EN s d FBD LD Instruction Execution condition DMOV DMOVP Operand Description Range Data type Data type label s Device number where the transfer source data is stored 32 bit signed binary ANY32 d Transfer destination device number 32 bit signed binary ANY32 EN ...

Page 1422: ...ored in other bits If the read target range exceeds the number of steps in the specified block 0 is stored in the bits exceeding the existing step No Ex When the last step No in the block is 26 The status of each step is stored in other bits If the block No that does not exist or does not include the read target data is specified or if the specified block No is correct but the non existent step is...

Page 1423: ...e current block of an SFC program use K8S To specify a step in another block of an SFC program use BL K8S To specify a step of a sequence program use BL K8S Error code SD0 Description 2820H When a block No is specified the specified block No is out of the range 0 to 319 When a block No is specified the specified step No is out of the range 0 to 511 ...

Page 1424: ...se an engineering tool with version 1 020W or later Ladder ST ENO BMOV EN s n d ENO BMOVP EN s n d FBD LD Instruction Execution condition BMOV BMOVP Operand Description Range Data type Data type label s Start number of a device where the transfer target data is stored 16 bit signed binary ANY16 d Transfer destination device start number 16 bit signed binary ANY16 n Number of transfer data points 0...

Page 1425: ...target range exceeds the number of steps in the specified block or if the non existent step is specified as a start step undefined values are stored Ex When the last step No in the block is 26 and the status of the steps two words from step No 0 is read to D0 and D1 The status of each step is stored in other bits If the instruction is executed while no SFC program exists or if the block No that do...

Page 1426: ... current block of an SFC program use K4S To specify a step in another block of an SFC program use BL K4S To specify a step of a sequence program use BL K4S Error code SD0 Description 2820H When a block No is specified the specified block No is out of the range 0 to 319 When a block No is specified the specified step No is out of the range 0 to 511 ...

Page 1427: ...e instruction is executed to an inactive block for which online change is being performed the instruction is ignored and processing will continue The RnCPU and RnENCPU with firmware version 12 or later support this instruction Use an engineering tool with version 1 015R or later The RnPCPU process with firmware version 03 or later supports these instructions Use an engineering tool with version 1 ...

Page 1428: ...ol Instructions Operation error Error code SD0 Description 31A1H The specified block does not exist The instruction is executed when no SFC program scan execution type exists or SM321 is off 31A2H The specified block No is out of the range 0 to 319 ...

Page 1429: ...he RnCPU and RnENCPU with firmware version 12 or later support this instruction Use an engineering tool with version 1 015R or later The RnPCPU process with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO RST EN d FBD LD Instruction Execution condition RST Operand Description Range Data type Data type label d Block No to b...

Page 1430: ...ol Instructions Operation error Error code SD0 Description 31A1H The specified block does not exist The instruction is executed when no SFC program scan execution type exists or SM321 is off 31A2H The specified block No is out of the range 0 to 319 ...

Page 1431: ...rocess with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO PAUSE EN d FBD LD Instruction Execution condition PAUSE Operand Description Range Data type Data type label d Block No where the sequence is temporarily stopped Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word...

Page 1432: ... be restarted with the hold status Operation error Operation of the PAUSE and RESTART instructions depends on the combination of the SM325 status block stop mode bit setting of SFC information device and step hold status For details refer to the following MELSEC iQ R Programming Manual Program Design Setting of the block stop mode bit Stop timing Immediate stop All the steps become inactive immedi...

Page 1433: ...d only on the rising edge depends on the status of SM325 The RnCPU and RnENCPU with firmware version 12 or later support this instruction Use an engineering tool with version 1 015R or later The RnPCPU process with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO RSTART EN d FBD LD Instruction Execution condition RSTART Ope...

Page 1434: ...annot be restarted with the hold status If the sequence is stopped while SM325 is on the sequence can be restarted with the hold status Operation error Error code SD0 Description 31A1H The specified block does not exist The instruction is executed when no SFC program scan execution type exists or SM321 is off 31A2H The specified block No is out of the range 0 to 319 ...

Page 1435: ...ocess with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO SET EN d FBD LD Instruction Execution condition SET Operand Description Range Data type Data type label d Step No to be activated Set on target bit device number Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word...

Page 1436: ...convergence is not performed Likewise if the RST instruction Deactivating a step is executed to a single step in a simultaneous sequence a convergence condition is not satisfied The current step No cannot be specified within the action of the SFC program If specified an error occurs Operation error Status of the specified block Operation Inactive The specified block is activated at execution of th...

Page 1437: ...the execution program type The RnCPU and RnENCPU with firmware version 12 or later support this instruction Use an engineering tool with version 1 015R or later The RnPCPU process with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO RST EN d FBD LD Instruction Execution condition RST Operand Description Range Data type Dat...

Page 1438: ...on is not satisfied The current step No cannot be specified within the action of the SFC program If specified an error occurs Operation error Error code SD0 Description 31A1H The specified block does not exist SET RST BL S 31A2H When a block No is specified the specified block No is out of the range 0 to 319 31B1H The instruction is executed when no SFC program scan execution type exists or SM321 ...

Page 1439: ...ess with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST ENO BRSET EN s FBD LD Instruction Execution condition BRSET Operand Description Range Data type Data type label s Target block No 16 bit signed binary ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification ...

Page 1440: ... is targeted the instruction must be executed for each block where the instruction specified by S is used Moreover even within a single step the block is switched only from the point where the instruction is executed to the END processing of the step In the next program the target block will be the current block default until the instruction is executed again 1 END processing is not performed Erro...

Page 1441: ...s refer to the following MELSEC iQ R Programming Manual Program Design The RnCPU and RnENCPU with firmware version 12 or later support this instruction Use an engineering tool with version 1 015R or later The RnPCPU process with firmware version 03 or later supports these instructions Use an engineering tool with version 1 020W or later Ladder ST TRAN s FBD LD RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU ...

Page 1442: ...condition SP CONTSW Operand Description Range Data type Data type label s Instruction ID number A value used to identify a system switching request 32768 to 32767 16 bit signed binary ANY16 d Error completion device The device turns on when the system switching operation failed Bit ANY_BOOL EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specific...

Page 1443: ...s disabled by using the DCONTSW instruction execute the ECONTSW instruction in the standby system before executing the SP CONTSW instruction The value specified by s is stored in SD1650 System switching instruction ID number of both CPU modules when the systems are switched successfully When multiple SP CONTSW instructions are executed in a program the instruction used can be identified by reading...

Page 1444: ... turn on enabled SM1646 If SM1646 is off disabled the systems cannot be switched Even if SM1646 is turned off after execution of the instruction and before the END processing that performs the system switching operation the systems can be switched When the systems are switched by using the instruction When SM1646 is off at execution of the instruction END ON OFF END System A System B Program execu...

Page 1445: ...S 14 1 System Switching 1443 14 Operation error Error code SD0 Description 1BD0H There is a switching disable cause and the systems are not switched during END processing 1BD1H When the instruction is executed SM1646 is off disabled ...

Page 1446: ...ystem is enabled The system switching operation in the control system is enabled by default These instructions can only be executed in the standby system Even if these instructions are executed in the control system no processing is performed To execute these instructions in the standby system in backup mode write the instructions in a program executed in both systems or in a POU called by a progr...

Page 1447: ...tandby system Changing the operating status of the CPU module in the standby system from RUN to STOP A stop error in the CPU module of the standby system Switching the operation mode from backup mode to separate mode Automatic system switching END END END END System A System B Program executed Program executed Control system SP CONTSW instruction Standby system Execution of the instruction System ...

Page 1448: ...1446 14 REDUNDANT SYSTEM INSTRUCTIONS 14 2 Disabling Enabling System Switching MEMO ...

Page 1449: ...S 16 ETHERNET INSTRUCTIONS 17 CC LINK IE CONTROLLER NETWORK INSTRUCTIONS 18 CC LINK IE FIELD NETWORK INSTRUCTIONS 19 CC LINK INSTRUCTIONS 20 SERIAL COMMUNICATION INSTRUCTIONS 21 A D CONVERSION INSTRUCTIONS 22 POSITIONING INSTRUCTIONS 23 High Speed Data Logger Module Instructions 24 C INTELLIGENT FUNCTION MODULE INSTRUCTIONS ...

Page 1450: ...mmarizes the availability of each module for the instructions explained in this chapter Instruction symbol Availability Reference Ethernet module CC Link IE Controller Network module CC Link IE Field Network module READ Page 1454 JP READ GP READ SREAD Page 1461 JP SREAD GP SREAD WRITE Page 1469 JP WRITE GP WRITE SWRITE Page 1477 JP SWRITE GP SWRITE SEND Page 1485 JP SEND GP SEND RECV Page 1492 JP ...

Page 1451: ...t station another station Target network Target station type READ SREAD Ethernet CC Link IE Controller Network CC Link IE Field Network MELSECNET H MELSECNET 10 RCPU QCPU LCPU QSCPU QnACPU Intelligent device station WRITE SWRITE Ethernet CC Link IE Controller Network CC Link IE Field Network MELSECNET H MELSECNET 10 RCPU QCPU LCPU QnACPU Intelligent device station SEND RECV RECVS Ethernet CC Link ...

Page 1452: ...2 PORT1 PORT2 PORT1 READ SREAD WRITE SWRITE 1 to 8 11 to 18 1 to 8 11 to 18 1 to 8 1 to 8 11 to 18 1 to 8 1 to 8 SEND RECV RECVS REQ 1 to 8 11 to 18 1 to 8 11 to 18 1 to 8 1 to 8 11 to 18 1 to 8 1 to 8 RRUN RSTOP RTMRD RTMWR 11 to 18 1 to 8 REMFR REMTO REMFRD REMTOD 1 to 32 1 1 to 32 1 Instruction symbol RnENCPU network part 3 _RJ71EN71 E CCIEC _RJ71EN71 CCIEC _RJ71EN71 E CCIEF _RJ71EN71 CCIEF POR...

Page 1453: ...1451 15 Corresponding Network type Instruction symbol CC Link IE Controller Network CC Link IE Field Network Ethernet Q compatible Ethernet READ SREAD WRITE SWRITE SEND RECV RECVS REQ RRUN RSTOP RTMRD RTMWR REMFR REMTO REMFRD REMTOD ...

Page 1454: ...arget station and the instruction is completed with an error The network module does not detect an error during execution of the instruction The target device of an instruction executed in index modification mode is determined by the value of the index register of the own station SREAD s2 WRITE d1 SWRITE d1 SREAD d3 Specification method Specify a character string by enclosing it in single quotes o...

Page 1455: ...of the CC Link IE Controller Network or CC Link IE Field Network calculate based on the link scan time For concurrent multiple transmissions including other transient transmissions further increase the time in units of link scans The link scan time can be checked with the diagnostic window of each network When Ethernet is used the time varies depending on the amount of data and network load ratio ...

Page 1456: ...D Operand Description Range Data type Data type label J U JP READ J Own station network number 1 to 239 16 bit unsigned binary ANY16 GP READ U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name ANY16 1 s2 Target ...

Page 1457: ...e own station CPU module are already in use Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E J U J U JP READ GP READ s1 2 s2 d1 2 d2 1 3 D50 D0 D99 D0 D99 D100 D150 D199 D149 D150 Good example D50 is specified by d1 Bad example D100 is specified by d1 100 words 100 words CPU module on the ow...

Page 1458: ...ressed to multiple CPU No 1 03E1H Addressed to multiple CPU No 2 03E2H Addressed to multiple CPU No 3 03E3H Addressed to multiple CPU No 4 03FFH Addressed to target station CPU control CPU 0000H 03D0H to 03D3H 03E0H to 03E3H 03FFH User 4 Target network number CC Link IE Controller Network or CC Link IE Field Network Specify the network number 1 to 239 of the target station s1 4 Network No 1 to 239...

Page 1459: ...to 16383s When 1 is specified in bit 8 of s1 0 0 10s 1 to 65535 1 to 65535 100ms 0 to 65535 User 9 Read data length Specify the number of words to be read When reading data from RCPU QCPU or LCPU Channels 1 to 8 are used 1 to 960 words Channels 9 and 10 are used 1 to 8192 words When reading data from QnACPU 1 to 480 words 1 to 8192 User 10 Not used 11 Clock setting flag The validity status valid o...

Page 1460: ...pecifying the same channel cannot be used concurrently The execution status and the completion status of the READ instruction can be checked with the completion device d2 and the completion status indication device d2 1 17 Error detected station number When 0 is specified in bit 15 of s1 0 The station number of the station where an error was detected is stored No information is stored if an error ...

Page 1461: ...ON OFF READ Sequence scan Start contact CPU module on the own station Network module Network module Completion device d2 Completion status indication device d2 1 Device for storing the read device d1 Sequence scan Device where the read data is stored s2 Channel n 1 scan CPU module on the target station END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF READ 1 scan Error code Sequence s...

Page 1462: ...SEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application D000H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1463: ... JP SREAD GP SREAD Operand Description Range Data type Data type label J U JP SREAD J Own station network number 1 to 239 16 bit unsigned binary ANY16 GP SREAD U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name...

Page 1464: ...nstruction are the same as those of the READ instruction The SREAD instruction can be programmed by omitting argument d3 However the operations are the same as those of the READ instruction The operations of the SREAD instruction can be selected according to whether d3 is omitted or not Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW F...

Page 1465: ...dressed to multiple CPU No 1 03E1H Addressed to multiple CPU No 2 03E2H Addressed to multiple CPU No 3 03E3H Addressed to multiple CPU No 4 03FFH Addressed to target station CPU control CPU 0000H 03D0H to 03D3H 03E0H to 03E3H 03FFH User 4 Target network number CC Link IE Controller Network or CC Link IE Field Network Specify the network number 1 to 239 of the target station s1 4 Network No 1 to 23...

Page 1466: ... 16383s When 1 is specified in bit 8 of s1 0 0 10s 1 to 65535 1 to 65535 100ms 0 to 65535 User 9 Read data length Specify the number of words to be read When reading data from RCPU QCPU or LCPU Channels 1 to 8 are used 1 to 960 words Channels 9 and 10 are used 1 to 8192 words When reading data from QnACPU 1 to 480 words 1 to 8192 User 10 Not used 11 Clock setting flag The validity status valid or ...

Page 1467: ...the station where an error was detected is stored No information is stored if an error is detected in the own station Ethernet or CC Link IE Controller Network 1 to 120 Station number CC Link IE Field Network 125 Master station 1 to 120 Local station intelligent device station submaster station When 1 is specified in bit 15 of s1 0 Ethernet only The IP address first and second octets of the statio...

Page 1468: ...d in bit 15 of s1 0 device data cannot be read from stations connected via a relay station When executing multiple link dedicated instructions concurrently be careful not to overlap the channels of the link dedicated instructions Multiple link dedicated instructions specifying the same channel cannot be used concurrently The execution status and the completion status of the SREAD instruction can b...

Page 1469: ... Sequence scan Start contact CPU module on the own station CPU module on the target station Network module Network module Completion device d2 Completion status indication device d2 1 Device for storing the read device d1 Sequence scan Device where the read data is stored s2 Channel n 1 scan Read notification device d3 1 scan END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF SREAD 1 s...

Page 1470: ...SEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application D000H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1471: ...on JP WRITE GP WRITE Operand Description Range Data type Data type label J U JP WRITE J Own station network number 1 to 239 16 bit unsigned binary ANY16 GP WRITE U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device na...

Page 1472: ...station CPU module are already in use Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E J U J U JP WRIT E GP WRIT E s1 2 s2 2 d1 d2 1 3 D50 D0 D99 D0 D99 D100 D150 D199 D149 D150 Good example D50 is specified by d1 Bad example D100 is specified by d1 100 words 100 words CPU module on the own ...

Page 1473: ...in s1 5 1 Specify the IP address in s1 4 5 Ethernet only 0000H 0001H 0080H 0081H 0100H 0101H 0180H 0181H 8000H 8001H 8080H 8081H 8100H 8101H 8180H 8181H User 1 Completion status The completion status is stored upon completion of the instruction 0 Normal Other than 0 Error error code System 2 Own station channel Specify the channel to be used by own station Page 1450 Range of available channel numb...

Page 1474: ... number specification 125 Master station 126 Master operating station 1 to 120 Local station intelligent device station submaster station 2 All station specification 00FFH All stations of target network number broadcast excluding the own station Can be set when the execution type specified by s1 is 0 No arrival acknowledgment Ethernet When 0 is specified in bit 15 of s1 0 Specify the station numbe...

Page 1475: ...sed 1 to 960 words Channels 9 and 10 are used 1 to 8192 words Writing to QnACPU 1 to 480 words 1 to 8192 User 10 Not used 11 Clock setting flag The validity status valid or invalid of the data in s1 12 and later is stored Note that the data in s1 12 and later is not cleared even when the instruction is completed successfully 0 Invalid 1 Valid System 12 Clock data Set only in an abnormal state Uppe...

Page 1476: ...etion of writing device data to another station number the completion device specified by d2 turns on For the target stations that can be specified refer to the following Page 1449 Target networks and target station types When network number and station number are specified 0 is specified in bit 15 of s1 0 by the target station address specification method device data can be written also to the st...

Page 1477: ...n 1 scan Sequence scan Start contact CPU module on the own station CPU module on the target station Network module Network module Completion device d2 Completion status indication device d2 1 Device where the write data is stored s2 Sequence scan Device for storing the write data d1 3000 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF WRITE 1 scan Error code Sequence scan Start cont...

Page 1478: ...SEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application D000H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1479: ...WRITE J Own station network number 1 to 239 16 bit unsigned binary ANY16 GP SWRITE U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name ANY16 1 s2 Own station start device containing write data Device name ANY16 ...

Page 1480: ...e target station specified by argument d3 is ignored The operations of the SWRITE instruction are the same as those of the WRITE instruction The SWRITE instruction can be programmed by omitting argument d3 However the operations are the same as those of the WRITE instruction The operations of the SWRITE instruction can be selected according to whether d3 is omitted or not Operand Bit Word Double w...

Page 1481: ...in s1 5 1 Specify the IP address in s1 4 5 Ethernet only 0000H 0001H 0080H 0081H 0100H 0101H 0180H 0181H 8000H 8001H 8080H 8081H 8100H 8101H 8180H 8181H User 1 Completion status The completion status is stored upon completion of the instruction 0 Normal Other than 0 Error error code System 2 Own station channel Specify the channel to be used by own station Page 1450 Range of available channel numb...

Page 1482: ... number specification 125 Master station 126 Master operating station 1 to 120 Local station intelligent device station submaster station 2 All station specification 00FFH All stations of target network number broadcast excluding the own station Can be set when the execution type specified by s1 is 0 No arrival acknowledgment Ethernet When 0 is specified in bit 15 of s1 0 Specify the station numbe...

Page 1483: ...sed 1 to 960 words Channels 9 and 10 are used 1 to 8192 words Writing to QnACPU 1 to 480 words 1 to 8192 User 10 Not used 11 Clock setting flag The validity status valid or invalid of the data in s1 12 and later is stored Note that the data in s1 12 and later is not cleared even when the instruction is completed successfully 0 Invalid 1 Valid System 12 Clock data Set only in an abnormal state Uppe...

Page 1484: ...e completion device specified by d2 turns on In another station upon completion of writing the device data specified by s2 the device specified by d3 turns on For the target stations that can be specified refer to the following Page 1449 Target networks and target station types When network number and station number are specified 0 is specified in bit 15 of s1 0 by the target station address speci...

Page 1485: ...uence scan Start contact CPU module on the own station CPU module on the target station Network module Network module Completion device d2 Completion status indication device d2 1 Device where the write data is stored s2 Sequence scan Device for storing the write data d1 Write notification device d3 1 scan 3000 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF SWRITE 1 scan Error code...

Page 1486: ...SEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application D000H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1487: ...rand Description Range Data type Data type label J U JP SEND J Own station network number 1 to 239 16 bit unsigned binary ANY16 GP SEND U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name ANY16 1 s2 Own station ...

Page 1488: ...owledgment used Completed when data has been stored in the specified channel of the target station 2 Error completion type bit 7 Specify whether to set clock data when completed with an error 0 Clock data at error occurrence is not stored in s1 11 and later 1 Clock data at error occurrence is stored in s1 11 and later 0000H 0001H 0080H 0081H User 1 Completion status The completion status is stored...

Page 1489: ...Link IE Controller Network or CC Link IE Field Network Specify the monitoring time until completion of processing If processing is not completed within the monitoring time the request is resent by the number of resends specified in s1 7 0 10s 1 to 32767 1 to 32767s 0 to 32767 User Ethernet Specify the TCP resend timer value or greater for the monitoring time till completion of processing If proces...

Page 1490: ...ta using the RECV instruction a buffer full error results in the sending station When multiple network modules are mounted in the target station specify the network number and station number of the network module that receives a request from the own station Example In the following figure specify station No 1 of network No 1 as a target station Station No 5 of network No 2 cannot be specified No N...

Page 1491: ...y MELSECNET H MELSECNET 10 or Ethernet When executing multiple link dedicated instructions concurrently be careful not to overlap the channels of the link dedicated instructions Multiple link dedicated instructions specifying the same channel cannot be used concurrently The execution status and the completion status of the SEND instruction can be checked with the completion device d and the comple...

Page 1492: ...F OFF OFF ON ON OFF 1 scan With arrival confirmation Channel n Data transmission Storage notification 1 scan Channel n Sequence scan Start contact CPU module on the own station Completion device d Completion status indication device d 1 Device where the send data is stored s2 Network module Network module CPU module on the target station Sequence scan RECV execution request area Completion device ...

Page 1493: ...00H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application 3000 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF SEND 1 scan Error code Sequence scan Start contact CPU module on the own station Completion device d Completion status indication device d 1 Device where the send data is st...

Page 1494: ...abel J U JP RECV J Own station network number 1 to 239 16 bit unsigned binary ANY16 GP RECV U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s Own station start device where control data is stored Refer to the control data Device name ANY16 1 d1 Own station head device for storing the receive data A co...

Page 1495: ...ding station No The station number of the sending station is stored Ethernet or CC Link IE Controller Network 1 to 120 Station number receiving from station number CC Link IE Field Network 125 Master station 1 to 120 Local station intelligent device station submaster station 1 to 120 125 System 6 Not used 7 Not used 8 Arrival monitoring time CC Link IE Controller Network or CC Link IE Field Networ...

Page 1496: ...pper 8 bits Month 01H to 12H Lower 8 bits Lower 2 digits of year 00H to 99H System 13 Upper 8 bits Hour 00H to 23H Lower 8 bits Day 01H to 31H System 14 Upper 8 bits Second 00H to 59H Lower 8 bits Minute 00H to 59H System 15 Upper 8 bits Year 00H to 99H Upper two digits of the year Lower 8 bits Day of the week 00H Sun to 06H Sat System 16 Error detection network number The network number of the st...

Page 1497: ...ion Network Name of RECV instruction execution request area Device number address of applicable bit CC Link IE Field Network CC Link IE Controller Network RECV instruction channel 1 execution request flag SB0030 RECV instruction channel 2 execution request flag SB0031 RECV instruction channel 3 execution request flag SB0032 RECV instruction channel 4 execution request flag SB0033 RECV instruction ...

Page 1498: ...e RECV instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or off depending on the completion status of the RECV instruction When completed successfully The device remains off When completed with an error The device turns on during END processing of the scan where the RECV instruction completes and turns off during the ne...

Page 1499: ... Operand Description Range Data type Data type label U G RECVS Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 Z RECVS Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_S INGLE s Own station start device where contro...

Page 1500: ...storage channel Specify the channel to be used by own station Page 1450 Range of available channel numbers 1 to 8 11 to 18 User 3 Channel used by send station The channel number 1 to 8 used by the sending station is stored 1 to 8 System 4 Send station network number The network number 1 to 239 of the sending station is stored 1 to 239 System 5 Sending station No The station number of the sending s...

Page 1501: ...Target networks and target station types The SEND instruction is executed to send data The data received from the sending station is stored in the own station channel specified by the sending station and the interrupt program with the interrupt number specified by the engineering tool starts The RECVS instruction is used in this interrupt program to read receive data CH Channel RECVS d1 CH1 CHn CH...

Page 1502: ...FFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application SEND OFF END 0 END 0 END 0 END 0 END 0 OFF OFF OFF ON ON OFF END END END IRET 0 END 0 END 0 RECVS 1 scan With arrival confirmation Channel n Data transmission Storage notification Channel n Sequence scan Start contact CPU module on the sending stati...

Page 1503: ...data in units of words from a device in the programmable controller MELSEC A QnA Q L series of another station Execution condition Ladder ST ENO J_ZNRD EN J s1 s2 n d1 d2 ENO JP_ZNRD EN J s1 s2 n d1 d2 FBD LD Instruction Execution condition J ZNRD JP ZNRD RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundant Process J s1 s2 d1 n d2 EN ENO J s1 d1 d2 s2 n ...

Page 1504: ...1 to 239 16 bit unsigned binary ANY16 s1 Target station number 1 to 64 16 bit unsigned binary ANY16 s2 Target station start device where the data to be read is stored String 1 ANYSTRING_SINGLE 1 d1 Own station start device for storing the read data A continuous area for the read data length is required Device name ANY16 2 n Read data length When the target station is AnUCPU QnACPU QCPU LCPU 1 to 2...

Page 1505: ...the MELSEC Q series When creating a new program use the READ instruction Device data can be read also from stations connected to networks other than the stations connected to the own station network The execution status and the completion status of the J P ZNRD instruction can be checked with the completion device d2 and the completion status indication device d2 1 Completion device d2 This device...

Page 1506: ...ompleted with an error 100 100 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF ZNRD Sequence scan Start contact CPU module on the own station CPU module on the target station Network module Network module Completion device d2 Completion status indication device d2 1 Device for storing the read device d1 Sequence scan Device where the read data is stored s2 1 s...

Page 1507: ...rsions Operation error 4 The completion status in which an error code is stored is as follows CC Link IE Controller Network SW003A Ethernet Buffer memory address 5323 14CBH AnUCPU with the version AX manufactured in July 1995 or earlier A2USCPU S1 with the version CN manufactured in July 1995 or earlier AnUCPU with the version AY manufactured in July 1995 or later A2USCPU S1 with the version CP ma...

Page 1508: ...ata in units of words to a device in the programmable controller MELSEC A QnA Q L series of another station Execution condition Ladder ST ENO J_ZNWR EN J s1 s2 n d1 d2 ENO JP_ZNWR EN J s1 s2 n d1 d2 FBD LD Instruction Execution condition J ZNWR JP ZNWR RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundant Process J s1 d1 s2 n d2 EN ENO J s1 d2 s2 n d1 ...

Page 1509: ... 64 Station number station Group specification 0081H to 00A0H All stations with group numbers 1 to 32 All station specification 00FFH All stations of target network number 16 bit unsigned binary ANY16 d1 Target station start device to which data is to be written A continuous area for the write data length is required String 1 ANYSTRING_SINGLE 1 s2 Own station start device where write data is store...

Page 1510: ...ction used in the programs running on the MELSEC Q series When creating a new program use the WRITE instruction Device data can be written also to stations connected to networks other than the stations connected to the own station network The execution status and the completion status of the J P ZNWR instruction can be checked with the completion device d2 and the completion status indication devi...

Page 1511: ...mmand turns on When completed successfully When completed with an error END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF ZNWR 3000 3000 Sequence scan Start contact CPU module on the own station CPU module on the target station Network module Network module Completion device d2 Completion status indication device d2 1 Device where the write data is stored s2 Seq...

Page 1512: ...or 4 The completion status in which an error code is stored is as follows CC Link IE Controller Network SW003B Ethernet Buffer memory address 5325 14CDH AnUCPU with the version AX manufactured in July 1995 or earlier A2USCPU S1 with the version CN manufactured in July 1995 or earlier AnUCPU with the version AY manufactured in July 1995 or later A2USCPU S1 with the version CP manufactured in July 1...

Page 1513: ...Q J Own station network number 1 to 239 16 bit unsigned binary ANY16 G P REQ U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name ANY16 1 s2 Own station start device where request data is stored Device name ANY16...

Page 1514: ...e of the target station 0000H Addressed to target station CPU control CPU 03D0H Addressed to control system CPU 03D1H Addressed to standby system CPU 03D2H Addressed to system A CPU 03D3H Addressed to system B CPU 03E0H Addressed to multiple CPU No 1 03E1H Addressed to multiple CPU No 2 03E2H Addressed to multiple CPU No 3 03E3H Addressed to multiple CPU No 4 03FFH Addressed to target station CPU ...

Page 1515: ...r of response data words is stored Number of words of data stored in the response data storage device Remote RUN STOP 2 2 System 11 Clock setting flag The validity status valid or invalid of the data in s1 12 and later is stored Note that the data in s1 12 and later is not cleared even when the instruction is completed successfully 0 Invalid 1 Valid System 12 Clock data Set only in an abnormal sta...

Page 1516: ... to the parameter setting initial device value The number of resends s1 7 must be set every time the instruction is executed Operand s2 Device Item Description Remote RUN Remote STOP Set by 0 Request type 0010H When the station number is specified by s1 5 0030H When All Station or the group is specified by s1 5 User 1 Subrequest type 0001H Remote RUN 0002H Remote STOP User 2 Operation mode Specify...

Page 1517: ...icated instructions specifying the same channel cannot be used concurrently The execution status and the completion status of the REQ instruction can be checked with the completion device d2 and the completion status indication device d2 1 CH Channel Completion device d2 This device turns on during END processing of the scan where the REQ instruction completes and turns off during the next END pro...

Page 1518: ...ted successfully When completed with an error END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF REQ Sequence scan Start contact CPU module on the own station CPU module on the target station Network module Network module Completion device d2 Completion status indication device d2 1 Sequence scan 1 scan Channel n Remote RUN STOP END 0 END 0 END 0 END 0 END 0 OFF ...

Page 1519: ...ELSEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application D000H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1520: ... P REQ J Own station network number 1 to 239 16 bit unsigned binary ANY16 G P REQ U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name ANY16 1 s2 Own station start device where request data is stored Device name ...

Page 1521: ...he target station 0000H Addressed to target station CPU control CPU 03D0H Addressed to control system CPU 03D1H Addressed to standby system CPU 03D2H Addressed to system A CPU 03D3H Addressed to system B CPU 03E0H Addressed to multiple CPU No 1 03E1H Addressed to multiple CPU No 2 03E2H Addressed to multiple CPU No 3 03E3H Addressed to multiple CPU No 4 03FFH Addressed to target station CPU contro...

Page 1522: ...sponse data words is stored Number of words of data stored in the response data storage device Reading clock data 6 Writing clock data 2 2 6 System 11 Clock setting flag The validity status valid or invalid of the data in s1 12 and later is stored Note that the data in s1 12 and later is not cleared even when the instruction is completed successfully 0 Invalid 1 Valid System 12 Clock data Set only...

Page 1523: ...ata User 2 Change pattern Change pattern bits 0 to 6 Specify which item from the upper byte in s2 2 to s2 5 should be written 0 Not changed 1 Changed Changed year bits 8 to 15 Specify the year two lower digits in BCD code 1 b6 Day of week b5 Second b4 Minute b3 Hour b2 Day b1 Month b0 Year User 3 Changed clock data Upper 8 bits Day 01H to 31H Lower 8 bits Month 01H to 12H User 4 Upper 8 bits Minut...

Page 1524: ...ructions specifying the same channel cannot be used concurrently The execution status and the completion status of the REQ instruction can be checked with the completion device d2 and the completion status indication device d2 1 CH Channel Completion device d2 This device turns on during END processing of the scan where the REQ instruction completes and turns off during the next END processing Com...

Page 1525: ...uccessfully When completed with an error END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF REQ Sequence scan Start contact CPU module on the own station CPU module on the target station Network module Network module Completion device d2 Completion status indication device d2 1 Sequence scan 1 scan Channel n Reading writing clock data END 0 END 0 END 0 END 0 END ...

Page 1526: ...SEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application D000H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1527: ...Range Data type Data type label J U J P RIRD J Own station network number 1 to 239 16 bit unsigned binary ANY16 G P RIRD U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s Own station start device where control data is stored Refer to the control data Device name ANY16 1 d1 Own station start device for...

Page 1528: ...etting range Set by 0 Completion status The completion status is stored upon completion of the instruction 0 Normal Other than 0 Error error code System 1 Target station number Specifies the station number of the target station 0 to 120 User 2 Access attribute code Specify the access code and attribute code of the device to read b8 to b15 Access code b0 to b7 Attribute code Refer to Access attribu...

Page 1529: ... disconnected at the time of RIRD instruction execution no retry is executed If the RIRD instruction is completed with an error re execute the RIRD instruction after the target station relay source station when addressed to another network returns If an error error code E504H occurs in CC Link IE Controller Network a retry cannot be performed Wait until the instruction completes with an error and ...

Page 1530: ... the RIRD instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or off depending on the completion status of the RIRD instruction When completed successfully The device remains off When completed with an error The device turns on during END processing of the scan where the RIRD instruction completes and turns off during the...

Page 1531: ...SEC iQ R CC Link IE Field Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF RIRD 1 scan Error code Sequence scan Start contact CPU module on the own station Network module Completion device d2 Completion status indication device d2 1 Completion status s Target station e...

Page 1532: ...ription Range Data type Data type label J U J P RIWT J Own station network number 1 to 239 16 bit unsigned binary ANY16 G P RIWT U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name ANY16 1 s2 Own station start d...

Page 1533: ...g range Set by 0 Completion status The completion status is stored upon completion of the instruction 0 Normal Other than 0 Error error code System 1 Target station number Specifies the station number of the target station 0 to 120 User 2 Access attribute code Specify the access code and attribute code of the device to be written b8 to b15 Access code b0 to b7 Attribute code Refer to Access attrib...

Page 1534: ...disconnected at the time of RIWT instruction execution no retry is executed If the RIWT instruction is completed with an error re execute the RIWT instruction after the target station relay source station when addressed to another network returns If an error error code E504H occurs in CC Link IE Controller Network a retry cannot be performed Wait until the instruction completes with an error and e...

Page 1535: ...tion completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the RIWT instruction When completed successfully The device remains off When completed with an error The device turns on during END processing of the scan where the RIWT instruction completes and turns off during the next END processi...

Page 1536: ...d Network User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application 3000 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF RIWT 1 scan Error code Sequence scan Start contact CPU module on the own station Completion device d Completion status indication device d 1 Device where the write data is stored s2 Target station error Completion...

Page 1537: ...eate programs For precautions when using modules refer to the following MELSEC iQ R Module Configuration Manual 16 1 Open Close Processing Instructions Opening a connection GP CONOPEN This instruction establishes opens a connection with an external device for data communication Execution condition Ladder ST ENO GP_CONOPEN EN U s1 s2 d FBD LD Instruction Execution condition GP CONOPEN RnCPU RnENCPU...

Page 1538: ... binary ANY16 s1 Connection No 1 to 128 1 to 16 Port 1 fixed buffer communications 17 to 64 Port 1 socket communications 65 to 128 Port 2 socket communications 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is stored Refer to the control data Device name ANY16 1 d Device of the own station which turns on for one scan upon completion of the instruction When the i...

Page 1539: ...ompletion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System 2 System area 3 System area 4 Application setting area Specify the application of a connection Fixed buffer communications 1 Application of fixed buffer b0 0 For sending 1 For receiving 2 Communication code b1 0 Binary code 1 ASCII code 3 Online program change b3 0 Disable 1 Enable 4 Pairin...

Page 1540: ...ns of available settings for connection opening refer to the following MELSEC iQ R Ethernet User s Manual Application Operation error The following figure shows an IP address setting example Example IP address 10 97 24 200 0A 61 18 C8 Program example or Execution result 1 The data is stored from the lower byte 5 Own node port number Specify the port number of the own node Port numbers 5000 to 5009...

Page 1541: ...first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Connection No 1 to 128 1 to 16 Port 1 fixed buffer communications 17 to 64 Port 1 socket communications 65 to 128 Port 2 socket communications 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is stored Refer to the control data Device n...

Page 1542: ...r Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U s1 1 2 s2 2 d 1 3 Operand s2 Device Item Description Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error ...

Page 1543: ...rst three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 ZP OPEN Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Connection No 1 to 16 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is stored Ref...

Page 1544: ... devices 1 FX and FY cannot be used 2 FD cannot be used 3 T ST C and FD cannot be used Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U GP OPEN ZP OPEN s1 1 2 s2 2 d 1 3 ...

Page 1545: ...or error code System 2 Application setting area Specify the application of a connection 1 Application of fixed buffer b0 0 For sending 1 For receiving 2 Target station alive check b1 0 Disable the alive check 1 Alive check 1 3 Pairing open b7 0 Disable pairing open 1 Enable pairing open 2 4 Protocol b8 0 TCP IP 1 UDP IP 5 Fixed buffer communications with without procedure b9 and b10 00 With proced...

Page 1546: ...is fixed to KeepAlive The connection numbers that can be specified range from 1 to 16 Connection number 17 and after cannot be specified If no parameter data is set in external device connection configuration of the engineering tool the communication data code becomes binary If one or more parameter data are set the instruction follows the value set in Communication data code If no parameter data ...

Page 1547: ...mber first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 ZP CLOSE Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Connection No 1 to 16 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is st...

Page 1548: ... specified connection occurs Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U GP CLOSE ZP CLOSE s1 1 2 s2 2 d1 1 3 Operand s2 Device Item Description Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0 Completed succ...

Page 1549: ...16 ETHERNET INSTRUCTIONS 16 1 Open Close Processing Instructions 1547 16 Operation error Error code s2 1 Description C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application ...

Page 1550: ... digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Connection No 17 to 128 17 to 64 Port 1 socket communications 65 to 128 Port 2 socket communications 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is stored Refer to the control data Device name ANY16 1 d1 Own station start device for storing t...

Page 1551: ... s2 2 d1 2 d2 1 3 Operand s2 Device Item Description Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System Operand d1 Device Item Description Setting range Set by 0 Receive data length The length of the data read from the socket communications receive ...

Page 1552: ...ution condition G SOCRCVS Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s Connection No 17 to 128 17 to 64 Port 1 socket communications 65 to 128 Port 2 socket communications 16 bit unsigned binary ANY16 d Own station start device for storing the r...

Page 1553: ...Device Item Description Setting range Set by 0 Receive data length The length of the data read from the socket communications receive data area is stored System 1 to Receive data The data read from the socket communications receive data area is stored sequentially in ascending order of addresses System Error code SD0 Description C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application ...

Page 1554: ...decimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Connection No 17 to 128 17 to 64 Port 1 socket communications 65 to 128 Port 2 socket communications 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is stored Refer to the control data Device name ANY16 1 s3 Own station start device where send data is stored Device name A...

Page 1555: ...T C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U s1 1 2 s2 2 s3 2 d 1 3 Operand s2 Device Item Description Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System Operand s3 Device Item Description Setting range Set by 0 Send data length Spe...

Page 1556: ...ee digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 ZP BUFRCV Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Connection No 1 to 16 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is stored Refer to...

Page 1557: ...rea 1 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System Operand d1 Device Item Description Setting range Set by 0 Receive data length The length of the data read from the fixed buffer receive data area is stored The data length is represented in words or bytes according to the procedu...

Page 1558: ... Reading receive data from the sending station to the own station No Connection No Completion device d2 This device turns on during END processing of the scan where the BUFRCV instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or off depending on the completion status of the BUFRCV instruction When completed successfully...

Page 1559: ...Operand Description Range Data type Data type label U GP BUFRCVS Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 ZP BUFRCVS Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING _SINGLE s Connection No 1 to 16 16 bit uns...

Page 1560: ...length of the data read from the fixed buffer receive data area is stored The data length is represented in words or bytes according to the procedure of fixed buffer communications With procedure binary Number of words 1 to 5113 1 to 1017 1 System With procedure ASCII Number of words 1 to 2556 1 to 508 1 Without procedure binary Number of bytes 1 to 10238 1 to 2046 1 1 to Receive data The data rea...

Page 1561: ...decimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 ZP BUFSND Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Connection No 1 to 16 16 bit unsigned binary ANY16 s2 Start device of the own station where control data is stored Refer to the control data Device nam...

Page 1562: ... d 1 3 Operand s2 Device Item Description Setting range Set by 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System Operand s3 Device Item Description Setting range Set by 0 Send data length Specify the send data length Specify the data length in words or bytes according ...

Page 1563: ...on during END processing of the scan where the BUFSND instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the BUFSND instruction When completed successfully The device remains off When completed with an error The device turns on during END processing of the scan where the BUFSND...

Page 1564: ...cription Range Data type Data type label U G P UINI Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 Z P UINI Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s Start device of the own station where control d...

Page 1565: ...ion mode cannot be specified together with the change specification of the own station IP address or operation setting If they are specified together the change specification of only the own station IP address or operation setting is executed 1 Own station IP address change specification b0 Specify whether to change the IP address of the own station When changing the IP address specify a new addre...

Page 1566: ...ddress is selected in Network No and station number setting method of the engineering tool the network number and station number are not changed and the value using the IP address that is set by a parameter remains unchanged 5 Ethernet operation setting Specify the operation setting 1 Communication data code setting b1 0 Binary 1 ASCII 2 Online change enable disable setting b6 0 Disable all at onc...

Page 1567: ...16 ETHERNET INSTRUCTIONS 16 4 Reinitializing the Module 1565 16 Operation error Error code s 1 Description C000H to CFFFH MELSEC iQ R Ethernet User s Manual Application ...

Page 1568: ...scription Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Connection No 1 to 16 16 bit unsigned binary ANY16 s2 Number of protocols to be executed continuously 1 to 8 16 bit unsigned binary ANY16 s3 Start device of the own station where control data is stored Refer t...

Page 1569: ...ser 6 Execution protocol number 5 Specify the number of the protocol to be executed fifth 0 1 to 128 User 7 Execution protocol number 6 Specify the number of the protocol to be executed sixth 0 1 to 128 User 8 Execution protocol number 7 Specify the number of the protocol to be executed seventh 0 1 to 128 User 9 Execution protocol number 8 Specify the number of the protocol to be executed eighth 0...

Page 1570: ...ded in the communication type of the protocol that has been executed sixth the receive packet number successful in collation match is stored If the communication type is receive only 0 is stored If an error occurs during execution of the sixth protocol 0 is stored If the number of protocols executed is less than 6 0 is stored 0 1 to 16 System 16 Receive packet number 7 successful in collation matc...

Page 1571: ...quest It may take time until the protocol is actually canceled after the cancellation was requested While the protocol cancellation specification state is Cancellation requested another GP ECPRTCL instruction cannot be executed Protocol operation Cancellation timing protocol execution status Operation result Completion status Handling of data Sending data Protocol execution start to Before transmi...

Page 1572: ...y obtain CPU device values over several scans Therefore do not change the CPU device values specified in non conversion variables from the start of the dedicated instruction to the end of execution The intelligent function module device buffer memory is not affected by the sequence scan of the CPU module and therefore can process protocols faster than assigning programmable controller devices to v...

Page 1573: ...n Range Data type Data type label U GP ERRCLEAR Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 ZP ERRCLEAR Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s Start device of the own station where control da...

Page 1574: ... error error code System 2 Clear target specification Specify the error information to clear 0000H to 0080H 0100H 0101H 8101H FFFFH User 3 Clear function specification Specify the function to clear 0000H Clear the error code FFFFH Clear the error log 0000H FFFFH User 4 LED off specification Specify the off target LED ERR LED P ERR LED of PORT1 or P ERR LED of PORT2 0000H Do not turn off any ERR LE...

Page 1575: ...thernet Network type Q compatible Ethernet Initial error 0000H 0000H Initial error code 1900025 105 Open error 0001H to 0080H 1 0000H Open error code of connection The open error code of connection No 1 to 128 0001H to 0080H is cleared 100 to 163 2000100 to 2000163 124 134 144 154 164 174 184 194 22564 22574 22584 22594 22604 22614 22624 22634 Error log 2 0100H FFFFH Error log 227 to 372 Communica...

Page 1576: ... first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 ZP ERRRD Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s Start device of the own station where control data is stored Refer to the control data Device name ANY16 1 d Device...

Page 1577: ...ted with an error error code System 2 Read information specification Specify the error information to read 0000H to 0080H User 3 Read target information specification Specify the target of the error information to read 0000H Latest error information 0000H User 4 Error information The error information that has been read is stored 0000H No error Other than 0000H Error code System 5 to 7 System area...

Page 1578: ...Q R Module Configuration Manual 17 1 Remote RUN J P RRUN G P RRUN Z P RRUN These instructions execute remote RUN for the programmable controller on another station Execution condition Ladder ST ENO J_RRUN EN J s1 s2 s3 s4 d ENO JP_RRUN EN J s1 s2 s3 s4 d ENO G_RRUN EN U s1 s2 s3 s4 d ENO GP_RRUN EN U s1 s2 s3 s4 d ENO Z_RRUN EN J U s1 s2 s3 s4 d ENO ZP_RRUN EN J U s1 s2 s3 s4 d FBD LD Instruction ...

Page 1579: ...ddressed to control system CPU 2 03D1H Addressed to standby system CPU 2 03D2H Addressed to system A CPU 03D3H Addressed to system B CPU 03E0H Addressed to multiple CPU No 1 03E1H Addressed to multiple CPU No 2 03E2H Addressed to multiple CPU No 3 03E3H Addressed to multiple CPU No 4 03FFH Addressed to target station CPU control CPU 0000H 03D0H to 03D3H 03E0H to 03E3H 03FFH 16 bit unsigned binary ...

Page 1580: ...lready been remotely stopped or paused from another station RUN will fail if s4 is Not forcibly executed 0001H Applicable devices 1 FX and FY cannot be used 2 FD cannot be used 3 T ST C and FD cannot be used Processing details Remote RUN is executed for the target station CPU module according to the s4 specification details The target station is specified with the target network number J or the st...

Page 1581: ...rns on or off depending on the completion status of the RRUN instruction When completed normally Unchanged from off When completed with an error The device turns on during END processing of the scan where the RRUN instruction completes and turns off during the next END processing When completed successfully When completed with an error END 0 END 0 END 0 END 0 END 0 OFF OFF OFF ON ON OFF RRUN END 0...

Page 1582: ... Operation error Error code SW0030 to SW0037 Description 4000H to 4FFFH MELSEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1583: ...ndition Ladder ST ENO J_RSTOP EN J s1 s2 s3 s4 d ENO JP_RSTOP EN J s1 s2 s3 s4 d ENO G_RSTOP EN U s1 s2 s3 s4 d ENO GP_RSTOP EN U s1 s2 s3 s4 d ENO Z_RSTOP EN J U s1 s2 s3 s4 d ENO ZP_RSTOP EN J U s1 s2 s3 s4 d FBD LD Instruction Execution condition J RSTOP G RSTOP Z RSTOP JP RSTOP GP RSTOP ZP RSTOP RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundant Process J U s1 s2 s3 s4 d EN ...

Page 1584: ...6 Z P RSTOP J Target station network number 1 to 239 String ANY16_OR_STRING_ SINGLE Z P RSTOP U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Own station channel Page 1450 Range of available channel numbers 1 to 8 11 to 18 16 bit unsigned binary ANY16 s2 Specify the station number of the target s...

Page 1585: ...evice d 1 Operand Bit Word Double word Indirect specification Constant Others X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E J U J U J P RSTOP G P RSTOP Z P RSTOP s1 1 2 s2 1 2 s3 1 2 s4 1 2 d 1 3 CH Channel MELSECNET H MELSECNET 10 CC Link IE Controller Network CC Link IE Field Network Ethernet Completion device d This device turns on during END processin...

Page 1586: ...may be required until the sequence scan STOP completes When completed with an error END 0 END 0 END 0 END 0 END 0 OFF OFF OFF ON ON OFF RSTOP END 0 END 0 OFF 1 scan Sequence scan Start contact Completion device d Completion status indication device d 1 Channel n CPU module on the own station CPU module on the target station Network module CC Link IE Controller Network module Remote STOP Stopped Se...

Page 1587: ...17 Operation error Error code SW0030 to SW0037 Description 4000H to 4FFFH MELSEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1588: ...programmable controller on another station Execution condition Ladder ST ENO J_RTMRD EN J s1 s2 s3 s4 d ENO JP_RTMRD EN J s1 s2 s3 s4 d ENO G_RTMRD EN U s1 s2 s3 s4 d ENO GP_RTMRD EN U s1 s2 s3 s4 d ENO Z_RTMRD EN J U s1 s2 s3 s4 d ENO ZP_RTMRD EN J U s1 s2 s3 s4 d FBD LD Instruction Execution condition J RTMRD G RTMRD Z RTMRD JP RTMRD GP RTMRD ZP RTMRD RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU ...

Page 1589: ... Own station channel Page 1450 Range of available channel numbers 1 to 8 11 to 18 16 bit unsigned binary ANY16 s2 Target station number 1 to 120 16 bit unsigned binary ANY16 s3 Specify that CPU module in the target station that is to be accessed 0000H Addressed to target station CPU control CPU 03D0H Addressed to control system CPU 1 03D1H Addressed to standby system CPU 1 03D2H Addressed to syste...

Page 1590: ...he range of the 4 digits of the year is 1980 to 2079 System 1 Upper 8 bits Day 01H to 31H Lower 8 bits Hour 00H to 23H System 2 Upper 8 bits Minute 00H to 59H Lower 8 bits Second 00H to 59H System 3 Upper 8 bits Year 19H and 20H Upper two digits of the year Lower 8 bits Day of the week 00H Sun to 06H Sat The range of the 4 digits of the year is 1980 to 2079 System CH Channel MELSECNET H MELSECNET ...

Page 1591: ...ted with an error END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF RTMRD Sequence scan Start contact CPU module on the own station CPU module on the target station CC Link IE Controller Network module Network module Completion device d2 Completion status indication device d2 1 Clock data storage device d1 Sequence scan Clock data 1 scan Channel n Clock data Clo...

Page 1592: ... Controller on Another Station Operation error Error code SW0030 to SW0037 Description 4000H to 4FFFH MELSEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1593: ...programmable controller on another station Execution condition Ladder ST ENO J_RTMWR EN J s1 s2 s3 s4 d ENO JP_RTMWR EN J s1 s2 s3 s4 d ENO G_RTMWR EN U s1 s2 s3 s4 d ENO GP_RTMWR EN U s1 s2 s3 s4 d ENO Z_RTMWR EN J U s1 s2 s3 s4 d ENO ZP_RTMWR EN J U s1 s2 s3 s4 d FBD LD Instruction Execution condition J RTMWR G RTMWR Z RTMWR JP RTMWR GP RTMWR ZP RTMWR RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU ...

Page 1594: ...digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Own station channel Page 1450 Range of available channel numbers 1 to 8 11 to 18 16 bit unsigned binary ANY16 s2 Specify the station number of the target station target node 1 Station number specification 1 to 120 2 Group specification 1 81H to A0H All stations of group numbers 1...

Page 1595: ...t pattern that indicates the item of the clock data to be changed 0 Not changed 1 Changed b7 Year first two digits b6 Day of week b5 Second b4 Minute b3 Hour b2 Day b1 Month b0 Year last two digits 0 1 User 1 Clock data Upper 8 bits Year 00H to 99H Upper two digits of the year Lower 8 bits Month 01H to 12H The range of the 4 digits of the year is 1980 to 2079 Year 00H to 99H Month 01H to 12H User ...

Page 1596: ...uction can be checked with the completion device d and the completion status indication device d 1 CH Channel MELSECNET H MELSECNET 10 CC Link IE Controller Network CC Link IE Field Network Ethernet Completion device d This device turns on during END processing of the scan where the RTMWR instruction completes and turns off during the next END processing Completion status indication device d 1 Thi...

Page 1597: ...r END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF RTMWR Sequence scan Start contact CPU module on the own station CPU module on the target station CC Link IE Controller Network module Network module Completion device d Completion status indication device d 1 Clock data storage device s4 Sequence scan Clock data 1 scan Channel n Clock data Clock data END 0 END ...

Page 1598: ...Controller on Another Station Operation error Error code SW0030 to SW0037 Description 4000H to 4FFFH MELSEC iQ R CPU Module User s Manual Application 6F00H to 6FFFH MELSEC iQ R CPU Module User s Manual Application E000H to EFFFH MELSEC iQ R CC Link IE Controller Network User s Manual Application ...

Page 1599: ... UINI ZP UINI Operand Description Range Data type Data type label U G P UINI Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 Z P UINI Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING_ SINGLE s Own station start devi...

Page 1600: ...number is determined take corrective action to correct the error content before retrying to execute the instruction Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U G P UINI Z P UINI s 2 d 1 3 Operand s Device Item Description Setting range Set by 0 Not used 1 Completion status The instr...

Page 1601: ...ng the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the UINI instruction When completed successfully The device remains off When completed with an error The device turns on during END processing of the scan where the UINI instruction completes and turns off during the next END processing Error code S 1 Description E00...

Page 1602: ...er to the following MELSEC iQ R Module Configuration Manual 18 1 Reading Data from the Intelligent Device Station Remote Device Station 16 bit Address Specified JP REMFR ZP REMFR These instructions read data from the buffer memory area of the intelligent device station or the remote device station in units of words 16 bit address specified Execution condition Ladder ST ENO JP_REMFR EN J s1 s2 s3 s...

Page 1603: ...o 239 String ANY16_OR_STRING _SINGLE s1 Channel of the own station which is used for the instruction 1 1 to 32 16 bit unsigned binary ANY16 s2 Target station number 1 to 120 16 bit unsigned binary ANY16 s3 Start I O number of target station Head module 00H to FEH 2 Modules other than the head module 00H fixed 16 bit unsigned binary ANY16 s4 Start address of the buffer memory area of the intelligen...

Page 1604: ...ction can be checked with the completion device d2 and the completion status indication device d2 1 CH Channel Completion device d2 This device turns on during END processing of the scan where the REMFR instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or off depending on the completion status of the REMFR instruction W...

Page 1605: ... on the own station CC Link IE Field Network master local module Head module Completion device d2 Completion status indication device d2 1 Setting data s3 s4 n Device for storing the read data d1 Buffer memory Channel n 1 scan Intelligent function module END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF REMFR 1 scan Error code Channel n Target station error Sequence scan Start contact...

Page 1606: ...of resends SW001A is set the REMFR instruction completes with an error after the following time has elapsed Number of resends REMFR REMTO 1 Response wait timer REMFR REMTO Note however that no retry is performed if the target station is disconnected If the REMFR instruction completes with an error execute the instruction again after the target station returns to the system Operation error Error co...

Page 1607: ...ZP REMTO These instructions write data to the buffer memory area of the intelligent device station or the remote device station in units of words 16 bit address specified Execution condition Ladder ST ENO JP_REMTO EN J s1 s2 s3 s4 s5 n d ENO ZP_REMTO EN J s1 s2 s3 s4 s5 n d FBD LD Instruction Execution condition JP REMTO ZP REMTO RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundan...

Page 1608: ...9 String ANY16_OR_STRING _SINGLE s1 Channel of the own station which is used for the instruction 1 1 to 32 16 bit unsigned binary ANY16 s2 Target station number 1 to 120 16 bit unsigned binary ANY16 s3 Start I O number of target station Head module 00H to FEH 2 Modules other than the head module 00H fixed 16 bit unsigned binary ANY16 s4 Start address of the buffer memory area of the intelligent de...

Page 1609: ...tion can be checked with the completion device d and the completion status indication device d 1 CH Channel Completion device d This device turns on during END processing of the scan where the REMTO instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the REMTO instruction When c...

Page 1610: ...ink IE Field Network master local module Head module Completion device d Completion status indication device d 1 Setting data s3 s4 n Device where the write data is stored s5 Buffer memory Channel n 1 scan Intelligent function module END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF REMTO 1 scan Channel n Target station error Sequence scan Write command CPU module on the own station C...

Page 1611: ... of resends SW001A is set the REMTO instruction completes with an error after the following time has elapsed Number of resends REMFR REMTO 1 Response wait timer REMFR REMTO Note however that no retry is performed if the target station is disconnected If the REMTO instruction completes with an error execute the instruction again after the target station returns to the system Operation error Error c...

Page 1612: ...ction Use an engineering tool with version 1 025B or later The RnPCPU process and the RnPCPU redundant with firmware version 04 or later support this instruction Use an engineering tool with version 1 025B or later The RnSFCPU standard with firmware version 06 or later supports this instruction Use an engineering tool with version 1 025B or later The RJ71GF11 T2 and RJ71EN71 with firmware version ...

Page 1613: ...et network number 1 to 239 16 bit unsigned binary ANY16 s1 Channel of the own station which is used for the instruction 1 1 to 32 16 bit unsigned binary ANY16 s2 Target station number 4 1 to 120 16 bit unsigned binary ANY16 s3 Start I O number of target station Head module 00H to FEH 2 Modules other than the head module 00H fixed 16 bit unsigned binary ANY16 s4 Start address of the buffer memory a...

Page 1614: ...ion can be checked with the completion device d2 and the completion status indication device d2 1 CH Channel Completion device d2 This device turns on during END processing of the scan where the REMFRD instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or off depending on the completion status of the REMFRD instruction W...

Page 1615: ... on the own station CC Link IE Field Network master local module Head module Completion device d2 Completion status indication device d2 1 Setting data s3 s4 n Device for storing the read data d1 Buffer memory Channel n 1 scan Intelligent function module END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF REMFRD 1 scan Error code Channel n Target station error Sequence scan Start contac...

Page 1616: ...of resends SW001A is set the REMFRD instruction completes with an error after the following time has elapsed Number of resends REMFR REMTO 1 Response wait timer REMFR REMTO Note however that no retry is performed if the target station is disconnected If the REMFRD instruction completes with an error execute the instruction again after the target station returns to the system Operation error Error ...

Page 1617: ...uction Use an engineering tool with version 1 025B or later The RnPCPU process and the RnPCPU redundant with firmware version 04 or later support this instruction Use an engineering tool with version 1 025B or later The RnSFCPU standard with firmware version 06 or later supports this instruction Use an engineering tool with version 1 025B or later The RJ71GF11 T2 and RJ71EN71 with firmware version...

Page 1618: ...network number 1 to 239 16 bit unsigned binary ANY16 s1 Channel of the own station which is used for the instruction 1 1 to 32 16 bit unsigned binary ANY16 s2 Target station number 4 1 to 120 16 bit unsigned binary ANY16 s3 Start I O number of target station Head module 00H to FEH 2 Modules other than the head module 00H fixed 16 bit unsigned binary ANY16 s4 Start address of the buffer memory area...

Page 1619: ...on can be checked with the completion device d and the completion status indication device d 1 CH Channel Completion device d This device turns on during END processing of the scan where the REMTOD instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the REMTOD instruction When c...

Page 1620: ...Link IE Field Network master local module Head module Completion device d Completion status indication device d 1 Setting data s3 s4 n Device where the write data is stored s5 Buffer memory Channel n 1 scan Intelligent function module END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF REMTOD 1 scan Channel n Target station error Sequence scan Write command CPU module on the own station...

Page 1621: ...of resends SW001A is set the REMTOD instruction completes with an error after the following time has elapsed Number of resends REMFR REMTO 1 Response wait timer REMFR REMTO Note however that no retry is performed if the target station is disconnected If the REMTOD instruction completes with an error execute the instruction again after the target station returns to the system Operation error Error ...

Page 1622: ...D EN U s d1 d2 FBD LD Instruction Execution condition J SINFTYRD G SINFTYRD JP SINFTYRD GP SINFTYRD Operand Description Range Data type Data type label J U J P SINFT YRD J Own station network number 1 to 239 16 bit unsigned binary ANY16 G P SINFT YRD U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s S...

Page 1623: ...station channel 1 Specify the channel to be used by own station 1 to 32 User 3 to 4 Not used System 5 Target station number Specify the station number of the target station 1 to 120 User 6 Not used System 7 Number of resends Before instruction execution Specify the number of resends to be performed if the instruction is not completed within the monitoring time specified by s 8 0 to 15 times At com...

Page 1624: ...s detected is stored No information is stored if an error is detected in the own station 1 to 239 Network number System 17 Error detected station number The number of the station where an error was detected is stored No information is stored if an error is detected in the own station 125 Master station 1 to 120 Local station intelligent device station submaster station System Operand Item d1 0 to ...

Page 1625: ...SCII characters 00H is stored in the 18th character If the number of characters is less than 17 00H is stored in the remaining characters The model name held by a module or a unit is stored Note that it may differ from the one written on the rating plate Target module Character string example module type Remote head module RJ72GF15 T2 I O module INPUT_16 Network module RJ71EN71 E E The name occupi...

Page 1626: ...NFSTRD EN U s d1 d2 FBD LD Instruction Execution condition J SINFSTRD G SINFSTRD JP SINFSTRD GP SINFSTRD Operand Description Range Data type Data type label J U J P SINFS TRD J Own station network number 1 to 239 16 bit unsigned binary ANY16 G P SINFS TRD U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY1...

Page 1627: ... station channel 1 Specify the channel to be used by own station 1 to 32 User 3 to 4 Not used System 5 Target station number Specify the station number of the target station 1 to 120 User 6 Not used System 7 Number of resends Before instruction execution Specify the number of resends to be performed if the instruction is not completed within the monitoring time specified by s 8 0 to 15 times At co...

Page 1628: ...on network number The network number of the station in which an error was detected is stored No information is stored if an error is detected in the own station 1 to 239 Network number System 17 Error detected station number The station number of the station where an error was detected is stored No information is stored if an error is detected in the own station 125 Master station 1 to 120 Local s...

Page 1629: ...s 3 000 default 010 MELSEC Q series module 011 MELSEC iQ R series module 111 Unknown b11 to b15 Reserved Fixed to 0 2nd word b0 to b1 Error status 3 00 No error default 01 Minor error 10 Moderate error 11 Major error b2 Module ready status 3 0 Not ready default 1 Ready b3 to b5 Reserved Fixed to 0 b6 to b7 Inter module synchronization 3 00 Not synchronized default 01 Preparing for synchronization ...

Page 1630: ...ad module 0010 Power supply module 0011 Base unit 0100 Input module 0101 Output module 0110 I O combined module different numbers 0111 I O combined module same number 1000 Intelligent function module 1111 Module or unit other than above b4 to b7 Reserved Fixed to 0 b8 Safety function setting 3 0 Invalid default 1 Valid b9 Reserved Fixed to 0 b10 Safety operation status 3 0 Not operating default 1 ...

Page 1631: ...exadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where control data is stored Refer to the control data Device name ANY16 1 s2 Own station start device containing the network configuration settings Device name ANY16 1 s3 Own station start device containing the reserved station specification Device name ANY16 1 s4 Own station s...

Page 1632: ...ter function bit 3 0 Invalid 2 1 Valid 5 Presence of IP packet transfer function bits 4 5 00 Invalid 01 Valid 6 Data link faulty station setting bit 8 0 Cleared 1 Held 7 CPU STOP time output setting bit 9 0 Held 1 Cleared 8 Link scan mode bit 10 0 Sequence scan unsynchronized 1 Sequence scan synchronized 9 Network topology setting bit 11 0 Line topology star topology or mixed topology of line and ...

Page 1633: ...Station number 1 to 120 Station number 0 Master station 2 Number of occupied stations 1 Fixed 3 Station type 0 Remote I O station 1 Remote device station 2 Intelligent device station 3 Local station master slave system 4 Submaster station F Master station Left User 1 RX RY offset Sets the offset value from the head of RX RY in units of 16 points 2 0 to 16368 User 2 Number of RX RY points Sets the ...

Page 1634: ...e is intelligent device 0 to 2048 points in units of 16 points If the station type is remote I O 0 to 64 points in units of 16 points If the station type is remote device 0 to 128 points in units of 16 points 0 to 2048 0 to 64 0 to 128 User 598 RWr RWw offset Sets the offset value from the start of RWr RWw in units of 4 points 2 0 to 8188 User 599 Number of RWr RWw points Sets the number of RWr RW...

Page 1635: ...on 0 Not specified 1 Specified Each number in the table indicates a station number The default parameter specifies that all stations are 0 not specified Left User Completion device d This device turns on during END processing of the scan where the G P CCPASET instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depen...

Page 1636: ...END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF CCPASET Sequence scan Start contact CPU module on the own station CC Link IE Field Network master local module Completion device d Completion status indication device d 1 Parameter setting 1 scan END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF CCPASET 1 scan Error code Sequence scan Start contact Completion device d Completion ...

Page 1637: ...NI ZP UINI Operand Description Range Data type Data type label U G P UINI Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 Z P UINI Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH String ANY16_OR_STRING _SINGLE s Own station start device ...

Page 1638: ... Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U G P UINI Z P U INI s 2 d 1 3 Operand s Device Item Description Setting range Set by 0 Not used System 1 Completion status The instruction completion status is stored 0 Normal Other than 0 Error error code System 2 Change target specification 0001H fixed 0001H User 3 Station number of own station Specifies the...

Page 1639: ...twork User s Manual Application END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF ON ON OFF UINI 1 scan Sequence scan Start contact Completion device d Completion status indication device d 1 Station number setting Local station CPU module on the own station END 0 END 0 END 0 END 0 END 0 OFF OFF OFF OFF OFF ON ON ON OFF UINI 1 scan Error code Sequence scan Start contact Completion device d Completion ...

Page 1640: ...ion Execution condition J SLMPREQ G SLMPREQ JP SLMPREQ GP SLMPREQ Operand Description Range Data type Data type label J U J P SLMPRE Q J Own station network number 1 to 239 16 bit unsigned binary ANY16 G P SLMPRE Q U Start I O number first three digits in four digit hexadecimal representation of own station or own node 00H to FEH 16 bit unsigned binary ANY16 s1 Own station start device where contr...

Page 1641: ...n access target network number 1 to 239 Network number 1 to 239 User 5 Request destination station number Specify an access target station number 1 to 120 Local station intelligent device station remote device station submaster station 125 Master station 126 Master operating station 1 to 120 125 126 User 6 Not used 7 Number of resends Before instruction execution Specify the number of resends to b...

Page 1642: ...rk number The network number of the station in which an error was detected is stored 1 to 239 Network number System 17 Error detected station number The number of the station where an error was detected is stored 1 to 120 Local station intelligent device station remote device station submaster station 125 Master station 126 Master operating station System Operand s2 Device Item Description Setting...

Page 1643: ... destination multidrop station No Not used Request data length Monitoring timer Not used Request data Specified by s1 Automatically added Specified by s2 00H fixed 0000H fixed Specified by s1 d1 0 d1 1 d1 n d1 0 d1 1 d1 n Request destination module I O No Header When completed Subheader Request destination station No Request destination network No Request destination multidrop station No Request d...

Page 1644: ...annot be set as target stations Access via a relay station is not allowed Error code SW0080 to SW009F Description 4000H to 4FFFH MELSEC iQ R CPU Module User s Manual Application D000H to DFFFH MELSEC iQ R CC Link IE Field Network User s Manual Application 34H 12H 02H 00H EFH 1DH 12H 00H 1DH 34H 02H EFH b8b7 b0 b15 d1 2 d1 3 d1 4 D100 D101 D102 ...

Page 1645: ... using a label define an array to secure enough operation area and specify an element of the array label Ladder ST ENO G_RIRD EN U s d1 d2 ENO GP_RIRD EN U s d1 d2 FBD LD Instruction Execution condition G RIRD GP RIRD Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16...

Page 1646: ...L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 s 3 d1 3 d2 2 4 Operand s Device Item Description Setting range Set by 0 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System 1 Station number Specify the station number of the target station 0 to 64 U...

Page 1647: ... special relay 63H 04H Link special register 64H 04H Device category 1 Name Date type Unit Access code Attribute code Bit Word Input relay X Hexadecimal 01H 05H Output relay Y Hexadecimal 02H 05H Internal relay M Decimal 03H 05H Latch relay L Decimal 83H 05H Link relay B Hexadecimal 23H 05H Timer contact T Decimal 09H 05H Timer coil T Decimal 0AH 05H Timer current value T Decimal 0CH 05H Retentive...

Page 1648: ...xt one will be ignored Create the program so that the next dedicated instruction will start after the completion device turns on because processing of a dedicated instruction takes several scans until its completion Operation error Data is read from the buffer memory area specified by s 2 and s 3 that is included in the station specified by s 1 or from the device of the CPU module The read data is...

Page 1649: ... Instruction Execution condition G RIWT GP RIWT Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 s2 Start device for storing the data to be written Device name ANY16 1 d Devic...

Page 1650: ...F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 s1 3 s2 3 d 2 4 Operand s1 Device Item Description Setting range Set by 0 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System 1 Station number Specify the station number of the target station 0 to 64 User ...

Page 1651: ...ecial relay 63H 04H Link special register 64H 04H Device category 1 Name Date type Unit Access code Attribute code Bit Word Input relay X Hexadecimal 01H 05H Output relay Y Hexadecimal 02H 05H Internal relay M Decimal 03H 05H Latch relay L Decimal 83H 05H Link relay B Hexadecimal 23H 05H Timer contact T Decimal 09H 05H Timer coil T Decimal 0AH 05H Timer current value T Decimal 0CH 05H Retentive ti...

Page 1652: ...e the program so that the next dedicated instruction will start after the completion device turns on because processing of a dedicated instruction takes several scans until its completion Operation error The data specified by s2 is stored in the send buffer of the master station Data is stored in the buffer memory area specified by s1 2 and s1 3 that is included in the station specified by s1 1 or...

Page 1653: ... ENO G_RIRCV EN U s1 s2 d1 d2 ENO GP_RIRCV EN U s1 s2 d1 d2 FBD LD Instruction Execution condition G RIRCV GP RIRCV Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 d1 Start d...

Page 1654: ...iption Setting range Set by 0 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System 1 Station number Specify the station number of the target station 1 to 64 User 2 Access attribute code Specifies 0004H 0004H User 3 Buffer memory address Specifies the start address of the buffer memory ar...

Page 1655: ...is included in the station specified by s1 1 The remote input RX specified by s2 1 that is in the station specified by s1 1 is monitored Turning on the remote input RX causes the master station to read the data from the buffer memory of the target station The read data is stored in the receive buffer of the master station The master station turns on the remote output RY specified by s2 0 It turns ...

Page 1656: ...ISEND EN U s1 s2 s3 d ENO GP_RISEND EN U s1 s2 s3 d FBD LD Instruction Execution condition G RISEND GP RISEND Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 s2 Start device ...

Page 1657: ...ted with an error error code System 1 Station number Specify the station number of the target station 1 to 64 User 2 Access attribute code Specifies 0004H 0004H User 3 Buffer memory address Specifies the start address of the buffer memory area to which to write data Refer to the manual of the target station User 4 Number of write points Specifies in units of words the number of points to be writte...

Page 1658: ...pecified by s1 3 that is included in the station specified by s1 1 The data from the device specified by s2 and later is stored in the send buffer of the master station The master station writes the data of the send buffer in the buffer memory of the target station The master station turns on the remote output RY specified by s3 0 Upon completion of processing against the remote output RY the targ...

Page 1659: ...ion G RIFR GP RIFR Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 If data is read from an automatic update buffer Station number of intelligent device station 1 to 64 16 bit unsigned binary ANY16 If data is read from a random access buffer Specifies the random ...

Page 1660: ...be achieved by CC Link configuration setting of the module parameters Operation error Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 s1 2 3 s2 2 3 d 3 n 2 3 Data is read from the automatic update or random access buffer specified by s1 and s2 that is in the master station The read da...

Page 1661: ...n G RITO GP RITO Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 d1 If data is written to an automatic update buffer Station number of target station 1 to 64 16 bit unsigned binary ANY16 If data is written to a random access buffer Specifies the random access buffe...

Page 1662: ...an be achieved by CC Link configuration setting of the module parameters Operation error Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 d1 2 3 d2 2 3 s 3 n 2 3 Data is read from the device specified by s and later of the master station The read data is written to the automatic update...

Page 1663: ...in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 s2 2 Start device containing the slave station setting data Device name ANY16 1 s3 2 Start device containing the reserved station specification data Device name ANY16 1 s4 2 Start device containing the error invalid ...

Page 1664: ...tation setting data s2 2 Reserved station specification data s3 3 Error invalid station specification data s4 4 Automatic update buffer assignment data s5 5 Data link faulty station setting 0 Data in the remote input RX are cleared 1 Data in the remote input RX are held 6 CPU STOP time output setting 0 Data are refreshed to the remote output RY 1 Data 0 is sent to the remote output RY User 2 Total...

Page 1665: ...tting 1H 1 station occupied 2H 2 stations occupied 3H 3 stations occupied 4H 4 stations occupied 1H to 4H User 3 Station type setting 2 0H Remote I O station for Ver 1 1H Remote device station for Ver 1 2H Intelligent device station for Ver 1 5H Single remote device station for Ver 2 6H Single intelligent device station for Ver 2 8H Double remote device station for Ver 2 9H Double intelligent devi...

Page 1666: ...nd s4 Device Item Description Setting range Set by 0 to 3 Error invalid station specification Specifies an error invalid station in a station by station manner 1 2 0 Not specified 1 Specified The default value is 0 Not specified for all stations User Operand s5 Device Item Description Setting range Set by 0 to 77 Automatic update buffer assignment specification Specifies the assigned buffer memory...

Page 1667: ...by s1 to s5 are written to the master station The data link is started up The device specified by d is turned on Completion device d This device turns on during END processing of the scan where the G P RLPASET instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the G P RLPASET i...

Page 1668: ... all stations are faulty Error code s1 0 Description B000H to BFFFH MELSEC iQ R CC Link System Master Local Module User s Manual Application ON ON OFF OFF END END END END END END END 0 0 0 0 0 0 0 Sequence scan Data link stop Own station data link status X01 Refresh instruction when changing parameters by the dedicated instruction SB0003 Data link stop SB0002 Data link stop completion SB0045 G P P...

Page 1669: ...a and specify an element of the array label Ladder ST ENO G_RDMSG EN U s1 s2 d1 d2 ENO GP_RDMSG EN U s1 s2 d1 d2 FBD LD Instruction Execution condition G RDMSG GP RDMSG Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Ref...

Page 1670: ...e Item Description Setting range Set by 0 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System 1 Station number Specify the station number of the target station 1 to 64 User 2 Send data size Specify the send message data size in bytes 1 to 255 User 3 Receivable data size Specify the maxi...

Page 1671: ...ter station stores data in the device specified by d1 and later and the device specified by d2 turns on Completion device d2 This device turns on during END processing of the scan where the G P RDMSG instruction completes and turns off during the next END processing Completion status indication device d2 1 This device turns on or off depending on the completion status of the G P RDMSG instruction ...

Page 1672: ...er of bytes in the send data s1 2 is odd the lower byte is send as for the last data s2 s1 2 Request message CC Link remote device station CPU module Send data CC Link master station s2 As for the last data only the lower byte is sent Request message CC Link remote device station CPU module Send data CC Link master station ...

Page 1673: ... If the receive data has the same number of bytes 0 is stored in the upper byte of the last data When the number of bytes in the receive data s1 4 is odd The last receive data is stored in the lower byte of the last data storage area in the device memory In the upper byte of the last data storage area 0 is stored d1 s1 4 s1 3 Response message CC Link remote device station CPU module Receive data C...

Page 1674: ...plete with an error Create the program so that the next dedicated instruction will start after the completion device turns on because processing of a dedicated instruction takes several scans until its completion The G P RDMSG instruction uses a part or all of remote register that performs cyclic transmission between the master station and the target station in the system For programming refer to ...

Page 1675: ...using a label define an array to secure enough operation area and specify an element of the array label Ladder ST ENO G_ONDEMAND EN U s1 s2 d ENO GP_ONDEMAND EN U s1 s2 d FBD LD Instruction Execution condition G ONDEMAND GP ONDEMAND Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsign...

Page 1676: ... byte specification set the number of bytes Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 3 s1 4 s2 4 d 2 5 Operand s1 Device Item Description Setting range Set by 0 Send channel Specifies the send channel 1 Channel 1 CH1 side 2 Channel 2 CH2 side 1 2 User 1 Result of sending Used t...

Page 1677: ...etion device d This device turns on during END processing of the scan where the G P ONDEMAND instruction completes and turns off during the next END processing Completion status indication device d 1 This device turns on or off depending on the completion status of the G P ONDEMAND instruction When completed successfully The device remains off When completed with an error The device turns on durin...

Page 1678: ...0 SERIAL COMMUNICATION INSTRUCTIONS 20 1 Sending Data Using the On Demand Function Operation error Error code s1 1 Description 7000H to 7FFFH MELSEC iQ R Serial Communication Module User s Manual Application ...

Page 1679: ...ruction Execution condition G CPRTCL GP CPRTCL Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 n1 Channel to communicate with the external device 1 Channel 1 CH1 side 2 Channel 2 CH2 side 1 2 16 bit unsigned binary ANY16 n2 Number of protocols to be executed consec...

Page 1680: ... error code System 1 Resulting number of executed protocols Used to store the number of actually executed protocols Also for the protocols that caused an error the execution result of the last protocol will be stored If an error is included in the setting data or the control data setting details 0 will be stored 1 to 8 System 2 Execution protocol number specification Sets the number of the first p...

Page 1681: ... G P CPRTCL The instruction completes with an error and the error code is stored in s 0 Execution result If multiple protocols are being executed sequentially the cancellation target protocol n th protocol is forcibly terminated and the subsequent protocols are not executed Operation of the C24 If the function is executed a cancellation is requested while no protocol is being executed the C24 perf...

Page 1682: ...file register for each program are not available for setting data Functions Description Clearing receive data Enables the receive data to be cleared from the OS area Send receive data monitoring start stop Specifies the start or stop of send receive data monitoring When special protocols 202 or 203 is executed the module sets the monitor start instruction 0001H or the monitor stop instruction 0000...

Page 1683: ...STRUCTIONS 20 2 Executing the Protocols Registered for the Predefined Protocol Support Function 1681 20 Operation error Error code s 0 Description 7000H to 7FFFH MELSEC iQ R Serial Communication Module User s Manual Application ...

Page 1684: ...truction Execution condition G OUTPUT GP OUTPUT Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 s2 Start device where the send data is stored Device name ANY16 1 d Device tha...

Page 1685: ...nt Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 3 s1 4 s2 4 d 2 5 Operand s1 Device Item Description Setting range Set by 0 Send channel Specifies the send channel 1 Channel 1 CH1 side 2 Channel 2 CH2 side 1 2 User 1 Result of sending Used to store the result of sending with the G P OUTPUT instruction 0 Normal Other than 0 Error error code S...

Page 1686: ...ta Operation error Instruction to execute concurrently 2 Possibility of concurrent execution Handling for concurrent execution G P OUTPUT The instruction is ignored and does not start processing until the active instruction completes Concurrent execution is however possible if they use different channels G INPUT G P PRR A dedicated instruction concurrent execution error 7FF0H occurs in the second ...

Page 1687: ... condition G INPUT Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s Start device where control data is stored Refer to the control data Device name ANY16 1 d1 Start device for storing the receive data Device name ANY16 1 d2 Device that turns on for one scan upon c...

Page 1688: ... s Device Item Description Setting range Set by 0 Receive channel Specifies the receive channel 1 Channel 1 CH1 side 2 Channel 2 CH2 side 1 2 User 1 Result of receiving Used to store the result of receiving with the G INPUT instruction 0 Normal Other than 0 Error error code System 2 Amount of receive data Stores the number of data received 1 System 3 Allowable amount of receive data Sets the allow...

Page 1689: ...Instruction to execute concurrently 2 Possibility of concurrent execution Handling for concurrent execution G P OUTPUT G P PRR G INPUT The instruction is ignored and does not start processing until the active instruction completes Concurrent execution is however possible if they use different channels ZP CSET See the right If the G INPUT and ZP CSET instructions are issued in this order A dedicate...

Page 1690: ... condition G BIDOUT GP BIDOUT Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 s2 Start device where the send data is stored Device name ANY16 1 d Device that turns on for one...

Page 1691: ...SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 3 s1 4 s2 4 d 2 5 Operand s1 Device Item Description Setting range Set by 0 Send channel Specifies the send channel 1 Channel 1 CH1 side 2 Channel 2 CH2 side 1 2 User 1 Result of sending Used to store the result of sending with the G P BIDOUT instruction 0 Normal Other than 0 Error error code System 2 Amount of send data Specifies the amount ...

Page 1692: ...protocol setting error 7FF2H will occur Operation error Instruction to execute concurrently 2 Possibility of concurrent execution Handling for concurrent execution G P BIDOUT The instruction is ignored and does not start processing until the active instruction completes Concurrent execution is however possible if they use different channels G P BIDIN ZP CSET The instruction is ignored and does not...

Page 1693: ...ution condition G BIDIN GP BIDIN Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s Start device where control data is stored Refer to the control data Device name ANY16 1 d1 Start device for storing the receive data Device name ANY16 1 d2 Device that turns on for o...

Page 1694: ...xecution Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U 1 3 s 4 d1 4 d2 2 5 Operand s Device Item Description Setting range Set by 0 Receive channel Specifies the receive channel 1 Channel 1 CH1 side 2 Channel 2 CH2 side 1 2 User 1 Result of receiving Used to store the result of sendin...

Page 1695: ...ute concurrently 2 Possibility of concurrent execution Handling for concurrent execution G P BIDOUT G P BIDIN The instruction is ignored and does not start processing until the active instruction completes Concurrent execution is however possible if they use different channels ZP CSET A dedicated instruction concurrent execution error 7FF0H occurs in the second instruction Concurrent execution is ...

Page 1696: ...on Execution condition G SPBUSY GP SPBUSY Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 d Start device for storing the read communication status Device name ANY16 EN Execution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect ...

Page 1697: ... at the rise it operates only one scan when the read instruction rises from off to on While the G P SPBUSY instruction is active another instruction can be executed In addition while another instruction is active the G P SPBUSY instruction can be executed Operation error 1 Execution status of the G P ONDEMAND G P OUTPUT G P PRR or G P BIDOUT instruction for channel 1 2 Execution status of the G IN...

Page 1698: ... d FBD LD Instruction Execution condition Z BUFRCVS Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING _SINGLE s Specifies the receive channel 1 Channel 1 CH1 side 2 Channel 2 CH2 side 1 2 16 bit unsigned binary ANY16 d Start device for storing the receive data The receive ...

Page 1699: ...or detection signal Xn4 XnB turns off automatically If the receive has been read using the Z BUFRCVS instruction the receive read completion signal Yn1 Yn8 does not need to be turned on The Z BUFRCVS instruction is used in the interrupt program and processing completes within one scan The following figures show how the Z BUFRCVS instruction operates when its execution completes Operand d Device It...

Page 1700: ...s not been secured the data located at the rear of the storage device will be overwritten The local device and the file register for each program are not available for setting data The read error codes issued during occurrence of a receive error can be read from the data receive result storage area address 258H 268H of the buffer memory Operation error Instruction to execute concurrently 2 Possibi...

Page 1701: ... U s d ENO GP_PRR EN U s d FBD LD Instruction Execution condition G PRR GP PRR Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s Start device where control data is stored Refer to the control data Device name ANY16 1 d Device that turns on for one scan upon complet...

Page 1702: ...end specification Specifies whether to append CR or LF to send data 0 1 User 3 Send pointer Specifies the frame number that indicates the start position of send data within the user frame specification area for sending 1 to 100 User 4 Amount of output Specifies the number of user frames to be sent 1 to 100 User Completion device d This device turns on during END processing of the scan where the G ...

Page 1703: ... data Operation error Instruction to execute concurrently 1 Possibility of concurrent execution Handling for concurrent execution G P PRR The instruction is ignored and does not start processing until the active instruction completes Concurrent execution is however possible if they use different channels G INPUT G P OUTPUT A dedicated instruction concurrent execution error 7FF0H occurs in the seco...

Page 1704: ...el U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Channel number of the channel for which the receive data clear request is issued 1 Channel CH1 side 2 Channel CH2 side 1 2 16 bit unsigned binary ANY16 s2 Start device where control data is stored Refer to the control data Device name ANY16 1 d1 Dummy Device na...

Page 1705: ...evice Item Description Setting range Set by 0 Execution type Specifies 0 0 User 1 Completion status Used to store the completion status 0 Normal Other than 0 Error error code System 2 Request type Specifies the contents of request 4 Receive data clear request 4 User 3 to 111 For system Use prohibited not available also for other applications such as programming System Completion device d2 This dev...

Page 1706: ...ecution Handling for concurrent execution G P ONDEMAND A dedicated instruction concurrent execution error 7FF0H occurs in the second instruction Concurrent execution is however possible if they use different channels G P OUTPUT G P PRR G P BIDOUT G P BIDIN G INPUT See the right If the G INPUT and ZP CSET instructions are issued in this order A dedicated instruction concurrent execution error 7FF0H...

Page 1707: ...ution condition ZP CSET Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Channel number of the channel for which to send the monitoring result 1 Channel CH1 side 2 Channel CH2 side 1 2 16 bit unsigned binary ANY16 s2 Start device where control data is stored Re...

Page 1708: ...n matching 1 2 User 6 Sending means for programmable controller CPU monitoring Specifies the sending means 0 Sending data device data CPU error information 0 User 7 Cyclic broadcast send User frame output start pointer Specifies the start pointer of the table where the user frame numbers for sending with a fixed cycle have been set 0 Not specified sending upon condition matching 1 to 100 Amount of...

Page 1709: ...ut upon condition matching 0 Not specified when sending with a fixed cycle 1 to 100 Amount of data sent 0 1 to 100 User 21 For system Use prohibited 22 to 102 2nd to 10th piece of programmable controller CPU monitoring setting 2nd to 10th block Same row as 1st piece of programmable controller CPU monitoring setting User 103 CPU status monitoring setting error monitoring 11th piece 11th block Sendi...

Page 1710: ...tatus of the ZP CSET instruction can be checked with the completion device d2 and the completion status indication device d2 1 If the programmable controller CPU monitoring registration is to be performed the following data may be specified in the control data only if the communication protocol setting for the target interface is nonprocedural protocol The following figures show how the ZP CSET in...

Page 1711: ...the specified cycle time check the programmable controller CPU monitoring function execution results buffer memory address 2205H 2305H to check for errors and troubleshoot Instruction to execute concurrently 1 Possibility of concurrent execution Handling for concurrent execution G P ONDEMAND A dedicated instruction concurrent execution error 7FF0H occurs in the second instruction Concurrent execut...

Page 1712: ...el U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_ SINGLE s1 Channel number of the channel for which the set value is changed 1 Channel CH1 side 2 Channel CH2 side 1 2 16 bit unsigned binary ANY16 s2 Start device where control data is stored Refer to the control data Device name ANY16 1 d1 Dummy Device name ANY16 d2 Devi...

Page 1713: ...ion Specifies the size words of the buffer memory area to be used for the on demand function 0 The current set value is used 1H to 1A00H Size 0H 1H to 1A00H User 6 Sending area start address Specifies the start address of the sending area to be used for the nonprocedural or bidirectional protocol 0 The current set value is used 400H to 1AFFH 2600H to 3FFFH Start address 0H 400H to 1AFFH 2600H to 3...

Page 1714: ...the data to be sent or received word or byte Sending area of the buffer memory to be used for the MC protocol on demand function Sending or receiving area of the buffer memory to be used for the nonprocedural protocol Sending or receiving area of the buffer memory to be used for the bidirectional protocol Completion device d2 This device turns on during END processing of the scan where the ZP CSET...

Page 1715: ...cution Handling for concurrent execution G P ONDEMAND A dedicated instruction concurrent execution error 7FF0H occurs in the second instruction Concurrent execution is however possible if they use different channels G P OUTPUT G P PRR G P BIDOUT G P BIDIN G INPUT See the right If the G INPUT and ZP CSET instructions are issued in this order A dedicated instruction concurrent execution error 7FF0H ...

Page 1716: ...Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 s2 Start device for storing the registered data Device name ANY16 1 d Device that turns on for one scan upon completion of the instruc...

Page 1717: ... 80 as the dummy 1 to 80 User To register a user frame specify 1 for the device of s1 0 The data in the device specified by s2 and later will be registered according to the control data The registered data must be stored as follows in the device specified by s2 and later Each of the devices to store the registered data requires the data for the following number of points from the device specified ...

Page 1718: ...OUT G P BIDIN G INPUT ZP CSET G P PUTE A dedicated instruction concurrent execution error 7FF0H occurs in the second instruction G P GETE The instruction is ignored and does not start processing until the active instruction completes Z BUFRCVS G P SPBUSY ZP UINI A dedicated instruction concurrent execution error 7FF0H occurs in the second instruction G P CPRTCL Error code s1 1 Description 7000H to...

Page 1719: ...nge Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Refer to the control data Device name ANY16 1 s2 Start device for storing the registered data that has been read Device name ANY16 1 d Device that turns on for one scan upon completion of the in...

Page 1720: ...H E U 1 3 s1 4 s2 4 d 2 5 Operand s1 Device Item Description Setting range Set by 0 Dummy 0 1 Result of reading Used to store the result of sending with the G P GETE instruction 0 Normal Other than 0 Error error code System 2 Specified frame number Specifies the user registered number 1000 to 1199 User 3 Allowable number of bytes Specifies the number of bytes storable in s2 of the registered data ...

Page 1721: ...uction When completed successfully The device remains off When completed with an error The device turns on during END processing of the scan where the G P GETE instruction completes and turns off during the next END processing Instruction to execute concurrently Possibility of concurrent execution Handling for concurrent execution G P ONDEMAND G P OUTPUT G P PRR G P BIDOUT G P BIDIN G INPUT ZP CSE...

Page 1722: ...1720 20 SERIAL COMMUNICATION INSTRUCTIONS 20 14 Reading User Frames Operation error Error code s1 1 Description 7000H to 7FFFH MELSEC iQ R Serial Communication Module User s Manual Application ...

Page 1723: ...dition ZP UINI Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_ SINGLE s Start device where control data is stored Refer to the control data Device name ANY16 1 d Device that turns on for one scan upon completion of the instruction When the instruction completes with an ...

Page 1724: ... value of the buffer memory area 594 252H to make the settings identical 0 to 9 User 5 CH2 transmission specifications setting Sets the CH2 side transmission setting Check the current value of the buffer memory area 611 263H to make the settings identical 0 to 4095 0000H to 0FFFH User 6 CH2 communication protocol setting Sets the CH2 side communication protocol Check the current value of the buffe...

Page 1725: ... parameter is not yet set the setting change in the transmission settings will be assumed to be Permitted during operation Simultaneous use of mode change with the ZP UINI instruction and that with the mode change request signal Yn2 Yn9 must not be attempted If it is attempted an error will occur at an error code of 7FF5H To use the current value of the communication protocol transmission specific...

Page 1726: ...r the R60DA4 R60DAV8 R60DAI8 and R60DAH4 and normal mode for other analog modules Ladder ST ENO G_OFFGAN EN U s ENO GP_OFFGAN EN U s FBD LD Instruction Execution condition G OFFGAN GP OFFGAN Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary 16 bit signed binary ANY16 s Swi...

Page 1727: ...itions When the D A converter module shifts from the offset gain setting mode to the normal mode normal output mode all channels enter in the D A conversion disabled state To resume D A conversion set 0 D A conversion enabled in CH D A conversion enabled disabled setting of the appropriate channel before turning on and off Operating condition setting request Y9 Program example The following figure...

Page 1728: ...ion mode has been selected on the high speed analog digital converter module The wave output mode has been selected on the D A converter module The high speed output mode has been selected on the high speed digital analog converter module Operation error There is no operation error 16 Shifts to offset gain setting mode 77 Describes the offset gain setting processing 111 Shifts to normal mode 172 D...

Page 1729: ... EN U s d FBD LD Instruction Execution condition G OGLOAD GP OGLOAD Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary 16 bit signed binary ANY16 s Start device where the control data is stored Predefined devices Device name ANY16 1 d Device to be turned on one scan when in...

Page 1730: ...ctory default setting gain value H System 12 CH3 Factory default setting offset value L System 13 CH3 Factory default setting offset value H System 14 CH3 Factory default setting gain value L System 15 CH3 Factory default setting gain value H System 16 CH4 Factory default setting offset value L System 17 CH4 Factory default setting offset value H System 18 CH4 Factory default setting gain value L ...

Page 1731: ... specification 0000H to 000FH User 3 System area 4 CH1 Factory default setting offset value System 5 CH1 Factory default setting gain value System 6 CH2 Factory default setting offset value System 7 CH2 Factory default setting gain value System 8 CH3 Factory default setting offset value System 9 CH3 Factory default setting gain value System 10 CH4 Factory default setting offset value System 11 CH4...

Page 1732: ...ue H System 18 CH4 Factory default setting gain value L System 19 CH4 Factory default setting gain value H System 20 CH5 Factory default setting offset value L System 21 CH5 Factory default setting offset value H System 22 CH5 Factory default setting gain value L System 23 CH5 Factory default setting gain value H System 24 CH6 Factory default setting offset value L System 25 CH6 Factory default se...

Page 1733: ... CH5 User range setting offset value H System 54 CH5 User range setting gain value L System 55 CH5 User range setting gain value H System 56 CH6 User range setting offset value L System 57 CH6 User range setting offset value H System 58 CH6 User range setting gain value L System 59 CH6 User range setting gain value H System 60 CH7 User range setting offset value L System 61 CH7 User range setting ...

Page 1734: ...ult setting gain value System 12 CH5 Factory default setting offset value System 13 CH5 Factory default setting gain value System 14 CH6 Factory default setting offset value System 15 CH6 Factory default setting gain value System 16 CH7 Factory default setting offset value System 17 CH7 Factory default setting gain value System 18 CH8 Factory default setting offset value System 19 CH8 Factory defa...

Page 1735: ...tting offset value H System 18 CH2 Factory default setting gain value L System 19 CH2 Factory default setting gain value H System 20 CH2 User range setting offset value L System 21 CH2 User range setting offset value H System 22 CH2 User range setting gain value L System 23 CH2 User range setting gain value H System 24 CH2 User range setting thermoelectromotive force offset value L System 25 CH2 U...

Page 1736: ...r range setting thermoelectromotive force offset value L System 61 CH5 User range setting thermoelectromotive force offset value H System 62 CH5 User range setting thermoelectromotive force gain value L System 63 CH5 User range setting thermoelectromotive force gain value H System 64 CH6 Factory default setting offset value L System 65 CH6 Factory default setting offset value H System 66 CH6 Facto...

Page 1737: ...Factory default setting offset value H System 90 CH8 Factory default setting gain value L System 91 CH8 Factory default setting gain value H System 92 CH8 User range setting offset value L System 93 CH8 User range setting offset value H System 94 CH8 User range setting gain value L System 95 CH8 User range setting gain value H System 96 CH8 User range setting thermoelectromotive force offset value...

Page 1738: ...tem 17 CH2 Factory default setting offset value H System 18 CH2 Factory default setting gain value L System 19 CH2 Factory default setting gain value H System 20 CH2 User range setting offset value L System 21 CH2 User range setting offset value H System 22 CH2 User range setting gain value L System 23 CH2 User range setting gain value H System 24 CH2 User range setting offset resistance value L S...

Page 1739: ...g gain value H System 60 CH5 User range setting offset resistance value L System 61 CH5 User range setting offset resistance value H System 62 CH5 User range setting gain resistance value L System 63 CH5 User range setting gain resistance value H System 64 CH6 Factory default setting offset value L System 65 CH6 Factory default setting offset value H System 66 CH6 Factory default setting gain valu...

Page 1740: ...ctory default setting offset value H System 90 CH8 Factory default setting gain value L System 91 CH8 Factory default setting gain value H System 92 CH8 User range setting offset value L System 93 CH8 User range setting offset value H System 94 CH8 User range setting gain value L System 95 CH8 User range setting gain value H System 96 CH8 User range setting offset resistance value L System 97 CH8 ...

Page 1741: ...H4 Factory default setting gain value H System 20 CH5 Factory default setting offset value L System 21 CH5 Factory default setting offset value H System 22 CH5 Factory default setting gain value L System 23 CH5 Factory default setting gain value H System 24 CH6 Factory default setting offset value L System 25 CH6 Factory default setting offset value H System 26 CH6 Factory default setting gain val...

Page 1742: ...ory default setting gain value H System 68 CH1 User range setting offset value L System 69 CH1 User range setting offset value H System 70 CH1 User range setting gain value L System 71 CH1 User range setting gain value H System 72 CH2 User range setting offset value L System 73 CH2 User range setting offset value H System 74 CH2 User range setting gain value L System 75 CH2 User range setting gain...

Page 1743: ... range setting offset value L System 113 CH12 User range setting offset value H System 114 CH12 User range setting gain value L System 115 CH12 User range setting gain value H System 116 CH13 User range setting offset value L System 117 CH13 User range setting offset value H System 118 CH13 User range setting gain value L System 119 CH13 User range setting gain value H System 120 CH14 User range s...

Page 1744: ...Factory default setting offset value System 13 CH5 Factory default setting gain value System 14 CH6 Factory default setting offset value System 15 CH6 Factory default setting gain value System 16 CH7 Factory default setting offset value System 17 CH7 Factory default setting gain value System 18 CH8 Factory default setting offset value System 19 CH8 Factory default setting gain value System 20 CH9 ...

Page 1745: ...range setting gain value System 52 CH9 User range setting offset value System 53 CH9 User range setting gain value System 54 CH10 User range setting offset value System 55 CH10 User range setting gain value System 56 CH11 User range setting offset value System 57 CH11 User range setting gain value System 58 CH12 User range setting offset value System 59 CH12 User range setting gain value System 60...

Page 1746: ...ext END processing Completion status indication device d 1 Turns on or off depending on the status resulting from completion of the G P OGLOAD instruction When completed normally Unchanged from off When completed with an error Turns on during END processing of the scan that arises upon completion of the G P OGLOAD instruction and turns off during the next END processing Description When Dedicated ...

Page 1747: ... digital converter module The wave output mode has been selected on the D A converter module The high speed output mode has been selected on the high speed digital analog converter module Operation error 14 Set control data Save data types need not be set for the following modules R60ADV8 R60ADI8 R60DAV8 R60DAI8 R60TD8 G R60RD8 G 43 Read the offset gain settings Error code s 1 Description 1863H Th...

Page 1748: ... 2 FX and FY cannot be used 3 T ST C and FD cannot be used Ladder ST ENO G_OGSTOR EN U s d ENO GP_OGSTOR EN U s d FBD LD Instruction Execution condition G OGSTOR GP OGSTOR Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 0000H to 00FEH 16 bit unsigned binary 16 bit signed binary ANY16 s 1 Start device whe...

Page 1749: ...tting offset value L System 13 CH3 Factory default setting offset value H System 14 CH3 Factory default setting gain value L System 15 CH3 Factory default setting gain value H System 16 CH4 Factory default setting offset value L System 17 CH4 Factory default setting offset value H System 18 CH4 Factory default setting gain value L System 19 CH4 Factory default setting gain value H System 20 CH1 Us...

Page 1750: ...y default setting offset value System 5 CH1 Factory default setting gain value System 6 CH2 Factory default setting offset value System 7 CH2 Factory default setting gain value System 8 CH3 Factory default setting offset value System 9 CH3 Factory default setting gain value System 10 CH4 Factory default setting offset value System 11 CH4 Factory default setting gain value System 12 CH1 User range ...

Page 1751: ... offset value H System 18 CH4 Factory default setting gain value L System 19 CH4 Factory default setting gain value H System 20 CH5 Factory default setting offset value L System 21 CH5 Factory default setting offset value H System 22 CH5 Factory default setting gain value L System 23 CH5 Factory default setting gain value H System 24 CH6 Factory default setting offset value L System 25 CH6 Factory...

Page 1752: ... CH5 User range setting offset value H System 54 CH5 User range setting gain value L System 55 CH5 User range setting gain value H System 56 CH6 User range setting offset value L System 57 CH6 User range setting offset value H System 58 CH6 User range setting gain value L System 59 CH6 User range setting gain value H System 60 CH7 User range setting offset value L System 61 CH7 User range setting ...

Page 1753: ... 11 CH4 Factory default setting gain value System 12 CH5 Factory default setting offset value System 13 CH5 Factory default setting gain value System 14 CH6 Factory default setting offset value System 15 CH6 Factory default setting gain value System 16 CH7 Factory default setting offset value System 17 CH7 Factory default setting gain value System 18 CH8 Factory default setting offset value System...

Page 1754: ...tting offset value H System 18 CH2 Factory default setting gain value L System 19 CH2 Factory default setting gain value H System 20 CH2 User range setting offset value L System 21 CH2 User range setting offset value H System 22 CH2 User range setting gain value L System 23 CH2 User range setting gain value H System 24 CH2 User range setting thermoelectromotive force offset value L System 25 CH2 U...

Page 1755: ...User range setting thermoelectromotive force offset value L System 61 CH5 User range setting thermoelectromotive force offset value H System 62 CH5 User range setting thermoelectromotive force gain value L System 63 CH5 User range setting thermoelectromotive force gain value H System 64 CH6 Factory default setting offset value L System 65 CH6 Factory default setting offset value H System 66 CH6 Fa...

Page 1756: ...actory default setting offset value H System 90 CH8 Factory default setting gain value L System 91 CH8 Factory default setting gain value H System 92 CH8 User range setting offset value L System 93 CH8 User range setting offset value H System 94 CH8 User range setting gain value L System 95 CH8 User range setting gain value H System 96 CH8 User range setting thermoelectromotive force offset value ...

Page 1757: ...ystem 17 CH2 Factory default setting offset value H System 18 CH2 Factory default setting gain value L System 19 CH2 Factory default setting gain value H System 20 CH2 User range setting offset value L System 21 CH2 User range setting offset value H System 22 CH2 User range setting gain value L System 23 CH2 User range setting gain value H System 24 CH2 User range setting offset resistance value L...

Page 1758: ... gain value H System 60 CH5 User range setting offset resistance value L System 61 CH5 User range setting offset resistance value H System 62 CH5 User range setting gain resistance value L System 63 CH5 User range setting gain resistance value H System 64 CH6 Factory default setting offset value L System 65 CH6 Factory default setting offset value H System 66 CH6 Factory default setting gain value...

Page 1759: ... Factory default setting offset value H System 90 CH8 Factory default setting gain value L System 91 CH8 Factory default setting gain value H System 92 CH8 User range setting offset value L System 93 CH8 User range setting offset value H System 94 CH8 User range setting gain value L System 95 CH8 User range setting gain value H System 96 CH8 User range setting offset resistance value L System 97 C...

Page 1760: ...tem 19 CH4 Factory default setting gain value H System 20 CH5 Factory default setting offset value L System 21 CH5 Factory default setting offset value H System 22 CH5 Factory default setting gain value L System 23 CH5 Factory default setting gain value H System 24 CH6 Factory default setting offset value L System 25 CH6 Factory default setting offset value H System 26 CH6 Factory default setting ...

Page 1761: ...actory default setting gain value H System 68 CH1 User range setting offset value L System 69 CH1 User range setting offset value H System 70 CH1 User range setting gain value L System 71 CH1 User range setting gain value H System 72 CH2 User range setting offset value L System 73 CH2 User range setting offset value H System 74 CH2 User range setting gain value L System 75 CH2 User range setting g...

Page 1762: ...range setting offset value L System 113 CH12 User range setting offset value H System 114 CH12 User range setting gain value L System 115 CH12 User range setting gain value H System 116 CH13 User range setting offset value L System 117 CH13 User range setting offset value H System 118 CH13 User range setting gain value L System 119 CH13 User range setting gain value H System 120 CH14 User range se...

Page 1763: ...lt setting offset value System 13 CH5 Factory default setting gain value System 14 CH6 Factory default setting offset value System 15 CH6 Factory default setting gain value System 16 CH7 Factory default setting offset value System 17 CH7 Factory default setting gain value System 18 CH8 Factory default setting offset value System 19 CH8 Factory default setting gain value System 20 CH9 Factory defau...

Page 1764: ...range setting gain value System 52 CH9 User range setting offset value System 53 CH9 User range setting gain value System 54 CH10 User range setting offset value System 55 CH10 User range setting gain value System 56 CH11 User range setting offset value System 57 CH11 User range setting gain value System 58 CH12 User range setting offset value System 59 CH12 User range setting gain value System 60...

Page 1765: ...on with the R60AD4 Program content Label setting Completion device d Turns on during END processing of the scan that arises upon completion of the G P OGSTOR instruction and turns off during the next END processing Completion status indication device d 1 Turns on or off depending on the status resulting from completion of the G P OGSTOR instruction When completed normally Unchanged from off When c...

Page 1766: ...r module Operation error 14 Set control data 31 Restore the offset gain settings Error code s 1 Description 1860H In the following cases the G P OGSTOR instruction will be being executed During offset gain setting module Has been set as a target of module to module synchronization During simultaneous conversion mode R60ADH4 During wave output mode D A converter module 1861H The G P OGSTOR instruct...

Page 1767: ...le Configuration Manual 22 1 Restoring the Absolute Position G ABRST Z ABRST These instructions restore the absolute position of specified axis Execution condition Ladder ST ENO G_ABRST1 EN U s d ENO G_ABRST2 EN U s d ENO G_ABRST3 EN U s d ENO G_ABRST4 EN U s d ENO Z_ABRST1 EN U s d ENO Z_ABRST2 EN U s d ENO Z_ABRST3 EN U s d ENO Z_ABRST4 EN U s d FBD LD Instruction Execution condition G ABRST1 G ...

Page 1768: ...xecution condition Bit BOOL ENO Execution result Bit BOOL Operand Bit Word Double word Indirect specification Constant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U G ABRST Z ABRST s 3 d 1 2 Operand s Device Item Description Setting range Set by 0 System area 1 Completion status The instruction completion status is stored 0 Completed successful...

Page 1769: ...ether it has been completed normally or with an error can be checked with the completion device d or completion status indication device d 1 Instruction symbol Target axis G ABRST1 Z ABRST1 Axis 1 G ABRST2 Z ABRST2 Axis 2 G ABRST3 Z ABRST3 Axis 3 G ABRST4 Z ABRST4 Axis 4 Input 3 points Output 3 points Completion device d This device turns on during the END processing of the scan where the ABRST in...

Page 1770: ... executed while a servo amplifier is operable Note that when the absolute position is restored the Servo on signal may turn off servo off during the period of the scan time plus approximately 60ms and the module may operate To restore the absolute position during the servo off state install an electromagnetic brake separately so that signals are output to the electromagnetic brake while the ABRST ...

Page 1771: ...RT2 GP PSTRT3 GP PSTRT4 ZP PSTRT1 ZP PSTRT2 ZP PSTRT3 ZP PSTRT4 Operand Description Range Data type Data type label U GP PSTRT Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 ZP PSTRT Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_S INGLE s St...

Page 1772: ...truction completion status is stored 0 Completed successfully Other than 0 Completed with an error error code System 2 Start number Specifies the number of the following data that is started with the PSTRT instruction Positioning data number 1 to 600 Block start 7000 to 7004 Machine OPR 9001 Fast OPR 9002 Present value change 9003 Multiple axes concurrent start 9004 1 to 600 7000 to 7004 9001 to 9...

Page 1773: ...on is executed when the RD75 READY signal X0 is on While the RD75 READY signal X0 is off the instruction cannot be executed even though it is requested No processing is performed Before executing the instruction turn on both the PLC READY signal Y0 and the RD75 READY signal X0 If multiple axes concurrent start is executed using the PSTRT instruction the completion device d turns on when the positi...

Page 1774: ... TEACH4 ZP TEACH1 ZP TEACH2 ZP TEACH3 ZP TEACH4 Operand Description Range Data type Data type label U GP TEACH Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 ZP TEACH Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_S INGLE s Start device where...

Page 1775: ...ng range Set by 0 System area 1 Completion status The instruction completion status is stored 0 Completed successfully Other than 0 Completed with an error error code System 2 Teaching data selection Selects the address to which to write the current feed value positioning or arc address 0 Writes the current feed value to the positioning address 1 Writes the current feed value to the arc address 0 ...

Page 1776: ...ction check that the BUSY signal XC XD XE XF of the corresponding axis is off Operation error Positioning start instruction PSTRT Absolute position restoration instruction ABRST Teaching instruction TEACH Error code s 1 Description 1863H A value other than 0 or 1 was set in Teaching data selection of s 2 1864H A value other than 1 to 600 was set in Positioning data number of s 3 1865H An instructi...

Page 1777: ...on Execution condition GP PFWRT ZP PFWRT Operand Description Range Data type Data type label U GP PFWRT Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 ZP PFWRT Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_S INGLE s Start device where the co...

Page 1778: ...U GP PFWRT ZP PFWRT s 3 d 1 2 Operand s Device Item Description Setting range Set by 0 System area 1 Completion status The instruction completion status is stored 0 Completed successfully Other than 0 Completed with an error error code System Completion device d This device turns on during the END processing of the scan where the PFWRT instruction completed and turns off during the next END proces...

Page 1779: ...s results in a flash ROM write count error at error code 1080H resulting in failure in data write If one try of write results in a flash ROM write count error check and modify the write program If a flash ROM write count error occurred reset the error of the positioning module using Cd 5 Axis error reset or turn on the power or reset the CPU module again The PFWRT instruction is executed when the ...

Page 1780: ...LD Instruction Execution condition GP PINIT ZP PINIT Operand Description Range Data type Data type label U GP PINIT Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 ZP PINIT Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_S INGLE s Start device ...

Page 1781: ...ant Others U X Y M L SM F B SB FX FY J T ST C D W SD SW FD R ZR RD U G J U3E H G Z LT LST LC LZ K H E U GP PINIT ZP PINIT s 3 d 1 2 Operand s Device Item Description Setting range Set by 0 System area 1 Completion status The instruction completion status is stored 0 Completed successfully Other than 0 Completed with an error error code System Completion device d This device turns on during the END...

Page 1782: ... results in failure After the power is turned on or the CPU module is reset once initialization can repeat a maximum of 25 times if the program is used Any attempt to write data to the flash ROM memory beyond 25 times results in a flash ROM write count error at error code 1080H resulting in failure in data write If one try of initialization results in a flash ROM write count error check and modify...

Page 1783: ...ay to secure enough operation area and specify an element of the array label The local device and the file register for each program are not available for setting data Ladder ST ENO Z_RCPWRITE EN U s d ENO ZP_RCPWRITE EN U s d FBD LD Instruction Execution condition Z RCPWRITE ZP RCPWRITE Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadec...

Page 1784: ... 0 System area 1 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System 2 Record number Record number of data to be written 1 1 to 256 User 3 to 7 System area 8 to 23 File name Specifies the recipe name in which the data of the CPU module is written 2 Up to 32 characters String User 24 to ...

Page 1785: ...tatus indication device d 1 are not turned ON The Z P RCPWRITE instruction cannot be executed when the module stop error is being occurred or the data logging function cannot be performed X5 OFF If attempted an error occurs at the instruction completion An error may occur when the instruction Z P RCPREAD other than the Z P RCPWRITE instruction is accessing the same file When accessing the same fil...

Page 1786: ...EAD EN U s d FBD LD Instruction Execution condition Z RCPREAD ZP RCPREAD Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH String ANY16_OR_STRING_ SINGLE s Start device where control data is stored Page 1785 Control data Device name ANY16 1 d Device that turns on for one scan upon completion of ...

Page 1787: ...ly Other than 0 Completed with an error error code System 2 Record number Record number of data to be read 1 1 to 256 User 3 to 7 System area 8 to 23 File name Specifies the recipe name in which the data of the CPU module is read 2 Up to 32 characters String User 24 to 31 System area Completion device d This device turns on during END processing of the scan where the Z P RCPREAD instruction comple...

Page 1788: ...tus indication device d 1 are not turned ON The Z P RCPREAD instruction cannot be executed when the module stop error is being occurred or the data logging function cannot be performed X5 OFF If attempted an error occurs at the instruction completion An error may occur when the instruction Z P RCPWRITE other than the Z P RCPREAD instruction is accessing the same file When accessing the same file a...

Page 1789: ...uction Execution condition G CEXECUTE GP CEXECUTE Operand Description Range Data type Data type label U Start I O number first three digits in four digit hexadecimal representation of a module 00H to FEH 16 bit unsigned binary ANY16 s1 Start device where control data is stored Page 1788 Control data Device name ANY16 s2 Start device where request data is stored 1 Device name ANY16 d1 Start device ...

Page 1790: ...ing range Set by 0 Allowable amount of response data Sets the allowable number of words of response data that can be stored in d1 1 to 8192 User 1 Completion status The completion status is stored upon completion of the instruction 0 Completed successfully Other than 0 Completed with an error error code System Operand s2 Device Item Description Setting range Set by 0 Request data length Specify th...

Page 1791: ...E instruction operates during execution The user program runs in the following tasks settings Task priority 100 Stack size 40000 bytes Task option VX_FP_TASK Completion device d2 This device turns on during END processing of the scan where the G P CEXECUTE instruction completes and turns off during the next END processing Completion status indication device d2 1 When completed successfully The dev...

Page 1792: ... want to run multiple functions prepare the data for identifying functions in request data then call the functions distinctly using the conditional branches in user function The G P CEXECUTE instruction cannot be executed additionally while another G P CEXECUTE instruction is being executed If attempted the instruction is not processed The local device and the file register for each program are no...

Page 1793: ... of the following chapters 25 TYPE CONVERSION FUNCTIONS 26 SINGLE VARIABLE FUNCTIONS 27 ARITHMETIC OPERATION FUNCTIONS 28 BIT SHIFT FUNCTIONS 29 BOOLEAN FUNCTIONS 30 SELECTION FUNCTIONS 31 COMPARISON FUNCTIONS 32 STRING FUNCTIONS 33 TIME DATA TYPE FUNCTIONS ...

Page 1794: ...t from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD ST Without EN ENO With EN ENO Without EN ENO d BOOL_TO_WORD s With EN ENO d BOOL_TO_WORD_E EN ENO s Argument Description Type Data ...

Page 1795: ...25 TYPE CONVERSION FUNCTIONS 25 1 Converting BOOL to WORD 1793 25 Operation error There is no operation error ...

Page 1796: ...ion conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BOOL_TO_DWORD s With EN ENO d BOOL_TO_DWORD_E EN ENO s Argument Descr...

Page 1797: ...ions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BOOL_TO_INT s With EN ENO d BOOL_TO_INT_E EN ENO s Argument Description Type Da...

Page 1798: ...tions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BOOL_TO_DINT s With EN ENO d BOOL_TO_DINT_E EN ENO s Argument Description Type...

Page 1799: ...nd operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BOOL_TO_TIME s With EN ENO d BOOL_TO_TIME_E EN ENO s Argument Description Type Data t...

Page 1800: ...itions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BOOL_TO_STRING s With EN ENO d BOOL_TO_STRING_E EN ENO s Argument Description...

Page 1801: ...ons and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d WORD_TO_BOOL s With EN ENO d WORD_TO_BOOL_E EN ENO s Argument Description Type D...

Page 1802: ...ation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d WORD_TO_DWORD s With EN ENO d WORD_TO_DWORD_E EN ENO s Argument Description Type Data type E...

Page 1803: ... 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d WORD_TO_INT s With EN ENO d WORD_TO_INT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed ...

Page 1804: ...ws 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d WORD_TO_DINT s With EN ENO d WORD_TO_DINT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s...

Page 1805: ...25 TYPE CONVERSION FUNCTIONS 25 10 Converting WORD to DINT 1803 25 Operation error There is no operation error ...

Page 1806: ...the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d WORD_TO_TIME s With EN ENO d WORD_TO_TIME_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALS...

Page 1807: ...itions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d WORD_TO_STRING s With EN ENO d WORD_TO_STRING_E EN ENO s Argument Description...

Page 1808: ...ns and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DWORD_TO_BOOL s With EN ENO d DWORD_TO_BOOL_E EN ENO s Argument Description Type ...

Page 1809: ... follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DWORD_TO_WORD s With EN ENO d DWORD_TO_WORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variabl...

Page 1810: ... CONVERSION FUNCTIONS 25 14 Converting DWORD to WORD When the DWORD_TO_WORD _E function is executed the upper 16 bit data of the input value DWORD data type are discarded Operation error There is no operation error ...

Page 1811: ...will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DWORD_TO_INT s With EN ENO d DWORD_TO_INT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input...

Page 1812: ...E CONVERSION FUNCTIONS 25 15 Converting DWORD to INT When the DWORD_TO_INT _E function is executed the upper 16 bit data of the input value DWORD data type are discarded Operation error There is no operation error ...

Page 1813: ... 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DWORD_TO_DINT s With EN ENO d DWORD_TO_DINT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Execu...

Page 1814: ...e value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DWORD_TO_TIME s With EN ENO d DWORD_TO_TIME_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALS...

Page 1815: ...ons and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DWORD_TO_STRING s With EN ENO d DWORD_TO_STRING_E EN ENO s Argument Description ...

Page 1816: ...ns and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_BOOL s With EN ENO d INT_TO_BOOL_E EN ENO s Argument Description Type Data...

Page 1817: ...s 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_WORD s With EN ENO d INT_TO_WORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed...

Page 1818: ... 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_DWORD s With EN ENO d INT_TO_DWORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s I...

Page 1819: ...25 TYPE CONVERSION FUNCTIONS 25 21 Converting INT to DWORD 1817 25 Operation error There is no operation error ...

Page 1820: ... 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_DINT s With EN ENO d INT_TO_DINT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed ...

Page 1821: ...om d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_BCD s With EN ENO d INT_TO_BCD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable INT ENO Output status TRUE Normal FALSE ...

Page 1822: ...1820 25 TYPE CONVERSION FUNCTIONS 25 23 Converting INT to BCD Operation error Error code SD0 Description 3401H Data input to s is out of the range 0 to 9999 ...

Page 1823: ...s 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_REAL s With EN ENO d INT_TO_REAL_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed...

Page 1824: ... 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_LREAL s With EN ENO d INT_TO_LREAL_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Execute...

Page 1825: ... If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_TIME s With EN ENO d INT_TO_TIME_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FA...

Page 1826: ...3 is input When SM701 Number of output characters selection is off 00H is stored at the end of the string 4th word Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_STRING s With EN ENO d INT_TO_STRING_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable INT ENO Output sta...

Page 1827: ...ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefin...

Page 1828: ...s and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_BOOL s With EN ENO d DINT_TO_BOOL_E EN ENO s Argument Description Type Dat...

Page 1829: ...ll be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_WORD s With EN ENO d DINT_TO_WORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input v...

Page 1830: ...E CONVERSION FUNCTIONS 25 29 Converting DINT to WORD When the DINT_TO_WORD _E function is executed the upper 16 bit data of the input value DINT data type are discarded Operation error There is no operation error ...

Page 1831: ...1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_DWORD s With EN ENO d DINT_TO_DWORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Execut...

Page 1832: ... the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_INT s With EN ENO d DINT_TO_INT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable DIN...

Page 1833: ...EN ENO With EN ENO Without EN ENO d DINT_TO_BCD s With EN ENO d DINT_TO_BCD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable DINT ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable ANY_BIT 1 Set 0s RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Re...

Page 1834: ...l be undefined Create a program so that the undefined value will not be used in operations Operation error When d is of WORD data type When d is of DWORD data type Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 3401H The 32 bit signed binary data input to s is out of the range 3276...

Page 1835: ...result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_REAL...

Page 1836: ...f the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_LREAL s With EN ENO d DINT_TO_LREAL_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed ...

Page 1837: ...f the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_TIME s With EN ENO d DINT_TO_TIME_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FA...

Page 1838: ...tured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_STRING s With EN ENO d DINT_TO_STRING_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable DINT ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable STRING 11 RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU ...

Page 1839: ...eration result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation res...

Page 1840: ...tput from d Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BCD_TO_INT s With EN ENO d BCD_TO_INT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable WORD ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable INT 1 Thousands place 2 Hundred...

Page 1841: ...ill not be used in operations Operation error Turning on SM754 can prevent the above error from being issued If the specified value is out of the valid range the BCD_TO_INT _E function is not executed regardless of the status on off of SM754 Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Descr...

Page 1842: ...red text Without EN ENO With EN ENO Without EN ENO d BCD_TO_DINT s With EN ENO d BCD_TO_DINT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANY_BIT ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable DINT RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard S...

Page 1843: ...will not be used in operations When s is of WORD data type 1 Filled with 0s When s is of DWORD data type 1 Filled with 0s Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value s d 10 0 1 2 4 8 10 1 1 2 4 8 10 2 1 2 4 8 10 3 1 2 4 8 9999H 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 2 0 2 1 2 2 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 2...

Page 1844: ...n SM754 can prevent the above error from being issued If the specified value is out of the valid range the BCD_TO_DINT _E function is not executed regardless of the status on off of SM754 Error code SD0 Description 3401H A value other than 0 to 9 exists at any digit of the value input to s ...

Page 1845: ...nditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BCD_TO_STRING s With EN ENO d BCD_TO_STRING_E EN ENO s Argument Description Type Data type EN Execution condition TRUE ...

Page 1846: ...g BCD to STRING Operation error When s is of WORD data type When s is of DWORD data type Error code SD0 Description 3401H Data input to s is out of the range 0 to 9999 Error code SD0 Description 3401H Data input to s is out of the range 0 to 99999999 ...

Page 1847: ...om d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d REAL_TO_INT s With EN ENO d REAL_TO_INT_E EN ENO s Argument Description Typ...

Page 1848: ...ber input to s is out of the range 32768 to 32767 3402H An unusual number is input to s The single precision real number input to s is not within the following range 2128 s 2 126 0 2 126 s 2128 E 3 40282347 38 to E 1 17549435 38 0 E1 17549435 38 to E3 40282347 38 The value set to a device or label is 0 a subnormal number NaN not a number or ...

Page 1849: ...from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d REAL_TO_DINT s With EN ENO d REAL_TO_DINT_E EN ENO s Argument Description...

Page 1850: ...input to s is out of the range 2147483648 to 2147483647 3402H An unusual number is input to s The single precision real number input to s is not within the following range 2128 s 2 126 0 2 126 s 2128 E 3 40282347 38 to E 1 17549435 38 0 E1 17549435 38 to E3 40282347 38 The value set to a device or label is 0 a subnormal number NaN not a number or ...

Page 1851: ... performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d REAL_TO_LREAL s With EN ENO d R...

Page 1852: ...error Error code SD0 Description 3402H The input value is 0 or not in the following range 2128 s 2 126 0 2 126 s 2128 E 3 40282347 38 to E 1 17549435 38 0 E1 17549435 38 to E3 40282347 38 3403H The data output from d exceeds the following range An overflow has occurred d 2128 ...

Page 1853: ... Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable REAL ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable STRING 13 RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundant Process s d EN ENO d s d s E 00H 45H E 2EH REAL STRING 6 5 4 3 2 1 0 ASCII code ones place exponent part Automatically added...

Page 1854: ... part are rounded off If the number of digits in the input value is less than the number of significant digits 30H 0 is stored in the decimal part As sign data for exponent 2BH is stored if the input value is positive and 2DH is stored if the input value is negative When the exponent is one digit 30H 0 is stored in the tens place of the exponent s d 1 0 E 6 1 2 3 4 5 12 3456 Filled with 20H space ...

Page 1855: ...n operations Operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 3402H The value input to s is out of the following range 2128 s 2 126 0 2 126 s 2128 E 3 40282347 38 to E 1 17549435 38 0 E1 17549435 38 to E3 40282347 38 The value input to s is 0 a subnormal number NaN no...

Page 1856: ...ith EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d LREAL_TO_INT s With EN ENO d LREAL_TO_INT_E EN ENO s Argument Description Type Data type EN ...

Page 1857: ...ror Error code SD0 Description 3402H The input value is 0 or not in the following range 21024 s d 2 1022 0 2 1022 s d 21024 E 1 7976931348623157 308 to E 2 2250738585072014 308 0 E2 2250738585072014 308 to E1 7976931348623157 308 The input value is out of the range 32768 to 32767 ...

Page 1858: ... EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d LREAL_TO_DINT s With EN ENO d LREAL_TO_DINT_E EN ENO s Argument Description Type Data type EN E...

Page 1859: ...Error code SD0 Description 3402H The input value is 0 or not in the following range 21024 s d 2 1022 0 2 1022 s d 21024 E 1 7976931348623157 308 to E 2 2250738585072014 308 0 E2 2250738585072014 308 to E1 7976931348623157 308 The input value is out of the range 2147483648 to 2147483647 ...

Page 1860: ...lts will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d LREAL_TO_REAL s With EN ENO d LREAL_TO_REAL_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed...

Page 1861: ... Description 3402H The input value is 0 or not in the following range 21024 s d 2 1022 0 2 1022 s d 21024 E 1 7976931348623157 308 to E 2 2250738585072014 308 0 E2 2250738585072014 308 to E1 7976931348623157 308 3403H The data output from d exceeds the following range An overflow has occurred d 2128 ...

Page 1862: ...tput from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d TIME_TO_BOOL s With EN ENO d TIME_TO_BOOL_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input ...

Page 1863: ... 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d TIME_TO_WORD s With EN ENO d TIME_TO_WORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Execute...

Page 1864: ... the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d TIME_TO_DWORD s With EN ENO d TIME_TO_DWORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed F...

Page 1865: ...esults will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d TIME_TO_INT s With EN ENO d TIME_TO_INT_E EN ENO s Argument Description Type Data type EN Execution...

Page 1866: ...e FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d TIME_TO_DINT s With EN ENO d TIME_TO_DINT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not ex...

Page 1867: ...as follows Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d TIME_TO_STRING s With EN ENO d TIME_TO_STRING_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable TIME ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable STRING STRING 11 As the ...

Page 1868: ...NO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefine...

Page 1869: ...If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d STRING_TO_BOOL s With EN ENO d STRING_TO_BOOL_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Execut...

Page 1870: ...rom ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d STRING_TO_WORD s With EN ENO d STRING_TO_WORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input...

Page 1871: ...m ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d STRING_TO_DWORD s With EN ENO d STRING_TO_DWORD_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input...

Page 1872: ...that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d STRING_TO_INT s With EN ENO d STRING_TO_INT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable STRING 6 ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d ...

Page 1873: ...CTIONS 25 56 Converting STRING to INT 1871 25 Operation error Error code SD0 Description 3401H An out of range value is input to s ASCII code other than 30H to 39H 20H and 00H STRING data type value other than 32768 to 32767 ...

Page 1874: ...xt Without EN ENO With EN ENO Without EN ENO d STRING_TO_DINT s With EN ENO d STRING_TO_DINT_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable STRING 11 ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable DINT ASCII code 30H to 39H 20H 2DH and 00H STRING data ty...

Page 1875: ... 25 57 Converting STRING to DINT 1873 25 Operation error Error code SD0 Description 3401H An out of range value is input to s ASCII code other than 30H to 39H 20H and 00H STRING data type value other than 2147483648 to 2147483647 ...

Page 1876: ...g shorter than four characters is to be converted input a character string padded with 0s e g 0001 for 1 If the string length exceeds 4 characters the four left characters are regarded as the targets to convert WORD or DWORD data type can be specified for d BOOL data type cannot be specified Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d STRING_TO_BCD s With EN ENO d STR...

Page 1877: ...d operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 3401H An ASCII code oth...

Page 1878: ..._REAL_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable STRING 24 ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable REAL RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundant Process s d EN ENO d s s d 0 6 5 4 3 2 1 STRING REAL Lower byte Upper...

Page 1879: ... data is converted as a negative value In exponential form when 2BH is specified as sign data for the exponent or the sign data is omitted the data is converted as a positive value When 2DH is specified the data is converted as a negative value When s is in decimal form When s is in exponential form When s is in decimal form When s is in exponential form s d 1 35034 2DH 31H 1 00H 33H 3 34H 4 35H 5...

Page 1880: ...xecution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in the device area between the specified device number and the last device number specified by s 3401H An out of range value is input to s The integral part or decimal part contains a character other than...

Page 1881: ... as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d STRING_TO_TIME s With EN ENO d STRING_TO_TIME_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input va...

Page 1882: ...IONS 25 60 Converting STRING to TIME Operation error Error code SD0 Description 3401H An ASCII code other than 30H to 39H 20H and 00H is input The STRING data type value input is out of the following range 2147483648 to 4147483647 ...

Page 1883: ...ollows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BITARR_TO_INT s n With EN ENO d BITARR_TO_INT_E EN ENO s n Argument Description Type Data type EN Execution condition ...

Page 1884: ...1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d BITARR_TO_DINT s n With EN ENO d BITARR_TO_DINT_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE ...

Page 1885: ...output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INT_TO_BITARR s n With EN ENO d INT_TO_BITARR_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOO...

Page 1886: ...tput data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DINT_TO_BITARR s n With EN ENO d DINT_TO_BITARR_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOO...

Page 1887: ...rogram so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d CPY_BITARR s n With EN ENO d CPY_BITARR_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s BitArrIn Input Input variable Boolean array eleme...

Page 1888: ... FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder 1 Structured text Without EN ENO With EN ENO Without EN ENO d GET_BIT_OF_INT s n With EN ENO d GET_BIT_OF_INT_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not ...

Page 1889: ...bel 1887 25 By using the bit specification of labels a concise program having the same operation as GET_BIT_OF_INT can be created The following example reads the value in bit 5 b5 of g_int1 into g_bool1 the same as when GET_BIT_OF_INT is used Ladder ST g_bool1 g_int1 5 FBD LD ...

Page 1890: ...l be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder 1 Structured text Without EN ENO With EN ENO Without EN ENO d SET_BIT_OF_INT s n With EN ENO d SET_BIT_OF_INT_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input...

Page 1891: ...or There is no operation error By using the bit specification of labels a concise program having the same operation as SET_BIT_OF_INT can be created The following example changes the value in bit 5 b5 of g_int1 to the value of g_bool1 the same as when SET_BIT_OF_INT is used Ladder ST g_int1 5 g_bool1 FBD LD The return value of SET_BIT_OF_INT is assigned to a variable and used g_int1 SET_BIT_OF_INT...

Page 1892: ... value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder 1 Structured text Without EN ENO With EN ENO Without EN ENO d CPY_BIT_OF_INT s n1 n2 With EN ENO d CPY_BIT_OF_INT_E EN ENO s n1 n2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s...

Page 1893: ...s no operation error By using the bit specification of labels a concise program having the same operation as CPY_BIT_OF_INT can be created The following example changes the value in bit 3 b3 of g_int2 to the value of bit 5 b5 of g_int1 the same as when CPY_BIT_OF_INT is used Ladder ST g_int2 3 g_int1 5 FBD LD The return value of CPY_BIT_OF_INT is assigned to a variable and used g_int2 CPY_BIT_OF_I...

Page 1894: ...ion outputs the start data of the data specified by s as WORD type data Operation result The operation processing is performed The operation result is output from d Operation error There is no operation error Ladder FBD LD Structured text d GET_BOOL_ADDR s d GET_INT_ADDR s d GET_WORD_ADDR s Argument Description Type Data type s Input Input variable ANY d Output Output variable BOOL INT WORD Standa...

Page 1895: ...used ENO outputs TRUE Operation result 1 Function without EN ENO The operation processing is performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD...

Page 1896: ...peration error When s is of REAL data type When s is of LREAL data type Error code SD0 Description 3402H The value output from d is 0 a subnormal number NaN not a number or Error code SD0 Description 3402H The value output from d is 0 a subnormal number NaN not a number or ...

Page 1897: ...e execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d SQRT s With EN ENO d SQRT_E EN ENO s Argument Description Type Data type EN Execution con...

Page 1898: ...is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d LN s With EN ENO d LN_E EN ENO s Argument Descr...

Page 1899: ...n result Operation result 1 Function without EN ENO The operation processing is performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured t...

Page 1900: ... 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H Out of range data is set to s The specified value is a negative number The specified value is 0 Error code SD0 Description 3402H The value input to s is 0 a subnormal number NaN not a number or 3405H Out of range data is set to s The specified value is a negative number The specified value is 0 ...

Page 1901: ...on results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d EXP s With EN ENO d EXP_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not execu...

Page 1902: ... ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d SIN s With EN ENO d SIN_E EN ENO s Argument Description Type Data type EN Executio...

Page 1903: ...ith EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d COS s With EN ENO d COS_E EN ENO s Argument Description Type Data type EN Ex...

Page 1904: ...sing is performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d TAN s Wi...

Page 1905: ...ction with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d ASIN s With EN ENO d ASIN_E EN ENO s Argument Description Type Data t...

Page 1906: ...Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d ACOS s With EN ENO d ACOS_E EN ENO s Argument Description Type Dat...

Page 1907: ... The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d ATAN s With EN ENO d ATAN...

Page 1908: ...able BOOL s1 IN1 to s28 IN28 Input Input variable ANY_NUM ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable ANY_NUM Data type INT Data type DINT Data type REAL LREAL Even if an underflow or overflow occurs no operation error is issued When ADD_E is used ENO outputs TRUE Example 1 32767 2 32767 7FFFH 0002H 8001H A negative value results because the most sign...

Page 1909: ...8 are of LREAL data type Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 3402H The value input to s1 to s28 is 0 a subnormal number NaN not a number or The value output from d is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the following range An ove...

Page 1910: ...ta type DINT Data type REAL LREAL Even if an underflow or overflow occurs no operation error is issued When MUL_E is used ENO outputs TRUE Even if the operation result is outside the INT data type range the INT data type value is output In this case the output value is of INT data type with the upper 16 bits deleted although the operation result is a DINT data type value If the operation result is...

Page 1911: ...nge convert the input value as appropriate before operation Operation error When s1 to s28 are of REAL data type When s1 to s28 are of LREAL data type Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 3402H The value input to s1 to s28 is 0 a subnormal number NaN not a number or 3403H...

Page 1912: ...variable ANY_NUM ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable ANY_NUM Data type INT Data type DINT Data type REAL LREAL Even if an underflow or overflow occurs no operation error is issued When SUB_E is used ENO outputs TRUE Example 1 32767 2 32767 7FFFH FFFEH 8001H A negative value results because the most significant bit is 1 Example 2 32767 2 32766 ...

Page 1913: ...ult EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN not a number or The value output from d is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the following range An ov...

Page 1914: ...ion results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DIV s1 s2 With EN ENO d DIV_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Inp...

Page 1915: ...escription 3400H The value divisor input to s2 is 0 3402H The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is 0 a subnormal number NaN not a number or 3403H The data output from d exceeds the following range An overflow has occurred d 2128 Error code SD0 Description 3400H The value divisor input to s2 is 0 3402H The value input to s1 is 0 a subnormal number N...

Page 1916: ...e value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO The function is described as an operator MELSEC iQ R Programming Manual Program Design With EN ENO d MOD_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition...

Page 1917: ...emainder 1915 27 Operation error When s1 and s2 are of INT data type When s1 and s2 are of DINT data type Error code SD0 Description 3400H The value divisor input to s2 is 0 Error code SD0 Description 3400H The value divisor input to s2 is 0 ...

Page 1918: ...efined Create a program so that the undefined value will not be used in operations Operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d EXPT s1 s2 With EN ENO d EXPT_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 Base Input variable ANY_REAL s2 IN2 Exponent power Input variab...

Page 1919: ...nd d must be of the same data type Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d MOVE s With EN ENO d MOVE_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANY ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable ANY RnCPU RnENCPU RnS...

Page 1920: ...te a program so that the undefined value will not be used in operations Operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in the setting area specified by s in the device label memory 3405H The number of characters in the string input to...

Page 1921: ...tructured text Without EN ENO With EN ENO Without EN ENO d SHL s n With EN ENO d SHL_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANY_BIT n N Number of bits to be shifted Input variable ANY_BIT ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable ANY_BIT R...

Page 1922: ...erformed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Data type of s WORD Data type of s DWORD Range 0 to 15 The lowe...

Page 1923: ...to be shifted within the following range Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d SHR s n With EN ENO d SHR_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANY_BIT n N Number of bits to be shifted Input variable ANY_BIT ENO Output status TRUE Normal FALSE Abnormal...

Page 1924: ... ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefi...

Page 1925: ...ng range Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d ROL s n With EN ENO d ROL_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANY_BIT n N Number of bits to be shifted Input variable ANY_BIT ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output O...

Page 1926: ... ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefi...

Page 1927: ...wing range Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d ROR s n With EN ENO d ROR_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANY_BIT n N Number of bits to be shifted Input variable ANY_BIT ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output...

Page 1928: ... ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefi...

Page 1929: ... Setting data Description type data type Ladder FBD LD 1 Structured text 1 Without EN ENO With EN ENO Without EN ENO The function is described as an operator MELSEC iQ R Programming Manual Program Design With EN ENO d AND_E EN ENO s1 s2 d OR_E EN ENO s1 s2 d XOR_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 to ...

Page 1930: ...output the operation result in the same data type as s from d Ex Data type WORD If three or more s settings exist s3 will be XORed with the result of XOR between s1 and s2 In addition if s4 exists s4 will be XORed with the result of subjecting s to XOR After this XOR will repeat for the number of s settings Ex Data type BOOL 1 Number of s s 3 2 Number of s s 4 3 Number of s s 5 The XOR operation i...

Page 1931: ...h EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Un...

Page 1932: ...m ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO The function is described as an operator MELSEC iQ R Programming Manual Program Design With EN ENO d NOT_E EN ENO s Argument Description Type Data type EN Execut...

Page 1933: ...e bit value 0 or 1 of s1 Input a BOOL data type value to s1 Input a BOOL INT DINT WORD DWORD REAL LREAL STRING TIME structure or array data type value to s2 and s3 Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d SEL s1 s2 s3 With EN ENO d SEL_E EN ENO s1 s2 s3 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s...

Page 1934: ...e of STRING data type Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in the label or device area between the specified device number and the last device number specified by s2 There is no NULL code 00H in the label or device area between the specifie...

Page 1935: ...data type Ladder FBD LD 1 Structured text Without EN ENO With EN ENO Without EN ENO d MAX s1 s2 d MIN s1 s2 With EN ENO d MAX_E EN ENO s1 s2 d MIN_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 to s28 IN28 Input Input variable ANY_ELEMENTARY ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Out...

Page 1936: ...ut data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error Match All characters matched Bigger string The one having a character with a bigger code when strings consist of different characters The one having a longer length when strings are of different lengths Smaller string The one having a character with a smaller code when strin...

Page 1937: ...s2 s3 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 MN 1 Lower limit value minimum output threshold value Input variable ANY_ELEMENTARY s2 IN 1 Input value to be controlled with the upper and lower limits Input variable ANY_ELEMENTARY s3 MX 1 Upper limit value maximum output threshold value Input variable ANY_ELEMENTARY ENO Outpu...

Page 1938: ...RD data type When s1 s2 and s3 are of DINT DWORD or TIME data type If the input values are s1 s3 the value input to s3 is output from d If the input values are s2 s1 the value input to s1 is output from d If the input values are s1 s2 s3 the value input to s2 is output from d Match All characters matched Bigger string The one having a character with a bigger code when strings consist of different ...

Page 1939: ... s1 is out of the following range 21024 s1 2 1022 0 2 1022 s1 21024 E 1 7976931348623157 308 to E 2 2250738585072014 308 0 E2 2250738585072014 308 to E1 7976931348623157 308 The value input to s1 is 0 a subnormal number NaN not a number or The value input to s2 is out of the following range 21024 s2 2 1022 0 2 1022 s2 21024 E 1 7976931348623157 308 to E 2 2250738585072014 308 0 E2 2250738585072014...

Page 1940: ...rror occurs When MUX_E is used ENO outputs FALSE Input an INT data type value to n within the range of 0 to 27 provided that it is within the range of the number of pins in s Input a BOOL INT DINT WORD DWORD REAL LREAL STRING TIME structure or array data type value to s Ladder FBD LD 1 Structured text 1 Without EN ENO With EN ENO Without EN ENO d MUX n s1 s2 With EN ENO d MUX_E EN ENO n s1 s2 Argu...

Page 1941: ... the undefined value will not be used in operations Operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in each setting area specified by s1 to s28 in the device label memory 3405H The number of characters in the strings input to s1 to s28...

Page 1942: ...ENO s1 s2 d EQ_E EN ENO s1 s2 d LE_E EN ENO s1 s2 d LT_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 to s28 IN28 1 Input Input variable ANY_ELEMENTARY ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output TRUE FALSE Output variable BOOL GT _E Performs comparison of s1 s2 s2 s3 s n 1 s n If ...

Page 1943: ...de when strings consist of different characters The one having a longer length when strings are of different lengths Smaller string The one having a character with a smaller code when strings consist of different characters The one having a shorter length when strings are of different lengths Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not e...

Page 1944: ...om ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO 1 d NE s1 s2 With EN ENO d NE_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 s2 Input Input variable ANY_ELEMENTARY ENO O...

Page 1945: ...ere is no NULL code 00H in the setting area specified by s in the device label memory 3405H The number of characters in the string input to s exceeds 16383 3406H The entire string cannot be stored in the setting area specified by d in the device label memory The number of required points is insufficient ...

Page 1946: ... EN ENO Without EN ENO d LEN s With EN ENO d LEN_E EN ENO s Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANYSTRING_SINGLE ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable INT RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Safety Redundant Process s d EN ENO d...

Page 1947: ...he execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined va...

Page 1948: ...data Description type data type Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d LEFT s n d RIGHT s n With EN ENO d LEFT_E EN ENO s n d RIGHT_E EN ENO s n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANYSTRING_SINGLE n L Number of characters to be extracted Input variable INT ENO O...

Page 1949: ... Operation result 1 Function without EN ENO The operation processing is performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Execution condition Operation resu...

Page 1950: ...1948 32 STRING FUNCTIONS 32 2 Extracting String Data From the Left Right Operation error There is no operation error ...

Page 1951: ...ata type value to n2 within the range of 1 to 255 provided that it is within the number of characters in the string input to s Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d MID s n1 n2 With EN ENO d MID_E EN ENO s n1 n2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANYSTRING_SING...

Page 1952: ...ns Operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in the setting area specified by s in the device label memory 3405H The number of characters in the string input to s exceeds 16383 Out of range data is set to n1 or n2 The value input...

Page 1953: ...utput Input a STRING data type value to s1 and s2 to s28 within the range of 0 to 255 bytes Ladder FBD LD 1 Structured text 1 Without EN ENO With EN ENO Without EN ENO d CONCAT s1 s2 With EN ENO d CONCAT_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 to s28 IN28 Input Input variable ANYSTRING_SINGLE ENO Output s...

Page 1954: ...ted FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in each setting area specified by s1 to s28 in the device label memory There is no NULL code 00H in each setting area in the device label memory in the device specified by d and later 2821H The device numbers are overlapping between s1 to s28 and d 3405H The number of characters in the strings input to s1 to s28...

Page 1955: ...dder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d INSERT s1 s2 n With EN ENO d INSERT_E EN ENO s1 s2 n Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 s2 IN2 Input Input variable ANYSTRING_SINGLE n P Insertion target character start position Input variable INT ENO Output status TRUE Normal FALSE Abnormal O...

Page 1956: ...ecution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in each setting area specified by s1 to s28 in the device label memory There is no NULL code 00H in each setting area in the device label memory in the device specified by d and later 2821H The device numb...

Page 1957: ...ithin the range of 1 to 255 provided that it is within the number of characters in the string input to s Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DELETE s n1 n2 With EN ENO d DELETE_E EN ENO s n1 n2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Input Input variable ANYSTRING_SINGLE n1 L Number o...

Page 1958: ...Operation result output value FALSE not executed FALSE 1 Undefined value Error code SD0 Description 2820H There is no NULL code 00H in the label or device area between the specified device number and the last device number specified by s 3405H The number of characters in the string input to s exceeds 255 The value input to n1 is out of the range 0 to 255 The value input to n2 is out of the range 1...

Page 1959: ...REPLACE_E EN ENO s1 s2 n1 n2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 s2 IN2 Input Input variable ANYSTRING_SINGLE n1 L Number of characters to be replaced Input variable INT n2 P Replacement target character start position Input variable INT ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Outp...

Page 1960: ...aracters in the string input to s1 Operation result 1 Function without EN ENO The operation processing is performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations ...

Page 1961: ...number specified by s2 3405H The number of characters in the string input to s1 exceeds 255 The number of characters in the string input to s2 exceeds 255 The value input to n1 is out of the range 0 to 255 The value input to n2 is out of the range 1 to 255 The value input to n1 exceeds the number of characters in s2 The value input to n2 exceeds the number of characters in s1 3406H The entire stri...

Page 1962: ...value to s1 and s2 within the range of 0 to 255 bytes Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d FIND s1 s2 With EN ENO d FIND_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 s2 IN2 Input Input variable ANYSTRING_SINGLE ENO Output status TRUE Normal FALSE Abnormal Output variable BO...

Page 1963: ... execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined valu...

Page 1964: ...Without EN ENO With EN ENO Without EN ENO d ADD_TIME s1 s2 With EN ENO d ADD_TIME_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 s2 IN2 Input Input variable TIME ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable TIME RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Standard Sa...

Page 1965: ...A positive time value results because the most significant bit is 0 Operation result 1 Function without EN ENO The operation processing is performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined valu...

Page 1966: ... used ENO outputs TRUE Ex Overflow A negative time value results because the most significant bit is 1 Ex Underflow A positive time value results because the most significant bit is 0 Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d SUB_TIME s1 s2 With EN ENO d SUB_TIME_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not execut...

Page 1967: ...execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error There is no operation error Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE 1 Undefined value...

Page 1968: ...N ENO Without EN ENO d MUL_TIME s1 s2 With EN ENO d MUL_TIME_E EN ENO s1 s2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 IN1 Input Input variable TIME s2 IN2 Input Input variable ANY_NUM ENO Output status TRUE Normal FALSE Abnormal Output variable BOOL d Output Output variable TIME RnCPU RnENCPU RnSFCPU RnSFCPU RnPCPU RnPCPU Sta...

Page 1969: ...unction without EN ENO The operation processing is performed The operation result is output from d 2 Function with EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Operation error When s2 is of LREAL data type Execution...

Page 1970: ... EN ENO The execution conditions and operation results will be as follows 1 If the value FALSE is output from ENO the output data from d will be undefined Create a program so that the undefined value will not be used in operations Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO d DIV_TIME s1 s2 With EN ENO d DIV_TIME_E EN ENO s1 s2 Argument Description Type Data type EN Exe...

Page 1971: ...nput to s2 is 0 The value is divided by zero Error code SD0 Description 3402H The value input to s2 is out of the following range 21024 s2 2 1022 0 2 1022 s2 21024 E 1 7976931348623157 308 to E 2 2250738585072014 308 0 E2 2250738585072014 308 to E1 7976931348623157 308 3405H The data input to s2 is out of the range 2147483648 to 2147483647 ...

Page 1972: ...1970 33 TIME DATA TYPE FUNCTIONS 33 4 Division MEMO ...

Page 1973: ...1971 PART 6 PART 6 STANDARD FUNCTION BLOCKS This part consists of the following chapters 34 BISTABLE FUNCTION BLOCKS 35 EDGE DETECTION FUNCTION BLOCKS 36 COUNTER TIMER FUNCTION BLOCKS ...

Page 1974: ...ENO With EN ENO Without EN ENO Instance name S1 s1 R s2 Q1 d With EN ENO Instance name EN en ENO eno S1 s1 R s2 Q1 d Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 S1 Set command Input variable BOOL s2 R Reset command Input variable BOOL ENO Output status TRUE Normal FALSE Abnormal or operation stop Output variable BOOL d Q1 Outpu...

Page 1975: ...ration results will be as follows Timing chart Operation error There is no operation error 1 When s1 turns on d turns on 2 When s2 turns on while s1 is off d turns off Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE Previous output value 1 When s1 turns on while EN is on d turns on 2 When s2 turns on while EN is on and s1 is o...

Page 1976: ...ENO Without EN ENO Instance name S s1 R1 s2 Q1 d With EN ENO Instance name EN en ENO eno S s1 R1 s2 Q1 d Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 S Set command Input variable BOOL s2 R1 Reset command Input variable BOOL ENO Output status TRUE Normal FALSE Abnormal or operation stop Output variable BOOL d Q1 Output Output var...

Page 1977: ... and operation results will be as follows Timing chart Operation error There is no operation error 1 When s2 turns off while s1 is on d turns on 2 When s2 turns on d turns off Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE Previous output value 1 When s2 turns off while EN is on and s1 is on d turns on 2 When s2 turns on whil...

Page 1978: ... Without EN ENO With EN ENO Without EN ENO Instance name CLK s Q d With EN ENO Instance name EN en ENO eno CLK s Q d Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s CLK Rising edge detection input Input variable BOOL ENO Output status TRUE Normal FALSE Abnormal or operation stop Output variable BOOL d Q Output Output variable BOOL R...

Page 1979: ...ill be as follows Timing chart Operation error There is no operation error 1 d turns on at the rising edge of s 2 d turns off in the next scan Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE Previous output value 1 d turns on at the rising edge of s while EN is on 2 d turns off in the next scan 3 If EN is off d holds the outpu...

Page 1980: ...With EN ENO Without EN ENO Instance name CLK s Q d With EN ENO Instance name EN en ENO eno CLK s Q d Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s CLK Falling edge detection input Input variable BOOL ENO Output status TRUE Normal FALSE Abnormal or operation stop Output variable BOOL d Q Output Output variable BOOL RnCPU RnENCPU Rn...

Page 1981: ...chart Operation error There is no operation error 1 d turns on at the falling edge of s 2 d turns off in the next scan Execution condition Operation result EN ENO d TRUE executed TRUE Operation result output value FALSE not executed FALSE Previous output value 1 d turns on at the falling edge of s while EN is on 2 d turns off in the next scan 3 If EN is off d holds the output value of the last sca...

Page 1982: ...ing range of n is 0 to 32767 Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO Instance name CU s1 R s2 PV n Q d1 CV d2 With EN ENO Instance name EN en ENO eno CU s1 R s2 PV n Q d1 CV d2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 CU Count signal input Input variable BOOL s2 R Count value reset Input varia...

Page 1983: ...n the value in d2 is counted up 2 When s2 turns on the value in d2 is initialized Execution condition Operation result EN ENO d1 d2 TRUE executed TRUE Operation result output value FALSE not executed FALSE Previous output value 1 When s1 turns on while EN is on the value in d2 is counted up 2 When s2 turns on while EN is on the value in d2 is initialized OFF OFF ON OFF ON ON ON OFF ON OFF ON ON ON...

Page 1984: ...o 32767 Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO Instance name CD s1 LD s2 PV n Q d1 CV d2 With EN ENO Instance name EN en ENO eno CD s1 LD s2 PV n Q d1 CV d2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s1 CD Count signal input Input variable BOOL s2 LD Count value set Input variable BOOL n PV Start ...

Page 1985: ...nitialized 2 When s1 turns on the value in d2 is counted down Execution condition Operation result EN ENO d1 d2 TRUE executed TRUE Operation result output value FALSE not executed FALSE Previous output value 1 When s2 turns on while EN is on the value in d2 is initialized 2 When s1 turns on while EN is on the value in d2 is counted down OFF OFF ON OFF ON s1 OFF ON OFF ON OFF ON OFF ON OFF ON OFF 3...

Page 1986: ...cuted FALSE Not executed Input variable BOOL s1 CU Count signal input for counting up Input variable BOOL s2 CD Count signal input for counting down Input variable BOOL s3 R Count value reset Input variable BOOL s4 LD Count value set Input variable BOOL n PV Maximum count value or start count value Input variable INT ENO Output status TRUE Normal FALSE Abnormal or operation stop Output variable BO...

Page 1987: ... turns off and n is set to d3 3 Others When s1 and s2 change from off to on simultaneously the value in d3 is counted up by one with priority given to s1 When s3 and s4 turn on simultaneously d3 is set to 0 with priority given to s3 Operation result 1 Function block without EN ENO The operation processing is performed The operation result is output from d1 d2 and d3 Timing chart When n 3 1 When s1...

Page 1988: ...ot executed FALSE Previous output value 1 When s1 turns on while EN is on the value in d3 is counted up 2 When s3 turns on while EN is on the value in d3 is initialized 3 When s2 turns on while EN is on the value in d3 is counted down 4 When s4 turns on while EN is on the value in d3 is initialized OFF ON ON ON ON ON EN OFF OFF ON s1 OFF OFF ON OFF ON s2 OFF OFF ON s3 OFF OFF ON OFF ON s4 OFF ON 2...

Page 1989: ...ance name Coil s1 Preset s2 ValueIn s3 ValueOut d1 Status d2 Argument Description Type Data type s1 Coil Execution condition TRUE Executed FALSE Not executed Input variable BOOL s2 Preset Counter setting value Input variable INT s3 ValueIn Initial counter value Input variable INT d1 ValueOut Current counter value Output variable ANY16 d2 Status Output Output variable BOOL RnCPU RnENCPU RnSFCPU RnS...

Page 1990: ...ored in d1 The valid setting range of s2 is 0 to 32767 The valid setting range of s3 is 32768 to 32767 Note that if a negative value is specified 0 will be used as the initial value To reset the current value d1 reset s1 of FB directly Ex Label name COUNTER_FB_M_1 Ladder program ST program RST M0 COUNTER_FB_M_1 Coil Ladder example Timing chart Operation error There is no operation error M0 ENO d E...

Page 1991: ...kup mode MELSEC iQ R CPU Module User s Manual Application Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO Instance name IN s PT n Q d1 ET d2 With EN ENO Instance name EN en ENO eno IN s PT n Q d1 ET d2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Start of output Input variable BOOL n PT Output time sett...

Page 1992: ...turns off 3 When both s and d1 are off the value in d2 is initialized Execution condition Operation result EN ENO d1 d2 TRUE executed TRUE no operation error Operation result output value FALSE operation error Undefined value FALSE not executed FALSE Previous output value 1 When s turns on while EN is on d1 turns on When s turns on while EN is on d2 starts measuring time 2 While EN is on the time ...

Page 1993: ...36 COUNTER TIMER FUNCTION BLOCKS 36 5 Pulse Timer 1991 36 Operation error Error code SD0 Description 3401H The output time setting value exceeds the valid range ...

Page 1994: ...Ladder FBD LD Structured text Without EN ENO With EN ENO Without EN ENO Instance name IN s PT n Q d1 ET d2 With EN ENO Instance name EN en ENO eno IN s PT n Q d1 ET d2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Time measurement Input variable BOOL n PT Delay time setting value Input variable TIME ENO Output status TRUE Norma...

Page 1995: ...red in d2 reaches the time set in n d1 turns on 3 When both s and d1 turn off the value in d2 is initialized Execution condition Operation result EN ENO d1 d2 TRUE executed TRUE no operation error Operation result output value FALSE operation error Previous output value FALSE not executed FALSE Previous output value 1 When s turns on while EN is on d2 starts measuring time 2 When the time measured...

Page 1996: ...1994 36 COUNTER TIMER FUNCTION BLOCKS 36 6 On Delay Timer Operation error Error code SD0 Description 3401H The output time setting value exceeds the valid range ...

Page 1997: ... LD Structured text Without EN ENO With EN ENO Without EN ENO Instance name IN s PT n Q d1 ET d2 With EN ENO Instance name EN en ENO eno IN s PT n Q d1 ET d2 Argument Description Type Data type EN Execution condition TRUE Executed FALSE Not executed Input variable BOOL s IN Time measurement Input variable BOOL n PT Delay time setting value Input variable TIME ENO Output status TRUE Normal FALSE Ab...

Page 1998: ...e time set in n d1 turns on 3 When s turns on the value in d2 is initialized Execution condition Operation result EN ENO d TRUE executed TRUE no operation error Operation result output value FALSE operation error Previous output value FALSE not executed FALSE Previous output value 1 When s turns off while EN is on d2 starts measuring time 2 When s turns on while EN is on the value in d2 is initial...

Page 1999: ...range of s2 is 0 to 32767 The valid setting range of s3 is 32768 to 32767 Note that if a negative value is specified 0 will be used as the initial value RnPCPU redundant If these function blocks are used in a program executed in both systems there are restrictions on their operation when the systems are switched MELSEC iQ R CPU Module User s Manual Application Ladder FBD LD Structured text is to b...

Page 2000: ...ample Timing chart TIMER_HIGH_FB_M This is a high speed timer whose unit of measurement is 0 1 to 100ms When s1 turns on measurement of the current value starts The measurement starts from s3 0 1 to 100ms variable set in parameter When the value reaches s2 0 1 to 100ms d2 turns on The measured current value is output to d1 When s1 turns off the current value returns to the initial value s3 and s2 ...

Page 2001: ...ut to d1 When s1 turns off the current value returns to the initial value s3 and s2 also turns off The unit of measurement of the low speed timer is 100ms by default The unit can be changed in the range from 1 to 1000ms in increments of 1ms The valid setting range of s2 is 0 to 32767 The valid setting range of s3 is 32768 to 32767 Note that if a negative value is specified 0 will be used as the in...

Page 2002: ... on again the measurement resumes with the measured value that has been held The unit of measurement time limit for the retentive timers is common to both the low speed timer TIMER_LOW_FB_M and high speed timer TIMER_HIGH_FB_M The valid setting range of s2 is 0 to 32767 The valid setting range of s3 is 32768 to 32767 Note that if a negative value is specified 0 will be used as the initial value To...

Page 2003: ...P When executed 0 00294 LDF When executed 0 00294 ANDP When executed 0 00294 ANDF When executed 0 00294 ORP When executed 0 00294 ORF When executed 0 00294 LDPI When executed 0 00294 LDFI When executed 0 00294 ANDPI When executed 0 00294 ANDFI When executed 0 00294 ORPI When executed 0 00294 ORFI When executed 0 00294 ANB 0 00098 ORB 0 00098 MPS 0 00098 MRD 0 00098 MPP 0 00098 INV When not execute...

Page 2004: ...Manual Application END STOP NOP 0 00098 LD Continuity Non continuity 0 00588 LD Continuity Non continuity 0 00588 LD Continuity Non continuity 0 00588 LD Continuity Non continuity 0 00588 LD Continuity Non continuity 0 00588 LD Continuity Non continuity 0 00588 AND When not executed 0 00392 When executed continuity non continuity 0 00588 AND When not executed 0 00392 When executed continuity non c...

Page 2005: ...non continuity 0 00588 OR _U When not executed 0 00392 When executed continuity non continuity 0 00588 OR _U When not executed 0 00392 When executed continuity non continuity 0 00588 OR _U When not executed 0 00392 When executed continuity non continuity 0 00588 OR _U When not executed 0 00392 When executed continuity non continuity 0 00588 OR _U When not executed 0 00392 When executed continuity ...

Page 2006: ...inuity 0 00588 ANDD _U When not executed 0 00392 When executed continuity non continuity 0 00588 ANDD _U When not executed 0 00392 When executed continuity non continuity 0 00588 ANDD _U When not executed 0 00392 When executed continuity non continuity 0 00588 ANDD _U When not executed 0 00392 When executed continuity non continuity 0 00588 ANDD _U When not executed 0 00392 When executed continuit...

Page 2007: ... 600 9 900 n 96 17 000 25 400 DBKCMP n 1 3 700 10 400 n 96 17 000 23 500 DBKCMP n 1 3 700 10 000 n 96 17 400 23 700 DBKCMP n 1 3 600 10 100 n 96 17 400 24 100 DBKCMP n 1 3 800 10 100 n 96 17 100 23 600 DBKCMP n 1 3 700 9 900 n 96 17 300 23 800 DBKCMP n 1 3 600 10 200 n 96 17 100 22 900 DBKCMP _U n 1 3 700 10 200 n 96 17 000 23 600 DBKCMP _U n 1 3 700 10 000 n 96 17 400 23 600 DBKCMP _U n 1 3 700 1...

Page 2008: ... B s1 s2 d When executed 1 800 5 100 B s d When executed 1 300 3 800 B s1 s2 d When executed 1 900 5 000 DB s d When executed 2 000 6 200 DB s1 s2 d When executed 2 100 6 100 DB s d When executed 2 000 6 100 DB s1 s2 d When executed 2 100 5 900 B When executed 1 400 4 900 B When executed 1 500 4 800 DB When executed 2 400 8 000 DB When executed 2 200 7 900 BK n 1 3 500 8 100 n 96 17 200 21 500 BK ...

Page 2009: ...ed 0 00392 DXOR s1 s2 d When executed 0 00392 BKXOR n 1 3 300 8 300 n 96 17 500 22 400 WXNR s d When executed 0 00392 WXNR s1 s2 d When executed 0 00392 DXNR s d When executed 0 00392 DXNR s1 s2 d When executed 0 00392 BKXNR n 1 3 300 8 200 n 96 17 900 22 800 BSET n 1 0 00294 n 15 0 00294 BRST n 1 0 00294 n 15 0 00294 TEST When executed 0 0120 DTEST When executed 0 0190 BKRST n 1 0 900 2 000 n 96 ...

Page 2010: ... 400 3 400 s 32766 5 1 500 4 100 DBL2UINT s 0 1 300 3 600 s 65534 5 1 500 4 000 DBL2DINT s 0 1 400 3 400 s 1234567890 3 1 400 4 200 DBL2UDINT s 0 1 500 3 400 s 1234567890 3 1 500 4 100 INT2UINT When executed 0 00294 INT2DINT When executed 0 00294 INT2UDINT When executed 0 00294 UINT2INT When executed 0 00294 UINT2DINT When executed 0 00294 UINT2UDINT When executed 0 00294 DINT2INT When executed 0 ...

Page 2011: ...0 11 900 VAL_U 4 100 11 900 DVAL 4 900 13 100 DVAL_U 5 200 12 600 ASC2INT n 1 2 600 7 400 n 96 8 300 13 700 EMOD 3 000 8 200 NEG When executed 0 00490 DNEG When executed 0 00490 DECO n 2 2 400 5 900 n 8 2 400 6 300 ENCO n 2 M1 ON 2 500 6 400 n 2 M4 ON 2 500 6 400 n 8 M1 ON 3 500 7 800 n 8 M256 ON 2 400 6 200 SEG When executed 0 400 1 600 DIS n 1 2 200 4 200 n 4 2 200 4 300 UNI n 1 2 400 5 300 n 4 ...

Page 2012: ...WAP 1 200 2 200 MOVB 0 00196 BLKMOVB n 1 3 100 7 600 n 96 3 600 8 600 ROR n 1 0 00882 n 15 0 00882 RCR n 1 0 00882 n 15 0 00882 DROR n 1 0 00882 n 31 0 00882 DRCR n 1 0 00882 n 31 0 00882 ROL n 1 0 00882 n 15 0 00882 RCL n 1 0 00882 n 15 0 00882 DROL n 1 0 00882 n 31 0 00882 DRCL n 1 0 00882 n 31 0 00882 CJ 1 000 2 000 SCJ 1 000 2 000 JMP 1 000 2 100 GOEND 0 9000 DI 2 800 4 200 DI s 3 000 4 200 EI...

Page 2013: ...ber of data stored 96 7 400 11 500 S DEVLD 4 300 7 300 SP DEVST 20 200 24 800 SP FREAD 36 800 42 800 SP FWRITE 41 500 47 400 LEDR No self diagnostic error 2 100 5 200 Self diagnostic error continuation error annunciator ON 15 000 25 900 PALERT P 77 100 146 000 PABORT LD Continuity Non continuity 1 600 4 500 LD Continuity Non continuity 1 600 4 500 LD Continuity Non continuity 1 600 4 500 LD Contin...

Page 2014: ... 400 DBINDA_U s 1 2 700 6 100 s 4294967295 3 100 7 400 BINHA s 1 2 600 5 500 s FFFFH 2 600 5 600 DBINHA s 1 2 600 5 300 s FFFFFFFFH 2 600 5 700 STR 2 800 7 300 STR_U 2 900 7 300 DSTR 3 200 7 400 DSTR_U 3 300 7 900 BCDDA s 1 2 600 6 200 s 9999 2 700 6 300 DBCDDA s 1 2 600 6 400 s 99999999 2 700 6 700 ESTR 4 7000 17 1000 INT2ASC n 1 2 600 6 900 n 96 6 100 11 000 WS2SJIS Number of characters 1 3 300 ...

Page 2015: ...inuity non continuity 0 00588 ORE When not executed 0 00588 When executed continuity non continuity 0 00588 ORE When not executed 0 00588 When executed continuity non continuity 0 00588 ORE When not executed 0 00588 When executed continuity non continuity 0 00588 ORE When not executed 0 00588 When executed continuity non continuity 0 00588 ORE When not executed 0 00588 When executed continuity non...

Page 2016: ...nuity 1 900 4 500 ECMP 2 900 5 900 EDCMP 3 100 7 400 EZCP 3 300 6 600 EDZCP 3 700 8 600 E s d s 0 d 0 0 0098 s 2127 d 2127 0 0098 E s1 s2 d s1 0 s2 0 0 0098 s1 2127 s2 2127 0 0098 E s d s 0 d 0 0 0098 s 2127 d 2127 0 0098 E s1 s2 d s1 0 s2 0 0 0098 s1 2127 s2 2127 0 0098 ED s d s 0 d 0 1 600 5 800 s 21023 d 21023 2 000 7 000 ED s1 s2 d s1 0 s2 0 2 000 5 700 s1 21023 s2 21023 2 200 7 000 ED s d s 0...

Page 2017: ...0 00196 EDMOV 0 00196 SIN 1 400 4 300 COS 1 400 4 200 TAN 1 400 4 200 ASIN 1 400 4 500 ACOS 1 400 4 500 ATAN 1 400 3 400 SIND 2 400 12 700 COSD 2 300 12 700 TAND 2 800 13 900 ASIND 2 400 10 500 ACOSD 2 200 9 700 ATAND 2 000 9 200 BSIN 2 600 9 300 BCOS 2 600 8 900 BTAN 2 700 9 600 BASIN 2 400 7 300 BACOS 2 500 7 400 BATAN 2 400 7 400 RAD 1 400 2 700 DEG 1 400 2 900 RADD 1 600 7 300 DEGD 1 600 7 100...

Page 2018: ... 1 000 1 800 BAND 1 800 3 100 BAND_U 1 800 3 100 DBAND 1 900 3 000 DBAND_U 1 900 2 900 ZONE 1 800 3 000 ZONE_U 1 800 3 000 DZONE 1 900 2 900 DZONE_U 1 900 3 000 SCL SM755 ON point No 1 s1 point No 2 3 300 8 900 SM755 ON point No 9 s1 point No 10 3 300 8 900 SM755 OFF point No 1 s1 point No 2 3 100 8 700 SM755 OFF point No 9 s1 point No 10 3 700 8 900 SCL_U SM755 ON point No 1 s1 point No 2 3 200 8...

Page 2019: ... 800 1 600 UDCNT2 0 800 1 600 TTMR 2 000 5 900 STMR 2 700 8 100 ROTC 4 800 8 600 RAMPQ 3 400 8 200 SPD 0 700 1 600 PLSY 0 800 1 400 PWM 0 800 1 400 MTR 3 400 11 600 CCD SM772 OFF n 1 3 300 7 100 SM772 OFF n 96 11 700 15 500 SM772 ON n 1 3 300 7 100 SM772 ON n 96 11 700 15 500 SERDATA n 1 All match 2 700 6 700 n 1 All mismatch 2 700 6 600 n 96 All match 9 700 15 000 n 96 All mismatch 9 700 15 100 D...

Page 2020: ... n 1 s1 1 3 100 5 800 n 96 s1 16 11 100 15 800 WSUM n 1 0 900 1 800 n 96 4 700 5 600 WSUM_U n 1 0 900 1 800 n 96 4 700 5 600 DWSUM n 1 2 300 7 000 n 96 9 400 14 100 DWSUM_U n 1 2 400 7 800 n 96 9 500 14 900 MEAN n 1 1 900 4 900 n 96 5 100 8 800 MEAN_U n 1 1 900 4 800 n 96 4 700 8 700 DMEAN n 1 2 600 7 800 n 96 8 900 14 200 DMEAN_U n 1 2 200 7 500 n 96 8 300 13 400 SQRT 1 800 3 300 DSQRT 1 800 3 30...

Page 2021: ...controller CPU with firmware version earlier than 28 26 000 29 900 s3 2 for the programmable controller CPU with firmware version earlier than 28 27 400 31 200 s3 1 for the programmable controller CPU with firmware version 28 or later 24 800 30 900 s3 2 for the programmable controller CPU with firmware version 28 or later 26 600 32 500 DBIMPORT When executed for the programmable controller CPU wit...

Page 2022: ...nuity 4 800 15 000 When compared with the current date Non continuity 4 800 14 900 LDDT When compared with the specified date Continuity 2 700 9 800 When compared with the specified date Non continuity 2 800 9 800 When compared with the current date Continuity 5 000 14 500 When compared with the current date Non continuity 4 900 14 700 ANDDT When not executed 0 00588 When compared with the specifi...

Page 2023: ... When not executed 0 00588 When compared with the specified date Continuity 2 700 9 800 When compared with the specified date Non continuity 2 600 10 000 When compared with the current date Continuity 4 900 15 000 When compared with the current date Non continuity 4 900 15 000 ORDT When not executed 0 00588 When compared with the specified date Continuity 2 800 10 200 When compared with the specif...

Page 2024: ...0 9 400 When compared with the specified time Non continuity 2 600 9 500 When compared with the current time Continuity 4 800 14 700 When compared with the current time Non continuity 4 900 14 800 ANDTM When not executed 0 00588 When compared with the specified time Continuity 2 600 9 400 When compared with the specified time Non continuity 2 600 9 400 When compared with the current time Continuit...

Page 2025: ...CP 4 700 9 000 S DATERD 3 500 11 600 S DATE No carry 3 500 7 600 Carry 3 600 7 600 S DATE No borrow 3 600 8 000 Borrow 3 500 7 800 DUTY 2 400 6 600 TIMCHK 2 200 4 800 HOURM 2 900 6 200 DHOURM 2 900 6 200 RFS X n 1 5 500 15 500 n 64 13 000 33 800 RFS Y n 1 4 700 14 900 n 64 9 000 29 300 COM When only I O refresh is selected 6 500 19 700 When only CC Link IE Controller Network refresh is selected co...

Page 2026: ...100 2 700 Writing to buffer memory n 1000 45 000 65 500 Writing to host CPU buffer memory n 1 0 900 1 200 Writing to host CPU buffer memory n 320 11 200 26 600 DTO Writing to buffer memory n 1 2 400 4 000 Writing to buffer memory n 500 44 400 71 000 Writing to host CPU buffer memory n 1 1 000 2 600 Writing to host CPU buffer memory n 320 15 500 37 900 FROMD Reading buffer memory n 1 4 000 5 700 Re...

Page 2027: ...m amount of data 10238 bytes 155 000 180 000 UDP Minimum amount of data 1 byte 18 000 35 400 UDP Maximum amount of data 10238 bytes 155 000 180 000 SP SOCCINF 3 100 9 200 SP SOCCSET 3 300 14 500 SP SOCRMODE Switching from normal mode to fixed length mode 4 800 14 200 Switching from fixed length mode to normal mode 4 800 13 900 S SOCRDATA Minimum amount of data 1 word 4 200 10 100 Maximum amount of...

Page 2028: ...00 Number of write data points 8192 64 700 113 600 S IN The loop is running and the ALM bit does not turn on 32 400 33 800 S OUT1 The loop is running in AUT mode and the ALM bit does not turn on 27 500 27 900 S OUT2 The loop is running in AUT mode and the ALM bit does not turn on 25 700 26 600 S MOUT The loop is running in MAN mode 19 900 20 400 S DUTY Execution cycle 1 Control output cycle 10 The...

Page 2029: ...itial value 0 17 100 17 700 S D Input data 50 Derivative time 1 Output initial value 0 18 500 18 900 S DED Input data 50 Operation control signal 0 1 Data sampling interval 1 Sampling count 10 Output initial value 0 Initial output switching 0 10 200 10 900 S HS Number of inputs 5 Input data 50 100 150 200 250 13 300 13 700 S LS Number of inputs 5 Input data 50 100 150 200 250 13 000 13 200 S MID N...

Page 2030: ...21 300 S FLT Input data 50 Data sampling interval 1 Sampling count 10 20 800 21 500 S SUM Input data 50 Input low cut value 0 Initial value 0 Input range 1 17 500 18 000 S TPC When both temperature and pressure are corrected Differential pressure 100 Measured temperature 300 Measured pressure 10000 Design temperature 0 Bias temperature 273 15 Design pressure 0 Bias pressure 10332 0 19 300 19 800 S...

Page 2031: ... S Continuity Non continuity 2 800 5 000 ANI BL Continuity Non continuity 1 800 3 600 ORI S Continuity Non continuity 0 500 1 100 ORI BL S Continuity Non continuity 2 800 5 000 ORI BL Continuity Non continuity 1 800 3 600 MOV P K4S 2 600 6 200 MOV P BL K4S 3 800 9 200 DMOV P K8S 2 600 6 200 DMOV P BL K8S 3 800 9 200 BMOV P K4S n 1 4 200 14 100 n 96 4 900 15 100 BMOV P BL K4S n 1 5 600 17 600 n 96 ...

Page 2032: ...nation 0 023 0 023 Word Source 0 074 0 043 Destination 0 023 0 023 Double word Source 0 148 0 085 Destination 0 044 0 044 When the extended SRAM cassette is inserted Bit Source 0 099 0 099 Destination 0 028 0 028 Word Source 0 099 0 099 Destination 0 028 0 028 Double word Source 0 198 0 198 Destination 0 054 0 054 Module access device U G Bit Source 13 000 13 000 Destination 14 000 14 000 Word Sou...

Page 2033: ...rocessing are shown below Instruction name Number of basic steps Subset availability LD 1 LDI 1 AND 1 ANI 1 OR 1 ORI 1 LDP 2 LDF 2 ANDP 2 ANDF 2 ORP 2 ORF 2 LDPI 2 LDFI 2 ANDPI 2 ANDFI 2 ORPI 2 ORFI 2 ANB 1 ORB 1 MPS 1 MRD 1 MPP 1 INV 1 MEP 1 MEF 1 EGP 1 EGF 1 OUT 1 OUT T ST 4 OUT LT LST 2 OUT C 4 OUT LC 4 OUT F 2 OUTH T ST 4 SET 1 RST 1 SET F 3 RST F 3 PLS 2 PLF 2 FF 2 DELTA 2 DELTAP 3 SFT 2 SFTP...

Page 2034: ...3 AND 3 AND 3 AND 3 AND 3 OR 3 OR 3 OR 3 OR 3 OR 3 OR 3 LD _U 3 LD _U 3 LD _U 3 LD _U 3 LD _U 3 LD _U 3 AND _U 3 AND _U 3 AND _U 3 AND _U 3 AND _U 3 AND _U 3 OR _U 3 OR _U 3 OR _U 3 OR _U 3 OR _U 3 OR _U 3 LDD 3 LDD 3 LDD 3 LDD 3 LDD 3 LDD 3 ANDD 3 ANDD 3 ANDD 3 ANDD 3 ANDD 3 ANDD 3 ORD 3 Instruction name Number of basic steps Subset availability ...

Page 2035: ...NDD _U 3 ANDD _U 3 ANDD _U 3 ORD _U 3 ORD _U 3 ORD _U 3 ORD _U 3 ORD _U 3 ORD _U 3 CMP 4 CMPP 5 CMP_U 4 CMPP_U 5 DCMP 4 DCMPP 5 DCMP_U 4 DCMPP_U 5 ZCP 5 ZCPP 6 ZCP_U 5 ZCPP_U 6 DZCP 5 DZCPP 6 DZCP_U 5 DZCPP_U 6 BKCMP 5 BKCMP 5 BKCMP 5 BKCMP 5 BKCMP 5 BKCMP 5 BKCMP P 6 BKCMP P 6 BKCMP P 6 BKCMP P 6 BKCMP P 6 BKCMP P 6 BKCMP _U 5 BKCMP _U 5 Instruction name Number of basic steps Subset availability ...

Page 2036: ... 6 DBKCMP P 6 DBKCMP P 6 DBKCMP P 6 DBKCMP P 6 DBKCMP P 6 DBKCMP _U 5 DBKCMP _U 5 DBKCMP _U 5 DBKCMP _U 5 DBKCMP _U 5 DBKCMP _U 5 DBKCMP P_U 6 DBKCMP P_U 6 DBKCMP P_U 6 DBKCMP P_U 6 DBKCMP P_U 6 DBKCMP P_U 6 s d 3 P s d 4 s1 s2 d 3 P s1 s2 d 4 _U s d 3 P_U s d 4 _U s1 s2 d 3 P_U s1 s2 d 4 s d 3 P s d 4 s1 s2 d 3 P s1 s2 d 4 _U s d 3 P_U s d 4 _U s1 s2 d 3 P_U s1 s2 d 4 D s d 3 D P s d 4 D s1 s2 d ...

Page 2037: ..._U s d 4 D _U s1 s2 d 3 D P_U s1 s2 d 4 3 P 4 _U 3 P_U 4 3 P 4 _U 3 P_U 4 D 3 D P 4 D _U 3 D P_U 4 D 3 D P 4 D _U 3 D P_U 4 B s d 3 B P s d 4 B s1 s2 d 4 B P s1 s2 d 5 B s d 3 B P s d 4 B s1 s2 d 4 B P s1 s2 d 5 DB s d 3 DB P s d 4 DB s1 s2 d 4 DB P s1 s2 d 5 DB s d 3 DB P s d 4 DB s1 s2 d 4 DB P s1 s2 d 5 B 4 B P 5 B 4 B P 5 DB 4 DB P 5 DB 4 DB P 5 Instruction name Number of basic steps Subset av...

Page 2038: ...C_U 2 INCP_U 3 DEC 2 DECP 3 DEC_U 2 DECP_U 3 DINC 2 DINCP 3 DINC_U 2 DINCP_U 3 DDEC 2 DDECP 3 DDEC_U 2 DDECP_U 3 WAND s d 3 WANDP s d 4 WAND s1 s2 d 3 WANDP s1 s2 d 4 DAND s d 3 DANDP s d 4 DAND s1 s2 d 3 DANDP s1 s2 d 4 BKAND 5 BKANDP 6 WOR s d 3 WORP s d 4 WOR s1 s2 d 3 WORP s1 s2 d 4 DOR s d 3 DORP s d 4 DOR s1 s2 d 3 DORP s1 s2 d 4 BKOR 5 BKORP 6 WXOR s d 3 Instruction name Number of basic ste...

Page 2039: ...WXNR s1 s2 d 3 WXNRP s1 s2 d 4 DXNR s d 3 DXNRP s d 4 DXNR s1 s2 d 3 DXNRP s1 s2 d 4 BKXNR 5 BKXNRP 6 BSET 3 BSETP 4 BRST 3 BRSTP 4 TEST 4 TESTP 5 DTEST 5 DTESTP 6 BKRST 3 BKRSTP 4 SFR 4 SFRP 5 SFL 4 SFLP 5 BSFR 3 BSFRP 4 BSFL 3 BSFLP 4 DSFR 3 DSFRP 4 DSFL 3 DSFLP 4 SFTBR 4 SFTBRP 5 SFTBL 4 SFTBLP 5 SFTWR 4 SFTWRP 5 SFTWL 4 SFTWLP 5 BCD 2 BCDP 3 DBCD 2 DBCDP 3 Instruction name Number of basic step...

Page 2040: ...DINTP 4 DBL2UDINT 3 DBL2UDINTP 4 INT2UINT 3 INT2UINTP 4 INT2DINT 3 INT2DINTP 4 INT2UDINT 3 INT2UDINTP 4 UINT2INT 3 UINT2INTP 4 UINT2DINT 3 UINT2DINTP 4 UINT2UDINT 3 UINT2UDINTP 4 DINT2INT 2 DINT2INTP 3 DINT2UINT 3 DINT2UINTP 4 DINT2UDINT 3 DINT2UDINTP 4 UDINT2INT 3 UDINT2INTP 4 UDINT2UINT 3 UDINT2UINTP 4 UDINT2DINT 3 UDINT2DINTP 4 GRY 2 GRYP 3 GRY_U 2 GRYP_U 3 DGRY 2 DGRYP 3 DGRY_U 2 DGRYP_U 3 GBI...

Page 2041: ...NP 4 DABIN_U 3 DABINP_U 4 DDABIN 3 DDABINP 4 DDABIN_U 3 DDABINP_U 4 HABIN 3 HABINP 4 DHABIN 3 DHABINP 4 DABCD 3 DABCDP 4 DDABCD 3 DDABCDP 4 VAL 4 VALP 5 VAL_U 4 VALP_U 5 DVAL 4 DVALP 5 DVAL_U 4 DVALP_U 5 ASC2INT 4 ASC2INTP 5 EMOD 4 EMODP 5 NEG 2 NEGP 3 DNEG 2 DNEGP 3 DECO 4 DECOP 5 ENCO 4 ENCOP 5 SEG 3 SEGP 4 DIS 4 DISP 5 UNI 4 UNIP 5 Instruction name Number of basic steps Subset availability ...

Page 2042: ...L 2 CMLP 3 DCML 2 DCMLP 3 SMOV 6 SMOVP 7 CMLB 3 CMLBP 4 BMOV 4 BMOVP 5 BMOVL 4 BMOVLP 5 FMOV 4 FMOVP 5 FMOVL 4 FMOVLP 5 DFMOV 4 DFMOVP 5 DFMOVL 4 DFMOVLP 5 XCH 3 XCHP 4 DXCH 3 DXCHP 4 BXCH 4 BXCHP 5 SWAP 2 SWAPP 3 DSWAP 3 DSWAPP 4 MOVB 2 MOVBP 3 BLKMOVB 4 BLKMOVBP 5 ROR 4 RORP 5 RCR 4 RCRP 5 DROR 4 DRORP 5 DRCR 4 Instruction name Number of basic steps Subset availability ...

Page 2043: ... s1 s2 s3 6 CALL P s1 s2 s3 s4 7 CALL P s1 s2 s3 s4 s5 8 CALLP P 4 CALLP P s1 5 CALLP P s1 s2 6 CALLP P s1 s2 s3 7 CALLP P s1 s2 s3 s4 8 CALLP P s1 s2 s3 s4 s5 9 RET 1 FCALL P 3 FCALL P s1 4 FCALL P s1 s2 5 FCALL P s1 s2 s3 6 FCALL P s1 s2 s3 s4 7 FCALL P s1 s2 s3 s4 s5 8 FCALLP P 4 FCALLP P s1 5 FCALLP P s1 s2 6 FCALLP P s1 s2 s3 7 FCALLP P s1 s2 s3 s4 8 FCALLP P s1 s2 s3 s4 s5 9 ECALL file name ...

Page 2044: ...FCALL file name P 4 Number of characters in the file name EFCALL file name P s1 5 Number of characters in the file name EFCALL file name P s1 s2 6 Number of characters in the file name EFCALL file name P s1 s2 s3 7 Number of characters in the file name EFCALL file name P s1 s2 s3 s4 8 Number of characters in the file name EFCALL file name P s1 s2 s3 s4 s5 9 Number of characters in the file name EF...

Page 2045: ...PALERTP 3 PABORT 2 LD 3 LD 3 LD 3 LD 3 LD 3 LD 3 AND 3 AND 3 AND 3 AND 3 AND 3 AND 3 OR 3 OR 3 OR 3 OR 3 OR 3 OR 3 s d 3 P s d 4 s1 s2 d 4 P s1 s2 d 5 MOV 3 MOVP 4 MOV_WS 3 MOVP_WS 4 BINDA 3 BINDAP 4 BINDA_U 3 BINDAP_U 4 DBINDA 3 DBINDAP 4 DBINDA_U 3 DBINDAP_U 4 BINHA 3 BINHAP 4 DBINHA 3 DBINHAP 4 STR 4 STRP 5 STR_U 4 Instruction name Number of basic steps Subset availability ...

Page 2046: ...C 4 INT2ASCP 5 WS2SJIS 3 WS2SJISP 4 SJIS2WS 3 SJIS2WSP 4 SJIS2WSB 3 SJIS2WSBP 4 LEN 3 LENP 4 RIGHT 4 RIGHTP 5 LEFT 4 LEFTP 5 MIDR 4 MIDRP 5 MIDW 4 MIDWP 5 INSTR 5 INSTRP 6 STRINS 4 STRINSP 5 STRDEL 4 STRDELP 5 LDE 3 LDE 3 LDE 3 LDE 3 LDE 3 LDE 3 ANDE 3 ANDE 3 ANDE 3 ANDE 3 ANDE 3 ANDE 3 ORE 3 ORE 3 ORE 3 ORE 3 ORE 3 ORE 3 Instruction name Number of basic steps Subset availability ...

Page 2047: ... 3 ORED 3 ORED 3 ECMP 4 ECMPP 5 EDCMP 4 EDCMPP 5 EZCP 5 EZCPP 6 EDZCP 5 EDZCPP 6 E s d 3 E P s d 4 E s1 s2 d 3 E P s1 s2 d 4 E s d 3 E P s d 4 E s1 s2 d 3 E P s1 s2 d 4 ED s d 3 ED P s d 4 ED s1 s2 d 4 ED P s1 s2 d 5 ED s d 3 ED P s d 4 ED s1 s2 d 4 ED P s1 s2 d 5 E 3 E P 4 E 3 E P 4 ED 4 ED P 5 ED 4 ED P 5 INT2FLT 2 INT2FLTP 3 UINT2FLT 2 Instruction name Number of basic steps Subset availability ...

Page 2048: ...4 DINT2DBL 3 DINT2DBLP 4 UDINT2DBL 3 UDINT2DBLP 4 FLT2DBL 3 FLT2DBLP 4 EVAL 3 EVALP 4 EREXP 4 EREXPP 5 ENEG 2 ENEGP 3 EDNEG 2 EDNEGP 3 EMOV 2 EMOVP 3 EDMOV 2 EDMOVP 3 SIN 3 SINP 4 COS 3 COSP 4 TAN 3 TANP 4 ASIN 3 ASINP 4 ACOS 3 ACOSP 4 ATAN 3 ATANP 4 SIND 3 SINDP 4 COSD 3 COSDP 4 TAND 3 TANDP 4 ASIND 3 ASINDP 4 ACOSD 3 ACOSDP 4 ATAND 3 ATANDP 4 Instruction name Number of basic steps Subset availab...

Page 2049: ...4 RAD 3 RADP 4 DEG 3 DEGP 4 RADD 3 RADDP 4 DEGD 3 DEGDP 4 ESQRT 3 ESQRTP 4 EDSQRT 3 EDSQRTP 4 EXP 3 EXPP 4 EXPD 3 EXPDP 4 LOG 3 LOGP 4 LOGD 3 LOGDP 4 BSQRT 3 BSQRTP 4 BDSQRT 3 BDSQRTP 4 POW 4 POWP 5 POWD 4 POWDP 5 LOG10 3 LOG10P 4 LOG10D 3 LOG10DP 4 EMAX 4 EMAXP 5 EDMAX 4 EDMAXP 5 EMIN 4 EMINP 5 EDMIN 4 EDMINP 5 RND 2 Instruction name Number of basic steps Subset availability ...

Page 2050: ..._U 5 LIMITP_U 6 DLIMIT 5 DLIMITP 6 DLIMIT_U 5 DLIMITP_U 6 BAND 5 BANDP 6 BAND_U 5 BANDP_U 6 DBAND 5 DBANDP 6 DBAND_U 5 DBANDP_U 6 ZONE 5 ZONEP 6 ZONE_U 5 ZONEP_U 6 DZONE 5 DZONEP 6 DZONE_U 5 DZONEP_U 6 SCL 4 SCLP 5 SCL_U 4 SCLP_U 5 DSCL 4 DSCLP 5 DSCL_U 4 DSCLP_U 5 SCL2 4 SCL2P 5 SCL2_U 4 SCL2P_U 5 DSCL2 4 DSCL2P 5 DSCL2_U 4 DSCL2P_U 5 UDCNT1 5 UDCNT2 5 Instruction name Number of basic steps Subse...

Page 2051: ...RDATAP 6 SERMM 6 SERMMP 7 DSERMM 6 DSERMMP 7 SUM 3 SUMP 4 DSUM 3 DSUMP 4 BON 5 BONP 6 DBON 5 DBONP 6 MAX 4 MAXP 5 MAX_U 4 MAXP_U 5 DMAX 4 DMAXP 5 DMAX_U 4 DMAXP_U 5 MIN 4 MINP 5 MIN_U 4 MINP_U 5 DMIN 4 DMINP 5 DMIN_U 4 DMINP_U 5 SORTD 7 SORTD_U 7 DSORTD 7 DSORTD_U 7 WSUM 4 WSUMP 5 WSUM_U 4 WSUMP_U 5 DWSUM 4 DWSUMP 5 DWSUM_U 4 Instruction name Number of basic steps Subset availability ...

Page 2052: ...T 7 DBINSERTP 8 DBUPDATE 8 DBUPDATEP 9 DBSELECT 8 DBSELECTP 9 DBDELETE 6 DBDELETEP 7 DBIMPORT 4 DBIMPORTP 5 DBEXPORT 4 DBEXPORTP 5 DBTRANS 4 DBTRANSP 5 DBCOMMIT 4 DBCOMMITP 5 DBROLBAK 4 DBROLBAKP 5 RSET 2 RSETP 3 QDRSET 2 Number of characters in the file name QDRSETP 3 Number of characters in the file name ZRRDB 3 ZRRDBP 4 ZRWRB 3 ZRWRBP 4 ADRSET 3 ADRSETP 4 DATERD 2 DATERDP 3 DATEWR 2 DATEWRP 3 I...

Page 2053: ... LDDT 4 LDDT 4 LDDT 4 ANDDT 4 ANDDT 4 ANDDT 4 ANDDT 4 ANDDT 4 ANDDT 4 ORDT 4 ORDT 4 ORDT 4 ORDT 4 ORDT 4 ORDT 4 LDTM 4 LDTM 4 LDTM 4 LDTM 4 LDTM 4 LDTM 4 ANDTM 4 ANDTM 4 ANDTM 4 ANDTM 4 ANDTM 4 ANDTM 4 ORTM 4 ORTM 4 ORTM 4 ORTM 4 ORTM 4 ORTM 4 TCMP 6 TCMPP 7 TZCP 5 TZCPP 6 S DATERD 2 SP DATERD 3 S DATE 4 SP DATE 5 S DATE 4 Instruction name Number of basic steps Subset availability ...

Page 2054: ...6 DFROMD 5 DFROMDP 6 TOD 5 TODP 6 DTOD 5 DTODP 6 TYPERD 3 TYPERDP 4 UNIINFRD 4 UNIINFRDP 5 S RTREAD 3 SP RTREAD 4 S RTWRITE 3 SP RTWRITE 4 LOGTRG 3 LOGTRGR 3 SP SOCOPEN 5 SP SOCCLOSE 6 SP SOCRCV 7 S SOCRCVS 4 SP SOCSND 7 SP SOCCINF 6 SP SOCCSET 5 SP SOCRMODE 5 S SOCRDATA 6 SP SOCRDATA 7 SP ECPRTCL 7 SP SLMPSND 6 SP FTPPUT 7 SP FTPGET 7 PSTOP 2 Number of characters in the file name Instruction name...

Page 2055: ... file name PID 5 S PIDINIT 2 SP PIDINIT 3 S PIDCONT 2 SP PIDCONT 3 S PIDSTOP 2 SP PIDSTOP 3 S PIDRUN 2 SP PIDRUN 3 S PIDPRMW 3 SP PIDPRMW 4 PIDINIT 2 PIDINITP 3 PIDCONT 2 PIDCONTP 3 PIDSTOP 2 PIDSTOPP 3 PIDRUN 2 PIDRUNP 3 PIDPRMW 3 PIDPRMWP 4 D DDRD 9 DP DDRD 10 D DDWR 9 DP DDWR 10 M DDRD 9 MP DDRD 10 M DDWR 9 MP DDWR 10 S IN 5 S OUT1 5 S OUT2 5 S MOUT 5 S DUTY 5 S BC 5 S PSUM 5 S PID 6 S 2PID 6 S...

Page 2056: ...NF3 6 S DBND 5 S PGS 5 S SEL 6 S BUMP 5 S AMR 5 S FG 5 S IFG 5 S FLT 5 S SUM 5 S TPC 5 S ENG 5 S IENG 5 S ADD 5 S SUB 5 S MUL 5 S DIV 5 S SQR 5 S ABS 5 S 5 S 5 S 5 S 5 S 5 S AT1 6 LD S 2 LD BL S 3 LDI S 2 LDI BL S 3 AND S 2 AND BL S 3 ANI S 2 ANI BL S 3 OR S 2 OR BL S 3 ORI S 2 ORI BL S 3 LD BL 2 LDI BL 2 AND BL 2 ANI BL 2 Instruction name Number of basic steps Subset availability ...

Page 2057: ...BL K4S 4 MOVP K4S 4 MOVP BL K4S 5 DMOV K8S 3 DMOV BL K8S 4 DMOVP K8S 4 DMOVP BL K8S 5 BMOV K4S 4 BMOV BL K4S 5 BMOVP K4S 5 BMOVP BL K4S 6 SET BL 2 RST BL 2 PAUSE BL 2 RSTART BL 2 SET S 2 SET BL S 3 RST S 2 RST BL S 3 BRSET 2 SP CONTSW 4 DCONTSW 1 ECONTSW 1 Instruction name Number of basic steps Subset availability ...

Page 2058: ...lower limit LLV according to the deviation is performed Operation characteristics reverse action example After the end of tuning cycle the output lower limit LLV is retained for the manipulated value MV during W and a transition to the normal PID control occurs W can be determined by 50 KW 100 on and the wait setting parameter KW can be set in parameter s3 28 Setting range KW 50 to 32717 If an abn...

Page 2059: ...um ramp R dead time L that can be determined from input changes by providing the control system with stepwise output of 0 100 1 1 Stepwise output can also be determined by 0 75 or 0 50 Operation characteristics Operation characteristics and three constants MV Manipulated value L Dead time R Maximum ramp t Time Control method Proportional gain KP Integral time TI 100ms Derivative time TD 10ms Propo...

Page 2060: ...ue s1 500 50 500 50 Control data Sampling time TS s3 3000ms 500ms Input filter s3 2 70 70 Derivative gain KD s3 5 0 0 Output upper limit value s3 22 2000 2 seconds 2000 2 seconds Output lower limit value s3 23 0 0 Action setting ACT Input variation alarm Bit 1 of s3 1 Disabled Disabled Output variation alarm Bit 2 of s3 1 Disabled Disabled Output upper lower limit value setting Bit 5 of s3 1 Enabl...

Page 2061: ...ut lower limit value ON for 0 seconds 88 Start auto tuning 104 Turn on the auto tuning action status flag Set the sampling time for auto tuning TS 3 seconds Turn on the auto tuning execution bit in action setting ACT parameter Set the output value for auto tuning ON for 1 8 seconds 191 Set the sampling time TS for normal PID action 500ms 224 Input the process value PV to the input output data area...

Page 2062: ...xamples 274 Execute the PID instruction PID action is in progress 300 Check the auto tuning operation End the auto tuning processing Shift to the normal PID action 348 Heater output Write the manipulated value MV to D A converter module 381 Error ...

Page 2063: ... TS 3 seconds Turn on the auto tuning execution bit in action setting ACT parameter Set the input filter constant Set the derivative gain KD 0 Set the output upper limit value ON for 2 seconds Set the output lower limit value ON for 0 seconds Start auto tuning 180 Perform PID action 191 Input the process value PV to the input output data area from the A D converter module 225 Initialize the PID ac...

Page 2064: ...ation Program Examples 240 Execute the PID instruction Check the auto tuning operation End the auto tuning processing Shift to the normal PID action 303 Heater output Write the manipulated value MV to D A converter module 336 Error ...

Page 2065: ...e program conditions are as follows Item Inexact differential Exact differential Number of loops that performs PID operation 2 Sampling period 1 second Device where PID control data are set Common data D500 D501 Loop 1 data D502 to D515 D502 to D511 Loop 2 data D516 to D529 D512 to D521 Device where I O data are set Common data D600 to D609 Loop 1 data D610 to D632 D610 to D627 Loop 2 data D633 to...

Page 2066: ...2064 APPX Appendix 5 PID Control Program Examples Program example inexact differential 0 Set PID control data common to all loops Set PID control data for loop 1 ...

Page 2067: ...APPX Appendix 5 PID Control Program Examples 2065 A 252 Set PID control data for loop 2 ...

Page 2068: ...5 PID Control Program Examples 462 Set the PID control data that are set in D500 to D529 465 to 476 Enable output of the R60DA4 480 Set I O control data common to all loops Set I O data for loop 1 Set I O data for loop 2 ...

Page 2069: ...APPX Appendix 5 PID Control Program Examples 2067 A Program example exact differential 0 Set PID control data common to all loops Set PID control data for loop 1 ...

Page 2070: ...2068 APPX Appendix 5 PID Control Program Examples 214 Set PID control data for loop 2 386 Set the PID control data that are set in D500 to D521 389 to 400 Enable output of the R60DA4 ...

Page 2071: ...APPX Appendix 5 PID Control Program Examples 2069 A 404 Set I O control data common to all loops Set I O data for loop 1 Set I O data for loop 2 ...

Page 2072: ...value SV every second The remainder is subtracted in the first subtraction Item Inexact differential Exact differential Number of loops that performs PID operation 1 Sampling period 1 second Device where PID control data are set Common data D500 D501 Loop 1 data D502 to D515 D502 to D511 Device where I O data are set Common data D600 to D609 Loop 1 data D610 to D630 D610 to D627 Set value SV set b...

Page 2073: ...l Program Examples 2071 A Program example inexact differential 0 Set PID control data common to all loops Set PID control data for loop 1 252 Set the PID control data that are set in D500 to D515 255 Enable output of the R60DA4 ...

Page 2074: ...sed to switch manual mode to automatic mode 398 Externally set the manipulated value MV 439 to 448 Perform the mode switch processing considering a delay in switching time The mode switches to the automatic mode by turning on the automatic manual switch command and performing PID operation ...

Page 2075: ...perational expression in D215 and the remainder in D216 SVm SV in manual mode SVa SV in automatic mode 469 to 492 Rewrite the set value SV to the value used in automatic mode The remainder is subtracted from the set value SV in the first subtraction 532 End the mode switch processing 10 SVm SVa ...

Page 2076: ...rol Program Examples Program example exact differential 0 to 214 Set PID control data common to all loops Set PID control data for loop 1 217 to 232 Set the PID control data that are set in D500 to D511 Enable output of the R60DA4 ...

Page 2077: ...used to switch manual mode to automatic mode 360 Externally set the manipulated value MV 401 to 410 Perform the mode switch processing considering a delay in switching time The mode switches to the automatic mode by turning on the automatic manual switch command and performing PID operation ...

Page 2078: ...erational expression in D215 and the remainder in D216 SVm SV in manual mode SVa SV in automatic mode 431 to 454 Rewrite the set value SV to the value used in automatic mode The remainder is subtracted from the set value SV in the first subtraction 494 End the mode switch processing 10 SVm SVa ...

Page 2079: ...0 enters the auto mode AUTO and performs PID control 0 Set the control mode to AUTO Set the alarm detection ALM to 0 7 Jump to the P0 label when SM402 is on 11 Set the last value hold processing 13 Reset the last value hold processing 15 Set the output value hold processing 17 Reset the output value hold processing 19 Adjust to the time set for the execution cycle 27 Jump to the P1 label when M0 i...

Page 2080: ...n to R20 of S PHPL Set each start device of the S PHPL instruction Transfer the R120 value of the S PHPL instruction to R40 of S PID Set the start device of the S PID instruction Transfer the R140 value of the S PID instruction to R60 of S OUT1 Set each start device of the S OUT1 instruction Convert the single precision real number in R160 and R161 to binary 70 The subroutine program ends 71 The m...

Page 2081: ...pendix 6 Process Control Program Examples 2079 A 73 Adjust the execution cycle to 0 1s Clear the output values in S IN S PHPL S PID and S OUT1 to 0 Clear the loop tag to 0 Set the default value of the loop tag ...

Page 2082: ...2080 APPX Appendix 6 Process Control Program Examples 129 Set the default value of the loop tag ...

Page 2083: ...trol Program Examples 2081 A 178 Set the operation constant of the S IN instruction 203 Set the operation constant of the S PID instruction 216 Set the operation constant of the S OUT1 instruction 223 The subroutine program ends ...

Page 2084: ... S SPI RH Engineering value upper limit 999999 to 999999 Single precision real number User User 24 25 S PHPL S PID S 2PID S SPI RL Engineering value lower limit 999999 to 999999 Single precision real number User User 26 27 S PHPL PH Upper limit alarm value RL to RH PL PH Single precision real number User User 28 29 S PHPL PL Lower limit alarm value RL to RH PL PH Single precision real number User ...

Page 2085: ...ing cycle 0 to 999999 s Single precision real number User Set D User Set STHT 58 59 S PID S 2PID S SPI GW Gap width 0 to 100 Single precision real number User User 60 61 S PID S 2PID S SPI GG Gap gain 0 to 999999 Single precision real number User User 62 63 S PID S 2PID S SPI S OUT1 S DUTY MVP MV internal operation value 999999 to 999999 Single precision real number System System 64 65 S 2PID Two ...

Page 2086: ...Single precision real number User User 28 29 S PHPL PL Lower limit alarm value RL to RH PL PH Single precision real number User User 30 31 S PHPL HH Upper upper limit alarm value RL to RH PH HH Single precision real number User User 32 33 S PHPL LL Lower lower limit alarm value RL to RH LL PL Single precision real number User User 38 39 S IN Filter coefficient 0 to 1 Single precision real number U...

Page 2087: ...ruction pairs S IPD instruction and S OUT1 instruction S BPI instruction and S OUT1 instruction use the same value in I 62 63 S IPD S OUT1 MVP MV internal operation value 999999 to 999999 Single precision real number System Offset Instruction used Item Name Recommended range Data type Set by SIPD SBPI ...

Page 2088: ...99999 to 999999 Single precision real number User 24 25 S PHPL RL Engineering value lower limit 999999 to 999999 Single precision real number User 26 27 S PHPL PH Upper limit alarm value RL to RH PL PH Single precision real number User 28 29 S PHPL PL Lower limit alarm value RL to RH PL PH Single precision real number User 30 31 S PHPL HH Upper upper limit alarm value RL to RH PH HH Single precisi...

Page 2089: ...r User User 26 27 S PHPL PH Upper limit alarm value RL to RH PL PH Single precision real number User User 28 29 S PHPL PL Lower limit alarm value RL to RH PL PH Single precision real number User User 30 31 S PHPL HH Upper upper limit alarm value RL to RH PH HH Single precision real number User User 32 33 S PHPL LL Lower lower limit alarm value RL to RH LL PL Single precision real number User User ...

Page 2090: ...ber User User 20 21 S ONF3 HS1 Hysteresis 0 to 999999 Single precision real number User 22 23 S PHPL RH Engineering value upper limit 999999 to 999999 Single precision real number User User 24 25 S PHPL RL Engineering value lower limit 999999 to 999999 Single precision real number User User 26 27 S PHPL PH Upper limit alarm value RL to RH PL PH Single precision real number User User 28 29 S PHPL P...

Page 2091: ...y User system 10 11 S PSUM SUM1 Integrated value integral part 0 to 2147483647 32 bit unsigned binary System 12 13 S PSUM SUM2 Integrated value decimal part 0 to 2147483647 32 bit unsigned binary System 14 15 S BC SV1 Set value 1 0 to 2147483647 32 bit unsigned binary User 16 17 S BC SV2 Set value 2 0 to 2147483647 32 bit unsigned binary User 26 27 S BC PH Upper limit alarm value 0 to 2147483647 3...

Page 2092: ...cision real number User 26 27 S PHPL PH Upper limit alarm value RL to RH PL PH Single precision real number User 28 29 S PHPL PL Lower limit alarm value RL to RH PL PH Single precision real number User 30 31 S PHPL HH Upper upper limit alarm value RL to RH PH HH Single precision real number User 32 33 S PHPL LL Lower lower limit alarm value RL to RH LL PL Single precision real number User 38 39 S ...

Page 2093: ...APPX Appendix 7 List of Loop Tag Memory Areas Used by Process Control Instructions 2091 A MEMO ...

Page 2094: ... O Operand 24 P PID control instruction 1149 Positioning instruction 1765 Process control instructions 1181 Process CPU 25 Programmable controller CPU 25 R Real number data floating point data 48 Redundant system 25 Redundant system instruction 1440 Request message 25 Response message 25 RnCPU 25 RnENCPU 25 RnENCPU network part 25 RnPCPU 25 S Safety communications 25 Safety control 25 Safety CPU 2...

Page 2095: ...T 1013 ANDDT_LE 1013 ANDDT_LT 1013 ANDDT_NE 1013 ANDE 704 ANDE 704 ANDE 704 ANDE 704 ANDE 704 ANDE 704 ANDED 706 ANDED 706 ANDED 706 ANDED 706 ANDED 706 ANDED 706 ANDED_EQ 706 ANDED_GE 706 ANDED_GT 706 ANDED_LE 706 ANDED_LT 706 ANDED_NE 706 ANDE_EQ 704 ANDE_GE 704 ANDE_GT 704 ANDE_LE 704 ANDE_LT 704 ANDE_NE 704 AND_EQ _U 218 ANDF 162 ANDFI 165 AND_GE _U 218 AND_GT _U 218 AND_LE _U 218 AND_LT _U 21...

Page 2096: ...WORD _E 1792 BPLUS P 260 BREAK P 557 BRSET 1437 BRST P 342 BSET P 340 BSFL P 356 BSFR P 354 BSIN P 795 BSQRT P 827 BTAN P 799 BTOW P 488 BXCH P 519 C CALL P 559 CCD P 903 CJ 537 CML P 494 CMLB P 501 CMP P _U 222 COM P 1041 CONCAT _E 1951 COS _E 1901 COS P 773 COSD P 785 COUNTER_FB_M 1987 CPY_BITARR _E 1885 CPY_BIT_OF_INT _E 1890 CRC P 944 CTD _E 1982 CTU _E 1980 CTUD _E 1984 D D P DDRD 1405 D P DD...

Page 2097: ...TO_REAL _E 1833 DINT_TO_STRING _E 1836 DINT_TO_TIME _E 1835 DINT_TO_WORD _E 1827 DIS P 478 DIV _E 1912 DIVISION P _U 253 DIV_TIME _E 1968 DLIMIT P _U 859 DMAX P _U 924 DMEAN P _U 940 DMIN P _U 928 DMINUS P _U 249 DMOV P 492 1419 DMULTI P _U 255 DNEG P 469 DOR P 314 316 DPLUS P _U 245 DRCL P 535 DRCR P 533 DROL P 535 DROR P 533 DSCL P _U 872 DSCL2 P _U 877 DSERDATA P 908 DSERMM P 912 DSFL P 360 DSF...

Page 2098: ...SG 1667 G P REQ 1511 1518 G P RIFR 1657 G P RIRCV 1651 G P RIRD 1525 1643 G P RISEND 1654 G P RITO 1659 G P RIWT 1530 1647 G P RLPASET 1661 G P RRUN 1576 G P RSTOP 1581 G P RTMRD 1586 G P RTMWR 1591 G P SINFSTRD 1624 G P SINFTYRD 1620 G P SLMPREQ 1638 G P SPBUSY 1694 G P UINI 1562 1597 1635 G P _BIDIN 1691 G P _BIDOUT 1688 G P _CCPASET 1629 G P _CEXECUTE 1787 G P _CPRTCL 1677 G P _GETE 1717 G P _O...

Page 2099: ..._U 426 G_SOCRCVS 1550 GT _E 1940 H HABIN P 445 HOURM 1035 I IMASK 549 INC P _U 292 INSERT _E 1953 INSTR P 698 INT2ASC P 679 INT2DBL P 751 INT2DINT P 404 INT2FLT P 741 INT2UDINT P 406 INT2UINT P 402 INT_TO_BCD _E 1819 INT_TO_BITARR _E 1883 INT_TO_BOOL _E 1814 INT_TO_DINT _E 1818 INT_TO_DWORD _E 1816 INT_TO_LREAL _E 1822 INT_TO_REAL _E 1821 INT_TO_STRING _E 1824 INT_TO_TIME _E 1823 INT_TO_WORD _E 18...

Page 2100: ...T 706 LDED_NE 706 LDE_EQ 704 LDE_GE 704 LDE_GT 704 LDE_LE 704 LDE_LT 704 LDE_NE 704 LD_EQ _U 218 LDF 162 LDFI 165 LD_GE _U 218 LD_GT _U 218 LDI 160 1411 1414 LD_LE _U 218 LD_LT _U 218 LD_NE _U 218 LDP 162 LDPI 165 LDSTRING_EQ 631 LDSTRING_GE 631 LDSTRING_GT 631 LDSTRING_LE 631 LDSTRING_LT 631 LDSTRING_NE 631 LDTM 1017 LDTM 1017 LDTM 1017 LDTM 1017 LDTM 1017 LDTM 1017 LDTM_EQ 1017 LDTM_GE 1017 LDTM...

Page 2101: ... 1013 ORDT 1013 ORDT 1013 ORDT 1013 ORDT 1013 ORDT_EQ 1013 ORDT_GE 1013 ORDT_GT 1013 ORDT_LE 1013 ORDT_LT 1013 ORDT_NE 1013 ORE 704 ORE 704 ORE 704 ORE 704 ORE 704 ORE 704 ORED 706 ORED 706 ORED 706 ORED 706 ORED 706 ORED 706 ORED_EQ 706 ORED_GE 706 ORED_GT 706 ORED_LE 706 ORED_LT 706 ORED_NE 706 ORE_EQ 704 ORE_GE 704 ORE_GT 704 ORE_LE 704 ORE_LT 704 ORE_NE 704 OR_EQ _U 218 ORF 162 ORFI 165 OR_GE ...

Page 2102: ...S S 1382 S 1388 S 1384 S 1380 S 1386 S 2PID 1239 S ABS 1378 S ADD 1368 S AMR 1347 S AT1 1393 S AVE 1306 S BC 1223 S BPI 1269 S BUMP 1344 S D 1292 S DBND 1330 S DED 1295 S DIV 1374 S DUTY 1217 S ENG 1364 S FG 1350 S FLT 1356 S HS 1299 S I 1290 S IENG 1366 S IFG 1353 S IN 1197 S IPD 1262 S LIMT 1308 S LLAG 1287 S LS 1301 S MID 1303 S MOUT 1214 S MUL 1372 S ONF2 1317 S ONF3 1323 S OUT1 1203 S OUT2 12...

Page 2103: ...771 SIND P 783 S_IPD 1262 SJIS2WS P 683 SJIS2WSB P 685 S_LE 1388 S_LIMT 1308 S_LLAG 1287 S_LS 1301 S_LT 1382 S_MID 1303 S_MOUT 1214 SMOV P 498 S_MUL 1372 S_ONF2 1317 S_ONF3 1323 SORTD _U 930 S_OUT1 1203 S_OUT2 1209 SP CONTSW 1440 SP DEVST 596 SP ECPRTCL 1109 SP FREAD 599 SP FTPGET 1128 SP FTPPUT 1123 SP FWRITE 616 SP SLMPSND 1117 SP SOCCINF 1099 SP SOCCLOSE 1088 SP SOCCSET 1101 SP SOCOPEN 1085 SP ...

Page 2104: ...DINT2INT P 420 UDINT2UINT P 422 UINT2DBL P 753 UINT2DINT P 410 UINT2FLT P 743 UINT2INT P 408 UINT2UDINT P 412 UNI P 480 UNIINFRD P 1067 V VAL P _U 457 W WAND P 300 302 WDT P 554 WOR P 310 312 WORD_TO_BOOL _E 1799 WORD_TO_DINT _E 1802 WORD_TO_DWORD _E 1800 WORD_TO_INT _E 1801 WORD_TO_STRING _E 1805 WORD_TO_TIME _E 1804 WS2SJIS P 681 WSFL P 376 WSFR P 372 WSUM P _U 934 WTOB P 486 WXNR P 330 332 WXOR...

Page 2105: ...RCV 1554 ZP_BUFSND 1559 ZP_CLOSE 1545 ZP_CSET 1702 1705 1710 ZP_ERRCLEAR 1571 ZP_ERRRD 1574 ZPOP P 851 855 ZPOP P _2 855 ZP_OPEN 1541 ZP_PFWRT 1775 ZP_PINIT 1778 ZP_PSTRT1 1769 ZP_PSTRT2 1769 ZP_PSTRT3 1769 ZP_PSTRT4 1769 ZP_REMFR 1600 ZP_REMTO 1605 ZP_TEACH1 1772 ZP_TEACH2 1772 ZP_TEACH3 1772 ZP_TEACH4 1772 ZP_UINI 1721 ZPUSH P 849 852 ZPUSH P _2 852 Z_RECVS 1497 ZRRDB P 995 ZRWRB P 997 ...

Page 2106: ...6ENG G Added or modified part Section 12 1 January 2016 SH NA 081266ENG H Added or modified parts TERMS Section 2 2 2 3 2 4 2 5 3 9 3 10 6 1 6 5 6 7 7 9 7 19 7 20 7 25 7 26 8 4 Chapter 9 13 20 Section 21 4 21 5 Chapter 22 23 Appendix 1 2 3 4 May 2016 SH NA 081266ENG I Added or modified parts TERMS Section 2 3 2 9 3 4 7 7 8 5 Chapter 13 14 15 Section 15 2 17 1 17 2 17 3 17 4 18 1 18 2 18 3 18 4 18 ...

Page 2107: ... been avoided if functions or structures judged as necessary in the legal safety measures the user s device is subject to or as necessary by industry standards had been provided 4 Failure that could have been avoided if consumable parts battery backlight fuse etc designated in the instruction manual had been correctly serviced or replaced 5 Failure caused by external irresistible forces such as fi...

Page 2108: ...ver Windows Vista and Windows XP are either registered trademarks or trademarks of Microsoft Corporation in the United States and or other countries The company names system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies In some cases trademark symbols such as or are not specified in this manual SH NA 081266ENG M ...

Page 2109: ......

Page 2110: ...e When exported from Japan this manual does not require application to the Ministry of Economy Trade and Industry for service transaction permission HEAD OFFICE TOKYO BUILDING 2 7 3 MARUNOUCHI CHIYODA KU TOKYO 100 8310 JAPAN NAGOYA WORKS 1 14 YADA MINAMI 5 CHOME HIGASHI KU NAGOYA JAPAN ...

Reviews: