background image

 Programming Manual
(Structured Text)

Содержание MELSEC L series

Страница 1: ...Programming Manual Structured Text ...

Страница 2: ......

Страница 3: ...LC thoroughly read the manuals attached to the products and the relevant manuals introduced in the attached manuals Also pay careful attention to safety and handle the products properly Please save the manuals attached to the products carefully to make them accessible when required and always forward them to the end user ...

Страница 4: ... 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 PRODUCT Railway companies or Public service purposes and or any other cases in which establishment of a special quality assurance system is required by the Purchaser or End User Aircraft or Aerospace Me...

Страница 5: ...tion 6 1 14 May 2008 SH NA 080366E E Correction Abbreviations and Generic Terms in This Manual Section 2 1 1 Oct 2008 SH NA 080366E F Additional models Q00UJCPU Q00UCPU Q01UCPU Q10UDHCPU Q10UDEHCPU Q20UDHCPU Q20UDEHCPU Correction Abbreviations and Generic Terms in This Manual Section 2 1 1 Section 3 2 1 Section 4 2 2 Jan 2009 SH NA 080366E G Correction Section 2 1 3 Chapter 5 Jan 2010 SH NA 080366...

Страница 6: ...tion About Manuals How to Use This Manual Section 4 3 3 Japanese Manual Version SH 080363 K This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual 200...

Страница 7: ...uage 1 1 1 2 Features of ST Program in MELSEC Q L Series 1 3 1 3 ST Program Creating Procedure 1 4 2 SYSTEM CONFIGURATION 2 1 to 2 3 2 1 System Configuration 2 1 2 1 1 Applicable CPUs 2 1 2 1 2 Programming tool for ST program 2 1 2 1 3 ST program specifications 2 1 3 HANDLING OF CHARACTERS AND NUMERIC VALUES IN ST PROGRAMS 3 1 to 3 16 3 1 Usable Characters 3 1 3 2 Data Handling 3 3 3 2 1 Data type...

Страница 8: ...comparison BKCMP_LE_M 5 11 5 4 5 Block data comparison BKCMP_LT_M 5 12 5 4 6 Block data comparison BKCMP_GE_M 5 12 5 5 Arithmetic Operation 5 13 5 5 1 Addition of BCD 4 digit data 2 devices BPLUS_M 5 13 5 5 2 Addition of BCD 4 digit data 3 devices BPLUS_3_M 5 13 5 5 3 Subtraction of BCD 4 digit data 2 devices BMINUS_M 5 14 5 5 4 Subtraction of BCD 4 digit data 3 devices BMINUS_3_M 5 14 5 5 5 Addit...

Страница 9: ...5 30 5 6 17 2 complement of floating point ENEG_M 5 31 5 6 18 Block BIN BCD conversion BKBCD_M 5 31 5 6 19 Block BCD BIN conversion BKBIN_M 5 32 5 7 Data Transfer 5 33 5 7 1 16 bit data NOT transfer CML_M 5 33 5 7 2 32 bit data NOT transfer DCML_M 5 33 5 7 3 Block transfer BMOV_M 5 34 5 7 4 Same data block transfer FMOV_M 5 34 5 7 5 16 bit data exchange XCH_M 5 35 5 7 6 32 bit data exchange DXCH_M...

Страница 10: ...t included DROL_M 5 52 5 11 8 32 bit data left rotation carry flag included DRCL_M 5 52 5 12 Shift 5 53 5 12 1 n bit right shift SFR_M 5 53 5 12 2 n bit left shift SFL_M 5 53 5 12 3 n bit data 1 bit right shift BSFR_M 5 54 5 12 4 n bit data 1 bit left shift BSFL_M 5 54 5 12 5 1 word right shift DSFR_M 5 55 5 12 6 1 word left shift DSFL_M 5 55 5 13 Bit Processing 5 56 5 13 1 Bit set of word device ...

Страница 11: ...MD 5 76 5 17 9 Hexadecimal ASCII BIN conversion HABIN_S_MD 5 77 5 17 10 Hexadecimal ASCII 32 bit BIN conversion DHABIN_S_MD 5 77 5 17 11 Decimal ASCII BCD 4 digit conversion DABCD_S_MD 5 78 5 17 12 Decimal ASCII BCD 8 digit conversion DDABCD_S_MD 5 78 5 17 13 Device comment data read COMRD_S_MD 5 79 5 17 14 Character string length detection LEN_S_MD 5 79 5 17 15 BIN character string conversion STR...

Страница 12: ... data upper lower limit control DLIMIT_MD 5 100 5 19 3 Dead band control BAND_MD 5 101 5 19 4 32 bit data dead band control DBAND_MD 5 102 5 19 5 Bit zone control ZONE_MD 5 103 5 19 6 32 bit data bit zone control DZONE_MD 5 104 5 19 7 File register block No switching RSET_MD 5 105 5 19 8 Set of file register file QDRSET_M 5 105 5 19 9 Set of comment file QCDSET_M 5 106 5 20 Clock 5 107 5 20 1 Read...

Страница 13: ...6 6 1 15 Character string type STRING Boolean type BOOL conversion STR_TO_BOOL _E 6 17 6 1 16 Character string type STRING double precision integer type DINT conversion STR_TO_DINT _E 6 18 6 1 17 Character string type STRING integer type INT conversion STR_TO_INT _E 6 19 6 1 18 Character string type STRING real number type REAL conversion STR_TO_REAL _E 6 20 6 2 Numerical Functions General Functio...

Страница 14: ...er String Functions 6 69 6 10 1 Character string length acquisition LEN _E 6 69 6 10 2 Acquisition from start position of character string LEFT _E 6 70 6 10 3 Acquisition from end of character string RIGHT _E 6 71 6 10 4 Acquisition from specified position of character string MID _E 6 72 6 10 5 Concatenation of character strings CONCAT _E 6 73 6 10 6 Insertion of character string into specified po...

Страница 15: ...the structured text ST program creation method printout method etc using GX Developer Sold separately SH 080367E 13JU37 Structured Text ST Programming Guide Book Written for those who will create structured text ST programs for the first time Explains the basic operation methods and functions through sample programs Sold separately SH 080368E 13JF69 MELSEC Q L Programming Manual Common Instruction...

Страница 16: ...rogramming Refer to the manual when information on operation details is necessary When information on other than ST programming is necessary refer to the GX Developer Operating Manual or GX Developer Operating Manual Startup When you already have the knowledge of the ST language and want to start programming immediately Proceed to CHAPTER 5 MELSEC FUNCTIONS It describes the necessary items for use...

Страница 17: ...Abbreviation for function block Basic model QCPU Generic term for Q00JCPU Q00CPU and Q01CPU of function version B or later High Performance model QCPU Generic term for Q02 H CPU Q06CPU Q12HCPU and Q25HCPU Universal model QCPU Generic term for Q00UJCPU Q00UCPU Q01UCPU Q02UCPU Q03UDCPU Q03UDECPU Q04UDHCPU Q04UDEHCPU Q06UDHCPU Q06UDEHCPU Q10UDHCPU Q10UDEHCPU Q13UDHCPU Q13UDEHCPU Q20UDHCPU Q20UDEHCPU ...

Страница 18: ...s etc Call of user defined function blocks FB Call of functions MELSEC functions IEC functions Description of comments The main features of the ST language are as described below 1 Free description in text format The ST language is described in text format of alphanumeric characters comments and labels 2 Programming on the same level as those of the C and other high level languages Like the high l...

Страница 19: ...of briefly describing easy to read operation processing that is difficult to describe in lists or ladders the ST language has a high level of program readability and is suitable for the fields where complex arithmetic operations comparison operations etc are performed 1 ...

Страница 20: ...Restoration of ST program read from PLC In the MELSEC Q L series the created ST program is written to the PLC and executed and can be read from the PLC and then restored to enable editing in the ST language format 3 Program change during system operation online change Part of a running program can be changed without the PLC CPU being stopped 4 Connection with other language programs Since the MELS...

Страница 21: ...lock Program label definition ST programming Define the global variables and local labels in a program For details refer to the GX Developer Operating Manual Convert compile the ST program into a program that can be executed by the PLC CPU For details refer to the GX Developer Operating Manual Structured Text Convert compile Write to PLC Perform write to the PLC CPU For details refer to the GX Dev...

Страница 22: ...DHCPU Q20UDEHCPU Q26UDHCPU Q26UDEHCPU Q02PHCPU Q06PHCPU Q12PHCPU Q25PHCPU Q12PRHCPU Q25PRHCPU L02CPU L26CPU BT 2 1 2 Programming tool for ST program Use the following programming tool to create edit and or monitor ST programs Software Package Name Operating Environment GX Developer Version 8 00A or later Refer to the GX Developer Version 8 Operating Manual Startup 2 1 3 ST program specifications T...

Страница 23: ...rnal system device Word Special register SD Link input Jn X Link output Jn Y Link relay Jn B Bit Link special relay Jn SB Link register Jn W Link direct device Word Link special register Jn SW Intelligent function module device Word Intelligent function module device Un G Index register Word Index register Z 1 R File register Word File register ZR Decimal constant K Bit word dou ble word Hexadecim...

Страница 24: ...ation Type Device Representation Timer contact TS Timer coil TC Retentive timer contact STS Retentive timer coil STC Counter contact CS Bit Counter coil CC Timer present value TN T Retentive timer present value STN ST Internal user device Word Counter present value CN C Examples of use 1 ST program Equivalent list program M0 TS0 LD T0 OUT M0 2 ST program Equivalent list program COUNTER_M X0 CC20 1...

Страница 25: ...ined 1 Usable characters The following characters can be used in ST programs Locations of Application Character Type Program statement Comment Character string Label 1 Character Examples Alphanumeric characters ABC IF D0 Symbols _ 2 D0 D1 Space Line feed code TAB code Can be used Cannot be used Part cannot be used 1 For the characters that cannot be used in labels refer to Appendix 1 Character Str...

Страница 26: ...nt that is not the processing target of control in a program Turns ON Data type name Word that represents a data type BOOL DWORD Control syntax Word whose meaning has been defined grammatically for use as a control syntax IF CASE WHILE RETURN Device name Data name for MELSEC PLC X Y M ZR Reserved word Function name MELSEC function IEC function name already defined OUT_M REAL_TO_STR_E Operator Char...

Страница 27: ...e precision integer type 2147483648 to 2147483647 Double word signed long REAL Real number type 3 402823 38 to 1 175495 38 0 0 1 175495 38 to 3 402823 38 Real number float STRING Character string type Up to 50 characters can be defined Character string char ARRAY Array data type Depends on the data type of the specified element Array char etc STRUCT Structured data type Depends on the data type of...

Страница 28: ...r real number type can be specified REAL EXPT REAL In1 ANY_NUM In2 Function definition of function EXPT When a word type device is specified RealLabel EXPT E1 0 D0 When a double word type label is specified RealLabel EXPT E1 0 DWLabel When a real number is specified RealLabel EXPT E1 0 E1 0 The data types and device types corresponding to the ANY types are as indicated below Data Type BOOL INT DIN...

Страница 29: ...ments are counted from 0 Format Array name specification number of array element Image diagram When a word type array having four elements is set to have the array name of Unit price the specification numbers of the array elements are 0 1 2 3 100 1200 1300 800 Unit price 0 Unit price 1 Unit price 2 Unit price 3 For a word type array word data enters each array element Description example Unit pric...

Страница 30: ...in the specification number of the array element Up to five arrays can be nested Using 17 or more arrays will result in a conversion error Example When five arrays are nested Unit price Unit price Unit price Unit price Unit price D1 100 Precaution for setting the specification number of the array element Since there is a possibility that the data of the other devices may be corrupted be careful so...

Страница 31: ... Structure name stocking Structure element One word type Structure element name Unit No One real number type Structure element name unit price One character string type Structure element name name of article Stocking 100 98 2 APPLE Unit No Unit price Name of article Description example 100 is assigned to structure element Unit No Stocking Unit No 100 98 2 is assigned to structure element Unit pric...

Страница 32: ...y The used binary number is preceded by 2 M0 2 0 M0 2 1 Octal The used octal number is preceded by 8 M0 8 0 M0 8 1 BOOL Hexadecimal The used hexadecimal number is preceded by 16 M0 16 0 M0 16 1 Binary The used binary number is preceded by 2 D0 2 110 Octal The used octal number is preceded by 8 D0 8 377 Decimal The used decimal number is preceded by 10 The numeric value may be preceded by K D0 123 ...

Страница 33: ...ata Type 0 to 1 BOOL 32768 to 32767 INT 2147483648 to 2147483647 DINT 0 to 4294967295 ANY_BIT double word 2 0 to 65535 ANY_BIT word 1 32768 to 65535 ANY16 2147483648 to 4294967295 ANY32 2 0 to 2 1 8 0 to 8 1 16 0 to 16 1 BOOL 2 0 to 2 1111_1111_1111_1111 8 0 to 8 177777 16 0 to 16 FFFF INT ANY16 ANY_BIT word 1 2 0 to 2 1111_1111_1111_1111_1111_1111_1111_1111 8 0 to 8 37777777777 16 0 to 16 FFFFFFF...

Страница 34: ...ecaution for use of and in character string type data is used as an escape sequence Two hexadecimal numbers following are recognized as the ASCII code and the characters corresponding to the ASCII code are inserted into the character string A conversion error will occur when the two hexadecimal numbers following do not correspond to the ASCII code However an error will not occur when the character...

Страница 35: ... Manual Label representation examples in ST programs are as follows Example Switch_A FALSE FALSE is assigned to Switch_A Example IF INT_TO_BOOL Unit_No FALSE THEN Line_No 2147483647 END_IF IF INT_TO_BOOL Unit_No is FALSE 2147483647 is assigned to Unit_Number Example Limit_A E1 0 1 0 is assigned to Limit_A Example Conveyor 4 Unit_No The value of Unit_No is assigned to the fifth element of Conveyor ...

Страница 36: ...l is to be declared 1 Declare the structure element GX Developer start Open project Double click the structure tab Add new structure Double click STOCKING or ADDRESS Structure variable setting screen The following example shows the structure element label setting made on the structure variable setting screen 2 Declare the structure label Make structure label declaration on the local variable setti...

Страница 37: ...in an ST program as a label a conversion error will occur and the label cannot be used Precaution for use of the timer type counter type and retentive timer type labels If the timer type counter type or retentive timer type label is defined in the member variable of a structure that member variable cannot be used on the ST edit screen However the other member variables of a structure that include ...

Страница 38: ...o W0 END_IF REMARK When devices are to be specified Devices can be specified in both upper case and lower case What devices are available For available devices refer to 2 1 3 2 Applicable devices in this manual 2 Other using methods The following three methods can be used as the device modification and specifying methods These can be used in the same usage as when devices are used in ladder progra...

Страница 39: ...ssigned to D0Z2 b Bit specification By specifying the bit No of a word device it can be used as a bit device D0 1 Word device Bit No Description example D0 0 TRUE Bit 0 of D0 device is turned ON W0 F FALSE Bit 15 of W0 device is turned OFF c Digit specification By specifying the 4 bits 8 bits 12 bits etc of a bit device as a single digit word data or double word data can be handled by the bit devi...

Страница 40: ...n the right member and left member Example D0 K5X0 Since K5X0 is a double word type and D0 is a word type the above program will result in an error Precaution 2 for use of digit specification If the right member is greater than the left member data will be transferred to the left member within the range of the applicable number of points For the applicable number of points for digit specification ...

Страница 41: ...xecuted a decimal number of 0 is assigned to D0 When label is used When the character string type label of Stest is used Stest APPLE When this expression is executed character string APPLE is assigned to Stest Precaution for assigning a character string A character string of up to 32 characters can be assigned A conversion error will occur if a character string of more than 32 characters is assign...

Страница 42: ...ment Bit inverted value MOD Multiplication Division Modulus operation Addition Subtraction Comparison Equality Inequality AND Logical product XOR Exclusive logical add OR Logical sum Lowest When the priorities are the same evaluation is made from the left hand side to the right hand side operators The following table lists the operators applicable data types and operation result data types Operato...

Страница 43: ... is not the same in data type as the applicable data in the left member Precaution 2 for use of operator The number of used operators that can be described in a single expression is up to 1024 A conversion error will occur if 1025 or more operators are used REMARK Explanation of ANY type For the explanation of the ANY type refer to 3 2 2 About ANY type ...

Страница 44: ...bels Dtest1 Dtest2 are used Example of use Dtest2 Dtest1 MOD D2 K3 K100 Operation order 1 D2 K3 2 Dtest1 MOD D2 K3 3 Dtest1 MOD D2 K3 K100 4 The result of 3 is assigned to Dtest2 When double word type labels Dwtest1 Dwtest2 are used Example of use Dwtest2 Dwtest1 Dwtest1 K100 Operation order 1 Dwtest1 K100 2 Dwtest1 Dwtest1 K100 3 The result of 2 is assigned to Dwtest2 Precautions when an operatio...

Страница 45: ...used Example of use M0 X0 AND X1 AND D1 100 Operation order 1 Only when the result of X0 AND X1 is ON and D is 100 M0 turns ON b When labels are used When bit type labels Btest1 Btest2 are used Example of use Btest2 Btest2 OR Btest1 Operation order 1 When Btest2 or Btest1 is ON Btest2 turns ON ...

Страница 46: ... Control syntax list The following table lists the control syntaxes Conditional statement IF conditional statement CASE conditional statement Repeat statement FOR DO syntax WHILE DO syntax REPEAT UNTIL syntax Other control syntaxes RETURN syntax EXIT syntax Precaution for use of a hierarchy for a control syntax A hierarchy of up to 16 levels is enabled for a control syntax A conversion error will ...

Страница 47: ...lean operation of the condition of a single bit type variable or a complicated expression including many variables Statement Conditional expression FALSE TRUE Description example a When actual device is used in Boolean expression IF X0 THEN If X0 is ON 0 is assigned to D0 D0 0 If the X0 area is X0 TRUE the meaning is the same END_IF b When operator is used in Boolean expression IF D0 D1 200 THEN I...

Страница 48: ...ed in Boolean expression When function block name w_FB is set to the local variable setting and word type label w_Out is set as the output variable of the function block After the function block is executed For the method of using the function block refer to the GX Developer Version 8 Operating Manual IF w_FB w_Out 100 THEN If w_Out is 100 D0 0 0 is assigned to D0 END_IF e When function is used in...

Страница 49: ...al device is used in Boolean expression IF X0 THEN If the X0 area is X0 TRUE the meaning is the same D0 0 If X0 is ON 0 is assigned to D0 ELSE If X0 is not ON 1 is assigned to D0 D0 1 END_IF b When operator is used in Boolean expression IF D0 D1 200 THEN If D0 D1 is less than or equal to 200 D0 0 0 is assigned to D0 ELSE If D0 D1 is not less than or equal to 200 D0 1 1 is assigned to D0 END_IF c W...

Страница 50: ...xecuted when Boolean expression conditional expression 1 is TRUE Statement 2 is executed if the value of Boolean expression 1 is FALSE and the value of Boolean expression 2 is TRUE Statement 3 is executed if the value of Boolean expression 2 is FALSE and the value of Boolean expression 3 is TRUE FALSE TRUE FALSE TRUE FALSE TRUE Conditional expression 1 Conditional expression 2 Conditional expressi...

Страница 51: ... to D1 END_IF b When operators are used in Boolean expressions IF D0 D1 100 THEN If D0 D1 is less than 100 D1 0 0 is assigned to D1 ELSIF D0 D1 200 THEN If D0 D1 is less than or equal to 200 D1 1 1 is assigned to D1 ELSIF D0 D1 300 THEN If D0 D1 is less than or equal to 300 D1 2 2 is assigned to D1 END_IF c When functions are used in Boolean expressions IF INT_TO_BOOL D0 TRUE THEN If INT_T0_BOOL D...

Страница 52: ...multiple values and range specification can be combined to specify values 1 2 5 9 When the value of the integer expression is any of 1 2 5 and 9 Data types that can be used in integer expression of CASE conditional statement The data types that can be specified as the integer expression in the CASE conditional statement are the integer type INT and double precision integer type DINT The word devic...

Страница 53: ...ned to D1 2 3 D1 1 If D0 is 2 or 3 1 is assigned to D1 4 6 D1 2 If D0 is any of 4 to 6 2 is assigned to D1 ELSE D1 3 If D0 is other than the above 3 is assigned to D1 END_CASE b When operation result is used in integer expression CASE D0 D1 OF 1 D1 0 If D0 D1 is 1 0 is assigned to D1 2 3 D1 1 If D0 D1 is 2 or 3 1 is assigned to D1 4 6 D1 2 If D0 D1 is any of 4 to 6 2 is assigned to D1 ELSE D1 3 If...

Страница 54: ...tion When a CASE conditional statement has multiple values of the same integer selection the statement on the upper line is executed with priority and the latter statement having the same integer selection is not executed For example when the D100 value is 3 in the following CASE conditional statement statement 3 having integer selection 3 is executed and statement 4 having the same integer select...

Страница 55: ...ssing is performed until the last value is reached Data types that can be used in Last value expression incremental expression of FOR syntax Integer values and the integer values of operation expression results can be specified Explanation The data used as a repeat variable is initialized The initialized repeat variable is incremented or decremented according to the incremental expression and one ...

Страница 56: ...tax and later may not be executed or an endless loop may occur Precaution for use of FOR DO syntax In the FOR DO syntax the count processing of the repeat variable is performed after execution of Statement in the FOR syntax An endless loop will occur if the count processing higher than the maximum value or lower than the minimum value of the data type of the repeat variable is executed TRUE Repeat...

Страница 57: ...return whether the result is true or false all expressions that can be specified in the Boolean expression in the IF conditional statement can be used TRUE FALSE Statement Repeat conditional expression Description example a When actual device and operator are used in Boolean expression WHILE W100 W2 100 D0 While W100 W2 100 is true processing is repeated W100 W100 1 During repeat processing W100 i...

Страница 58: ... the Boolean expression in the REPEAT syntax is only required to return whether the result is true or false all expressions that can be specified in the Boolean expression in the IF conditional statement can be used TRUE FALSE Execution statement Conditional expression Description example a When actual device is used in Boolean expression REPEAT D1 D1 1 Until D1 becomes less than 100 UNTIL D1 100 ...

Страница 59: ...BOOL_TO_DINT M0 100 becomes less D1 is incremented by 1 END_REPEAT Precaution 1 for use of repeat statements When using a repeat statement be careful not to result in endless loop processing Precaution 2 for use of repeat statements If many repeat statements are used it should be noted that the PLC scan time will increase remarkably ...

Страница 60: ...n a program the processing after the RETURN syntax are all ignored and a jump occurs from the place where RETURN is executed to the last line of the ST program or the program in the function block Jump Program RETURN Description example a When actual device is used in IF conditional statement Boolean expression IF X0 THEN If X0 is ON the statement in IF is executed RETURN The program after the RET...

Страница 61: ...uted The program is continued on the line that follows the one where the repeat loop processing has been terminated FALSE EXIT TRUE TRUE FALSE Loop statement Conditional statement Statement Description example a When actual device is used in IF conditional Boolean expression FOR D0 0 TO 10 D0 If the D0 value is less than or equal to 10 repeat is executed IF D1 10 THEN Whether the D1 value is great...

Страница 62: ...ocessing Time Q25H Operation Processing Time Q00J ST program IF X0 THEN D0 100 END_IF 7 1 534 10 9 List program LD X0 MOV K100 D0 3 0 134 0 90 Remarks In only the conditional statement area the processing time is shorter than when ST is not used However since the comparison target of the IF conditional statement in ST is the Boolean expression complicated comparison can be made easily IF condition...

Страница 63: ...has been calculated on the assumption that the compared areas are conducting c FOR DO statement Unit µs Number of Steps Operation Processing Time Q25H Operation Processing Time Q00J ST program FOR D0 0 T0 10 BY 1 D0 D1 D1 1 END_FOR 16 Initialization 0 134 Repeat 3 308 In this case the repeated area operates 10 times Initialization 0 9 Repeat 24 0 List program FOR K10 LD SM400 INC D1 NEXT 6 2 574 2...

Страница 64: ...is described in a list the program is the same as the ST program conversion result Therefore the processing time is also the same as that of ST WHILE DO statement 2 Unit µs Number of Steps Operation Processing Time Q25H Operation Processing Time Q00J ST program WHILE D0 100 DO D0 100 END_ WHILE 15 3 1 22 5 List program As above As above As above As above Remarks If the statement is described in a ...

Страница 65: ...d in a list the program is the same as the ST program conversion result Therefore the processing time is also the same as that of ST REPEAT UNTIL statement 2 Unit µs Number of Steps Operation Processing Time Q25H Operation Processing Time Q00J ST program REPEAT D0 100 UNTIL D0 0 END_ REPEAT 9 1 6 Repeated until D0 becomes 0 11 5 List program As above As above As above As above Remarks If the state...

Страница 66: ...in a list the operation is the same as in the ST program Therefore the processing time is also the same as that of ST g RETURN statement Unit µs Number of Steps Operation Processing Time Q25H Operation Processing Time Q00J ST program 3 1 4 11 List program As above As above As above As above Remarks Using the JMP instruction execution moves to the pointer immediately after repeat processing termina...

Страница 67: ...e program is equivalent to the following LD M0 SET Y0 To avoid the bit device being always ON change the program as shown below ST program example 2 IF M0 THEN Y0 TRUE ELSE Y0 FALSE END_IF The above program is equivalent to the following a LD M0 OUT Y0 b Y0 M0 c OUT_M M0 Y0 However when OUT_M is used in the IF conditional statement the condition is as in ST program example 1 The above precautions ...

Страница 68: ...rogram example 2 IF M0 THEN COUNTER_M M1 CC0 K10 END_IF When M0 ON and M1 ON OFF counting is incremented by 1 When M0 OFF and M1 ON OFF counting is not executed M0 ON OFF and counting incrementing by 1 are not synchronized The above occurs since the timer counter related statement is not executed if the IF condition statement is not satisfied When the AND condition of M0 and M1 is used to operate ...

Страница 69: ...put variables and I O variables Also always specify values for the input variables and I O variables For an output variable its description can be omitted if the result of the output variable is not needed Description example When the following FB is created FB data name LINE1_FB Input variable I_Test Output variable O_Test I O variable IO_Test FB label name FB1 The description example of a FB cal...

Страница 70: ... screen The following example shows the FB input output variable label setting made on the FB label setting screen To make label declaration for the FB data name Before an FB is called the label declaration of the used FB must be made Double click Header icon Local or global variable setting screen Select FB in Device type The following example shows the FB label definition made on the local varia...

Страница 71: ...of an I O variable must be specified at the time of an FB call Example FB name FB1 I O variable IO_TEST Output variable O_Test Description example FB1 IO_Test D1 D1 FB1 IO_Test An error occurs Precaution for making an FB call In an ST program the FB set on the local variable setting screen can be used only once If it is used more than once an error will occur To use the same FB more than once decl...

Страница 72: ... is placed within a comment an error will occur Description example Example 1 The pump is activated Example 2 Example 3 After the switch is input the motor is operated Example 4 Flag_A TRUE control start Flag_B TRUE control stop Error example Example 5 Flag_A TRUE control start Flag_A FALSE control stop Example 6 START Processing stop Restart End ...

Страница 73: ...4 33 4 33 4 ST PROGRAM EXPRESSIONS MEMO ...

Страница 74: ...dicates the function name 4 Indicates the data type of the argument The STRING type is represented STRING number of characters It is represented STRING 6 when the number of characters is 6 The ARRAY type is represented data type number of elements It is represented ANY16 3 when the array is of ANY16 type and has three elements 5 Indicates the argument name 6 Indicates the list argument name IN OUT...

Страница 75: ...ompared or head number of the devices where the data to be compared is stored BIN 16 bits Head number of the devices where the comparison data is stored BIN 16 bits Head number of the devices where the comparison operation result will be stored bits Setting Data Internal Devices R ZR J U G Zn Constants K H Other Bit Word Bit Word n Basic Process High performance Redundant Universal LCPU BKCMP BKCM...

Страница 76: ...mple BSQR_MD BOOL EN ANY16 s ANY32 d Function definition of BSQR_MD BSQR_MD X0 D0 dData Program example In the MELSEC common command an actual device can be described as indicated below BSQR D0 W0 However it cannot be described in the MELSEC IEC function BSQR_MD X0 D0 W0 An error will occur When the argument is of REAL type the data type that can be specified is the real number type label or a rea...

Страница 77: ...tact Conduction N C contact Non conduction Function definition BOOL TIMER_M BOOL EN BOOL TCoil ANY16 TValue Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE TCoil IN TS TC device or STS STC device bit data TValue IN Timer set value BIN 16 bit data Remarks When a constant is specified for the timer set value only a decimal number can be sp...

Страница 78: ...duction N C contact Non conduction TIMER_H_M X0 TC0 TValue Corresponding MELSEC command OUTH T High speed timer 5 1 4 Counter COUNTER_M The present value count value of the counter is incremented by 1 and when the counter counts up present value set value the contact is put in the following status N O contact Conduction N C contact Non conduction Function definition BOOL COUNTER_M BOOL EN BOOL CCo...

Страница 79: ...the execution condition is satisfied the specified device is operated as described below Bit device The coil contact is turned OFF Timer counter 0 is assigned to the present value and the coil contact is turned OFF When bit of word device is specified The specified bit is turned to 0 Word device other than timer and counter 0 is assigned to the device data Function definition BOOL RST_M BOOL EN BO...

Страница 80: ...OOL DELTA_M BOOL EN BOOL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE D OUT Data to be output as pulse DY device Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON device DY0 is converted into pulse DELTA_M X0 DY0 Corresponding MELSEC command DELTA Conversion of direct output into p...

Страница 81: ...preceding the bit of the specified device is shifted to the specified bit and the preceding device number is turned to 0 Function definition BOOL SFT_M BOOL EN BOOL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE D OUT Data to be shifted Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ...

Страница 82: ... the RUN STOP DIP switch is moved to the STOP position Function definition BOOL STOP_M BOOL EN Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the CPU operation is stopped STOP_M X0 Corresponding MELSEC command STOP Sequence program stop...

Страница 83: ...and later BKCMP_EQ_M X0 D100 D200 D0 M0 Corresponding MELSEC command BKCMP BIN block data comparison 5 4 2 Block data comparison BKCMP_NE_M n points of BIN 16 bit data word unit starting at the specified devices are compared in terms of Function definition BOOL BKCMP_NE_M BOOL EN ANY16 S1 ANY16 S2 ANY16 n BOOL D Argument Name IN OUT Description EN IN Execution condition Function is executed only w...

Страница 84: ...MP_GT_M X0 D100 D200 D0 M0 Corresponding MELSEC command BKCMP BIN block data comparison 5 4 4 Block data comparison BKCMP_LE_M n points of BIN 16 bit data word unit starting at the specified devices are compared in terms of Function definition BOOL BKCMP_LE_M BOOL EN ANY16 S1 ANY16 S2 ANY16 n BOOL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the resul...

Страница 85: ...MP_LT_M X0 D100 D200 D0 M0 Corresponding MELSEC command BKCMP BIN block data comparison 5 4 6 Block data comparison BKCMP_GE_M n points of BIN 16 bit data word unit starting at the specified devices are compared in terms of Function definition BOOL BKCMP_GE_M BOOL EN ANY16 S1 ANY16 S2 ANY16 n BOOL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the resul...

Страница 86: ...o D100 BPLUS_M X0 D0 D100 Corresponding MELSEC command B BCD 4 digit data addition 5 5 2 Addition of BCD 4 digit data 3 devices BPLUS_3_M The specified two BCD 4 digit data are added Function definition BOOL BPLUS_3_M BOOL EN ANY16 S1 ANY16 S2 ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Augend data BCD 4 digit data S2 I...

Страница 87: ...M X0 D0 D100 Corresponding MELSEC command B BCD 4 digit data subtraction 5 5 4 Subtraction of BCD 4 digit data 3 devices BMINUS_3_M Subtraction is performed between the specified two BCD 4 digit data Function definition BMINUS_3_M BOOL EN ANY16 S1 ANY16 S2 ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Minuend data BCD 4 d...

Страница 88: ...ta1 Result Corresponding MELSEC command DB BCD 8 digit data addition 5 5 6 Addition of BCD 8 digit data 3 devices DBPLUS_3_M The specified two BCD 8 digit data are added Function definition DBPLUS_3_M BOOL EN ANY32 S1 ANY32 S2 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Augend data BCD 8 digit data S2 IN Addend data BCD...

Страница 89: ...sult Corresponding MELSEC command DB BCD 8 digit data subtraction 5 5 8 Subtraction of BCD 8 digit data 3 devices DBMINUS_3_M Subtraction is performed between the specified two BCD 8 digit data Function definition BOOL DBMINUS_3_M BOOL EN ANY32 S1 ANY32 S2 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Minuend data BCD 8 d...

Страница 90: ...t Corresponding MELSEC command B BCD 4 digit data multiplication 5 5 10 Division of BCD 4 digit data BDIVID_M Division is performed between the specified two BCD 4 digit data Function definition BOOL BDIVID_M BOOL EN ANY16 S1 ANY16 S2 ANY16 2 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Dividend data BCD 4 digit data S2 IN Div...

Страница 91: ..._M X0 dwData1 dwData2 ArrayResult Corresponding MELSEC command DB BCD 8 digit data multiplication 5 5 12 Division of BCD 8 digit data DBDIVID_M Division is performed between the specified two BCD 8 digit data Function definition BOOL DBDIVID_M BOOL EN ANY32 S1 ANY32 S2 ANY32 2 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Divid...

Страница 92: ...sponding MELSEC command Character string connection 5 5 14 Character string data connection 3 devices STRING_PLUS_3_M The specified character string data are connected Function definition BOOL STRING_PLUS_3_M BOOL EN STRING S1 STRING S2 STRING D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be connected character string d...

Страница 93: ...00 Corresponding MELSEC command BK Block data addition 5 5 16 BIN block subtraction BKMINUS_M Subtraction is performed between n points of BIN 16 bit data starting at the specified devices Function definition BOOL BKMINUS_M BOOL EN ANY16 S1 ANY16 S2 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Minuend data BIN 16...

Страница 94: ...0 is incremented by 1 INC_M X0 D0 Corresponding MELSEC command INC BIN 16 bit increment 5 5 18 Decrement DEC_M The specified BIN 16 bit data is decremented by 1 Function definition BOOL DEC_M BOOL EN ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE D IN OUT Decrement data decrementing result BIN 16 bit data Return Value Descriptio...

Страница 95: ...cremented by 1 DINC_M X0 dwData1 Corresponding MELSEC command DINC BIN 32 bit increment 5 5 20 32 bit BIN decrement DDEC_M The specified BIN 32 bit data is decremented by 1 Function definition BOOL DDEC_M BOOL EN ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE D IN OUT Decrement data decrementing result BIN 32 bit data Return Val...

Страница 96: ... D100 Corresponding MELSEC command BCD Conversion from BIN data to 4 digit BCD data 5 6 2 32 bit BIN BCD conversion DBCD_M The specified BIN 32 bit data 0 to 99999999 is converted into BCD 8 digit data Function definition BOOL DBCD_M BOOL EN ANY32 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 3...

Страница 97: ...orresponding MELSEC command BIN Conversion from BCD 4 digit data to BIN data 5 6 4 32 bit BCD BIN conversion DBIN_M The specified BCD 8 digit data 0 to 99999999 is converted into BIN 32 bit data Function definition DBIN_M BOOL EN ANY32 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BCD 8 digit data ...

Страница 98: ...NT Conversion from floating decimal point data to BIN16 bit data Single precision 5 6 6 32 bit floating point BIN conversion DINT_E_MD The specified real number data is converted into BIN 32 bit data Function definition BOOL DINT_E_MD BOOL EN REAL S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted real ...

Страница 99: ...LT Conversion from BIN 16 bit data to floating decimal point Single precision 5 6 8 32 bit BIN floating point conversion DFLT_M The specified BIN 32 bit data is converted into real number data Function definition BOOL DFLT_M BOOL EN ANY32 S1 REAL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 32 bit data...

Страница 100: ...t Corresponding MELSEC command DBL Conversion from BIN 16 bit to BIN 32 bit data 5 6 10 32 bit BIN 16 bit BIN conversion WORD_M The specified BIN 32 bit data is converted into signed BIN 16 bit data Function definition BOOL WORD_M BOOL EN ANY32 S1 ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 32 b...

Страница 101: ...rresponding MELSEC command GRY Conversion from BIN 16 bit data to Gray code 5 6 12 32 bit BIN gray code conversion DGRY_M The specified BIN 32 bit data is converted into gray code 32 bit data Function definition BOOL DGRY_M BOOL EN ANY32 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 32 bit data...

Страница 102: ... Corresponding MELSEC command GBIN Conversion of Gray code to BIN 16 bit data 5 6 14 32 bit gray code BIN conversion DGBIN_M The specified gray code 32 bit data is converted into BIN 32 bit data Function definition BOOL DGBIN_M BOOL EN ANY32 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted gray code 3...

Страница 103: ...rresponding MELSEC command NEG Complement of 2 of BIN 16 bit data sign reversal 5 6 16 2 complement of 32 bit BIN DNEG_M The sign of the specified BIN 32 bit data is inverted 2 s complement Function definition BOOL DNEG_M BOOL EN ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE D IN OUT Data whose sign will be inverted sign invers...

Страница 104: ...ngle precision 5 6 18 Block BIN BCD conversion BKBCD_M n points of BIN 16 bit data 0 to 9999 starting at the specified device is converted into BCD 4 digit data Function definition BOOL BKBCD_M BOOL EN ANY16 S1 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 16 bit data n IN Number of conver...

Страница 105: ...esult is TRUE S1 IN Data to be converted BCD 4 digit data n IN Number of converted data D OUT Conversion result BIN 16 bit data Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the BCD data of the number of points stored in W0 starting at D0 is converted into BIN and the result is stored into D100 and later BKBIN_M X0 D0 W0 D100 Corresponding ME...

Страница 106: ...nsferred to D0 CML_M X0 K2M0 D0 Corresponding MELSEC command CML 16 bit NOT transfer 5 7 2 32 bit data NOT transfer DCML_M The specified BIN 32 bit data are inverted bit by bit Function definition BOOL DCML_M BOOL EN ANY32 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data whose bits will be inverted BIN 32 bit data D ...

Страница 107: ... in W0 starting at D100 BMOV_M X0 D0 W0 D100 Corresponding MELSEC command BMOV Block 16 bit transfer 5 7 4 Same data block transfer FMOV_M The 16 bit data of the specified device are transferred to the number of points starting at the specified device Function definition BOOL FMOV_M BOOL EN ANY16 S1 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed onl...

Страница 108: ...hanged XCH_M XO D100 D200 Corresponding MELSEC command XCH 16 bit data exchange 5 7 6 32 bit data exchange DXCH_M The specified two BIN 32 bit data are exchanged Function definition BOOL DXCH_M BOOL EN ANY32 D1 ANY32 D2 Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE D1 IN OUT Data to be exchanged exchange result BIN 32 bit data D2 IN OU...

Страница 109: ... points of 16 bit data starting at D100 and 3 points of 16 bit data starting at D200 are exchanged BXCH_M X0 K3 D100 D200 Corresponding MELSEC command BXCH Block 16 bit data exchange 5 7 8 First last byte exchange SWAP_MD The first 8 bits and last 8 bits of the specified device are exchanged Function definition BOOL SWAP_MD BOOL EN ANY16 D Argument Name IN OUT Description EN IN Execution condition...

Страница 110: ...f the interrupt program is disabled until until EI_M is executed DI_M TRUE Corresponding MELSEC command DI Interrupt disable 5 8 2 Interrupt enable EI_M The interrupt disable status during DI_M execution is reset and the execution of the interrupt program of the interrupt pointer number enabled by IMASK is enabled Function definition BOOL EI_M BOOL EN Argument Name IN OUT Description EN IN Executi...

Страница 111: ...N Execution condition Function is executed only when the result is TRUE S1 IN Devices to be refreshed bit data n IN Number of data to be refreshed BIN 16 bit data Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON 32 points of devices starting at X100 are refreshed RFS_M M0 X100 H20 Corresponding MELSEC command RFS I O refresh For the usable data ...

Страница 112: ...D10 WAND_M X0 D0 D10 Corresponding MELSEC command WAND 16 bit data logical product 5 10 2 Logical product 3 devices WAND_3_M The specified two BIN 16 bit data are ANDed bit by bit Function definition BOOL WAND_3_M BOOL EN ANY16 S1 ANY16 S2 ANY16 D1 Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be ANDed BIN 16 bit data S2 ...

Страница 113: ...wData1 Corresponding MELSEC command DAND 32 bit data logical product 5 10 4 32 bit data logical product 3 devices DAND_3_M The specified two BIN 32 bit data are ANDed bit by bit Function definition BOOL DAND_3_M BOOL EN ANY32 S1 ANY32 S2 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be ANDed BIN 32 bit data S2 IN ...

Страница 114: ...ints stored in D0 starting at D200 are ANDed and the result is stored into D1000 and later BKAND_M X0 D100 D200 D0 D1000 Corresponding MELSEC command BKAND Block logical product 5 10 6 Logical sum 2 devices WOR_M The specified two BIN 16 bit data are ORed bit by bit Function definition BOOL WOR_M BOOL EN ANY16 S1 ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is execut...

Страница 115: ...t is output to Y10 Y1B WOR_3_M M0 K3X10 D0 K3Y10 Corresponding MELSEC command WOR 16 bit data logical sum 5 10 8 32 bit data logical sum 2 devices DOR_M The specified two BIN 32 bit data are ORed bit by bit Function definition BOOL DOR_M BOOL EN ANY32 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to OR BIN 32 bit ...

Страница 116: ...0 Result Corresponding MELSEC command DOR 32 bit data logical sum 5 10 10 Block data logical sum BKOR_M n points of 16 bit data starting at the specified two devices are ORed bit by bit Function definition BOOL BKOR_M BOOL EN ANY16 S1 ANY16 S2 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be ORed BIN 16 bi...

Страница 117: ... D10 D20 Corresponding MELSEC command WXOR 16 bit data exclusive OR 5 10 12 Exclusive OR 3 devices WXOR_3_M The specified two BIN 16 bit data are EXCLUSIVE ORed bit by bit Function definition BOOL WXOR_3_M BOOL EN ANY16 S1 ANY16 S2 ANY16 D1 Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be EXCLUSIVE ORed BIN 16 bit data S2...

Страница 118: ... Result Corresponding MELSEC command DXOR 32 bit data exclusive OR 5 10 14 32 bit data exclusive OR 3 devices DXOR_3_M The specified two BIN 32 bit data are EXCLUSIVE ORed bit by bit Function definition BOOL DXOR_3_M BOOL EN ANY32 S1 ANY32 S2 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be EXCLUSIVE ORed BIN 32 b...

Страница 119: ...E ORed and the result is stored into D100 and later BKXOR_M X0 D10 D20 D0 D100 Corresponding MELSEC command BKXOR Block exclusive OR 5 10 16 NOT exclusive OR 2 devices WXNR_M The specified two BIN 16 bit data are NOT EXCLUSIVE ORed bit by bit Function definition BOOL WXNR_M BOOL EN ANY32 S1 ANY32 S2 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when t...

Страница 120: ...XNR_3_M X0 K4X20 D0 D100 Corresponding MELSEC command WXNR 16 bit data NOT exclusive OR 5 10 18 32 bit data NOT exclusive OR 2 devices DXNR_M The specified two BIN 32 bit data are NOT EXCLUSIVE ORed bit by bit Function definition BOOL DXNR_M BOOL EN ANY32 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to NOT EXCLUS...

Страница 121: ...t Corresponding MELSEC command DXNR 32 bit data NOT exclusive OR 5 10 20 Block data NOT exclusive OR BKXNR_M n points of 16 bit data starting at the specified two devices are NOT EXCLUSIVE ORed bit by bit Function definition BOOL BKXNR_M BOOL EN ANY16 S1 ANY16 S2 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data ...

Страница 122: ...y flag being included ROR_M X0 K3 D0 Corresponding MELSEC command ROR Right rotation of 16 bit data 5 11 2 Right rotation carry flag included RCR_M The specified BIN 16 bit data are rotated n bits to the right with the carry flag being included Function definition BOOL RCR_M BOOL EN ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result...

Страница 123: ... being included ROL_M X0 K3 D0 Corresponding MELSEC command ROL Left rotation of 16 bit data 5 11 4 Left rotation carry flag included RCL_M The specified BIN 16 bit data are rotated n bits to the left with the carry flag being included Function definition BOOL RCL_M BOOL EN ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE ...

Страница 124: ...ncluded DROR_M X0 D0 dwData1 Corresponding MELSEC command DROR Right rotation of 32 bit data 5 11 6 32 bit data right rotation carry flag included DRCR_M The specified BIN 32 bit data are rotated n bits to the right with the carry flag being included Function definition BOOL DRCR_M BOOL EN ANY16 n ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the...

Страница 125: ...included DROL_M X0 K4 dwData1 Corresponding MELSEC command DROL Left rotation of 32 bit data 5 11 8 32 bit data left rotation carry flag included DRCL_M The specified BIN 32 bit data are rotated n bits to the left with the carry flag being included Function definition BOOL DRCL_M BOOL EN ANY16 n ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the r...

Страница 126: ...to the right SFR_M X0 K4 D100 Corresponding MELSEC command SFR n bit right shift of 16 bit data 5 12 2 n bit left shift SFL_M The specified BIN 16 bit data are shifted n bits to the left Function definition BOOL SFL_M BOOL EN ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE n IN Number of shifts 0 to 15 BIN 16 bit data D I...

Страница 127: ... right BSFR_M X0 K5 M100 Corresponding MELSEC command BSFR 1 bit right shift of n bit data 5 12 4 n bit data 1 bit left shift BSFL_M n points of bit data starting at the specified device are shifted one bit to the left Function definition BOOL BSFL_M BOOL EN ANY16 n BOOL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE n IN Number of de...

Страница 128: ...right DSFR_M X0 K7 D100 Corresponding MELSEC command DSFR 1 word right shift of n word data 5 12 6 1 word left shift DSFL_M n points of 16 bit data starting at the specified device are shifted one word to the left Function definition BOOL DSFL_M BOOL EN ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE n IN Number of device...

Страница 129: ... of D100 is set BSET_M X0 K8 D100 Corresponding MELSEC command BSET Bit set of word device 5 13 2 Bit reset of word device BRST_M Bit n of the specified word device is reset Function definition BOOL_BRST_M BOOL EN ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE n IN Bit number to be reset BIN 16 bit data D IN OUT Data to ...

Страница 130: ...o the status of bit 10 of D100 TEST_MD X0 D100 K10 M0 Corresponding MELSEC command TEST Bit set 5 13 4 Bit test of 32 bit data DTEST_MD The bit in the specified position of the specified BIN 32 bit data is written to the specified bit device Function definition BOOL DTEST_MD BOOL EN ANY32 S1 ANY16 S2 BOOL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when t...

Страница 131: ... Function is executed only when the result is TRUE S1 IN Head of data to be reset bit data n IN Number of bits to be reset BIN 16 bit data Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the number of points stored in D100 starting at M10 are reset BKRST_M X0 M10 D100 Corresponding MELSEC command BKRST Batch reset of bit devices For the usable ...

Страница 132: ...rresponding MELSEC command SER 16 bit data search 5 14 2 32 bit data search DSER_M 2n points of data starting at the specified BIN 32 bit data are searched for the specified BIN 32 bit data Function definition BOOL SER_M BOOL EN ANY16 S1 ANY16 S2 ANY16 n ANY16 2 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be searched ...

Страница 133: ...into Result SUM_M X0 iData Result Corresponding MELSEC command SUM 16 bit data bit check 5 14 4 32 bit data bit check DSUM_M The number of bits having 1 in the specified BIN 32 bit data is counted Function definition BOOL DSUM_M BOOL EN Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be counted BIN 32 bit data D OUT Count r...

Страница 134: ...CO_M X0 D100 BitSize Result Corresponding MELSEC command DECO 8 256 bits decode For the usable data type refer to 3 2 2 About ANY type 5 14 6 Encode ENCO_M 2 n bits of data starting at the specified data are encoded Function definition BOOL ENCO_M BOOL EN ANY_SIMPLE S1 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN...

Страница 135: ...it data DIS_M The data in the lower n digits of the specified BIN 16 bit data are disconnected and stored into the lower 4 bits of n points starting at the specified device Function definition BOOL DIS_M BOOL EN ANY16 S1 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be disconnected BIN 16 bit data n IN Num...

Страница 136: ...nding MELSEC command UNI 4 bit connection of 16 bit data 5 14 10 Bit disconnection of any data NDIS_M The bits of the data stored in and after the specified device are disconnected in units of the specified bits Function definition BOOL NDIS_M BOOL EN ANY16 S1 ANY16 S2 ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to...

Страница 137: ...er NUNI_M X0 iData1 iData2 Result Corresponding MELSEC command NUNI Connection of any bit data 5 14 12 Byte unit data disconnection WTOB_MD The BIN 16 bit data stored in and after the specified device are disconnected into n bytes Function definition BOOL WTOB_MD BOOL EN ANY16 S1 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is...

Страница 138: ...of byte unit data 5 14 14 Data maximum value retrieval MAX_M The maximum value is retrieved from n points of BIN 16 bit data starting at the specified device Function definition BOOL MAX_M BOOL EN ANY16 S1 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Head of data to be retrieved BIN 16 bit data n IN Number of dat...

Страница 139: ...ng MELSEC command DMAX 32 bit data maximum value retrieval 5 14 16 Data minimum value retrieval MIN_M The minimum value is retrieved from n points of BIN 16 bit data starting at the specified device Function definition BOOL MIN_M BOOL EN ANY16 S1 ANY16 n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Head of data to be ret...

Страница 140: ...Data sort SORT_M n points of BIN 16 bit data starting at the specified device are sorted in ascending or descending order Function definition BOOL SORT_M BOOL EN ANY16 S1 ANY16 n ANY16 S2 BOOL D1 ANY16 D2 Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Head of data to be sorted BIN 16 bit data n IN Number of data to be sorted BIN 1...

Страница 141: ...execution condition X0 turns ON iData1 points of BIN 32 bit data starting at dData are sorted in ascending or descending order DSORT_M X0 dData iData1 iData2 bData iData3 Corresponding MELSEC command DSORT 32 bit data sort 5 14 20 Total value calculation WSUM_M n points of BIN 16 bit data starting at the specified device are all added Function definition BOOL WSUM_M BOOL EN ANY16 S1 ANY16 n ANY32 ...

Страница 142: ...hich total value will be calculated BIN 32 bit data n IN Number of data BIN 16 bit data D 0 D 1 D 2 D OUT Total value storage destination ARRAY 0 3 OF ANY16 D 3 Upper 4 digits to Lower 4 digits Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON iData points of 32 bit BIN data starting at dData are all added and the result is stored into Result DWS...

Страница 143: ...OUT Description EN IN Execution condition Only value TRUE indicating that the result is always valid or normally ON device SM400 can be specified Return Value Description BOOL Execution condition Example of use When SM755 is OFF I O refresh and general data processing of intelligent function module when SM755 is ON Only general data processing is performed COM_M TRUE Corresponding MELSEC command C...

Страница 144: ...orresponding MELSEC command FROM Reading 1 word data from the intelligent function module 5 16 2 Intelligent function module 2 word data read DFRO_M The specified points 2 of data are read from the specified address and later of the buffer memory in the specified intelligent function module or special function module Function definition BOOL DFRO_M BOOL EN ANY16 n1 ANY16 n2 ANY16 n3 ANY32 D Argume...

Страница 145: ...nding MELSEC command TO Writing 1 word data to intelligent function module 5 16 4 Intelligent function module 2 word data write DTO_M n3 2 points of data starting at the specified device are written to the specified address and later of the buffer memory in the specified intelligent function module or special function module Function definition BOOL DTO_M BOOL EN ANY32 S1 ANY16 n1 ANY16 n2 ANY16 n...

Страница 146: ...BINDA_S_MD X0 iData sData Corresponding MELSEC command BINDA BIN 16 bit to decimal ASCII conversion 5 17 2 32 bit BIN decimal ASCII conversion DBINDA_S_MD The numeric value in each digit of the specified BIN 32 bit data represented in decimal is converted into ASCII code data Function definition BOOL DBINDA_S_MD BOOL EN ANY32 S1 STRING 12 D Argument Name IN OUT Description EN IN Execution conditio...

Страница 147: ... sData Corresponding MELSEC command BINHA BIN 16 bit hexadecimal ASCII conversion 5 17 4 32 bit BIN hexadecimal ASCII conversion DBINHA_S_MD The numeric value in each digit of the specified BIN 32 bit data represented in hexadecimal is converted into ASCII code data Function definition BOOL DBINHA_S_MD BOOL EN ANY32 S1 STRINGS 10 D Argument Name IN OUT Description EN IN Execution condition Functio...

Страница 148: ...0 iData sData Corresponding MELSEC command BCDDA BCD 4 digit decimal ASCII conversion 5 17 6 BCD 8 digit decimal ASCII conversion DBCDDA_S_MD The numeric value in each digit of the specified BCD 8 digit data is converted into ASCII code Function definition BOOL DBCDDA_S_MD BOOL EN ANY32 S1 STRING 10 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the res...

Страница 149: ...Data iData Corresponding MELSEC command DABIN Decimal ASCII BIN 16 bit conversion 5 17 8 Decimal ASCII 32 bit BIN conversion DDABIN_S_MD The specified decimal ASCII code data is converted into BIN 32 bit data Function definition BOOL DDABIN_S_MD BOOL EN STRING 11 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be...

Страница 150: ... iData Corresponding MELSEC command HABIN Hexadecimal ASCII BIN 16 bit conversion 5 17 10 Hexadecimal ASCII 32 bit BIN conversion DHABIN_S_MD The specified hexadecimal ASCII code data is converted into BIN 32 bit data Function definition BOOL DHABIN_S_MD BOOL EN STRING 8 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Da...

Страница 151: ...0 sData iData Corresponding MELSEC command DABCD Decimal ASCII BCD 4 digit conversion 5 17 12 Decimal ASCII BCD 8 digit conversion DDABCD_S_MD The specified decimal ASCII code data is converted into BCD 8 digit data Function definition BOOL DDABCD_S_MD BOOL EN STRING 8 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data...

Страница 152: ... ASCII code COMRD_S_MD X0 D100 sData Corresponding MELSEC command COMRD Device comment data read 5 17 14 Character string length detection LEN_S_MD The length of the specified character string is obtained Function definition BOOL LEN_S_MD BOOL EN STRING S1 ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data whose character...

Страница 153: ...a sData Corresponding MELSEC command STR BIN 16 bit character string conversion 5 17 16 32 bit BIN character string conversion DSTR_S_MD The specified BIN 32 bit data is converted into a character string with a decimal point added in the specified position Function definition BOOL DSTR_S_MD BOOL EN ANY32 S1 ANY32 S2 STRING 14 D Argument Name IN OUT Description EN IN Execution condition Function is...

Страница 154: ...a iData Corresponding MELSEC command VAL Character string BIN 16 bit conversion 5 17 18 Character string 32 bit BIN conversion DVAL_S_MD The specified character string is converted into BIN 32 bit data and its number of digits and BIN 32 bit data are obtained Function definition BOOL DVAL_S_MD BOOL EN STRING 13 S1 ANY32 D1 ANY32 D2 Argument Name IN OUT Description EN IN Execution condition Functio...

Страница 155: ...ion condition Example of use When execution condition X0 turns ON the real number data specified in rData is converted into a character string according to the display instruction specified in ArrayData and the result is stored into sData ESTR_M X0 rData ArrayData sData Corresponding MELSEC command ESTR Floating point data character string conversion 5 17 20 Character string floating point convers...

Страница 156: ..._S_MD X0 iData1 iData2 sData Corresponding MELSEC command ASC BIN 16 bit data ASCII conversion 5 17 22 ASCII BIN conversion HEX_S_MD The hexadecimal ASCII data stored in the specified number of characters is converted into BIN 16 bit data Function definition BOOL HEX_S_MD BOOL EN STRING S1 ANY16n ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the ...

Страница 157: ... iData Result Corresponding MELSEC command RIGHT Fetch from right side of character string 5 17 24 Fetch from character string left side LEFT_M n characters of data starting at the left of the specified character string data head of the character string are acquired Function definition BOOL LEFT_M BOOL EN STRING S1 ANY16 n STRING D Argument Name IN OUT Description EN IN Execution condition Functio...

Страница 158: ...g 5 17 26 Any data replacement in character string MIDW_M The data of the number of characters specified in S2 1 are stored into the position starting at S2 0 of the specified character string data Function definition BOOL MIDW_M BOOL EN STRING S1 ANY16 S S2 STRING D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be acquir...

Страница 159: ...esult is stored into Result INSTR_M X0 sData1 sData2 iData Result Corresponding MELSEC command INSTR Character string search 5 17 28 Floating point BCD decomposition EMOD_M The specified real number data is decomposed into the BCD type floating point format based on the specified fraction part digits Function definition BOOL EMOD_M BOOL EN REAL S1 ANY16 S2 ANY16 5 D Argument Name IN OUT Descriptio...

Страница 160: ...ata S2 IN Fraction part digit data BIN 16 bit data D OUT Conversion result real number data Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the BCD type floating point format data specified in iData1 is converted into real number data based on the fraction part digits specified in iData2 and the result is stored into Result real number data bas...

Страница 161: ... into Result SIN_E_MD X0 rData Result Corresponding MELSEC command SIN SIN operation on floating point data Single precision 5 18 2 Floating point COS operation COS_E_MD The COS cosine value of the specified angle is operated Function definition BOOL COS_E_MD BOOL EN REAL S1 REAL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN An...

Страница 162: ... into Result TAN_E_MD X0 rData Result Corresponding MELSEC command TAN TAN operation on floating point data Single precision 5 18 4 Floating point SIN operation ASIN_E_MD 1 The SIN 1 arcsine operation of the specified SIN value is performed Function definition BOOL ASIN_E_MD BOOL EN REAL S1 REAL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result ...

Страница 163: ...sult ACOS_E_MD X0 rData Result Corresponding MELSEC command ACOS COS 1 operation on floating point data Single precision 5 18 6 Floating point TAN operation ATAN_E_MD 1 The TAN 1 arctangent operation of the specified TAN value is performed Function definition BOOL ATAN_E_MD BOOL EN REAL S1 REAL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result i...

Страница 164: ...0 rData Result Corresponding MELSEC command RAD Conversion from floating point angle to radian Single precision 5 18 8 Floating point radian angle conversion DEG_E_MD The unit of magnitude of the specified angle is converted from the radian unit to the degree unit Function definition BOOL DEG_E_MD BOOL EN REAL S1 REAL D Argument Name IN OUT Description EN IN Execution condition Function is execute...

Страница 165: ...esult Corresponding MELSEC command SQR Square root operation for floating point data Single precision 5 18 10 Floating point natural exponential operation EXP_E_MD The base e natural exponent of the specified value is operated Function definition BOOL EXP_E_MD BOOL EN REAL S1 REAL D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN E...

Страница 166: ...m of the value specified in rData is operated and the result is stored into Result LOG_E_MD X0 rData Result Corresponding MELSEC command LOG Natural logarithm operation on floating point data Single precision 5 18 12 Random number generation RND_M Random numbers of 0 to 32767 are generated Function definition BOOL RND_M BOOL EN ANY16 D Argument Name IN OUT Description EN IN Execution condition Fun...

Страница 167: ...nding MELSEC command SRND Series updates 5 18 14 BCD 4 digit square root BSQR_MD The square root of the specified BCD 4 digit data is operated Function definition BOOL BSQR_MD BOOL EN ANY16 S1 ANY32 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN BCD 4 digit data to be operated BIN 16 bit data D OUT Operation result BIN 32 bit da...

Страница 168: ...square root 5 18 16 BCD type SIN operation BSIN_MD The BCD 4 digit data of the specified angle is SIN sine operated Function definition BOOL BSIN_MD BOOL EN ANY16 S1 ANY16 3 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be operated BCD 4 digit data D 0 Sign positive 0 negative 1 D 1 Integer part BCD 4 digit data D OUT O...

Страница 169: ...a 2 BCOS_MD X0 iData ArrayData Corresponding MELSEC command BCOS BCD type COS operation 5 18 18 BCD type TAN operation BTAN_MD The BCD 4 digit data of the specified angle is TAN tangent operated Function definition BOOL BTAN_MD BOOL EN ANY16 S1 ANY16 3 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be operated BCD 4 digi...

Страница 170: ...nArrayData Result Corresponding MELSEC command BASIN BCD type SIN 1 operation 5 18 20 BCD type COS operation BACOS_MD 1 The COS 1 arccosine value of the specified BCD value is operated Function definition BOOL BACOS_MD BOOL EN ANY16 3 S1 ANY16 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S 0 Sign positive 0 negative 1 S 1 Integer pa...

Страница 171: ...1 Integer part BCD 4 digit data S1 IN Head number of device that stores data to be operated ARRAY 0 2 OF ANY16 S 2 Fraction part BCD 4 digit data D OUT Operation result BCD 4 digit data Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the TAN 1 value of the value specified in BatanArrayData is operated and the result is stored into Result BATAN_...

Страница 172: ...t data Remarks The output value is controlled as described below When S1 lower limit value S3 input value S1 lower limit value D output value When S2 upper limit value S3 input value S2 upper limit value D output value When S1 lower limit value S3 input value S2 upper limit value S3 input value D output value Return Value Description BOOL Execution condition Example of use When execution condition...

Страница 173: ...ata Remarks The output value is controlled as described below When S1 lower limit value S3 input value S1 lower limit value D output value When S2 upper limit value S3 input value S2 upper limit value D output value When S1 lower limit value S3 input value S2 upper limit value S3 input value D output value Return Value Description BOOL Execution condition Example of use When execution condition X0...

Страница 174: ... 16 bit data Remarks The output value is controlled as described below When S1 lower limit value S3 input value S3 input value S1 lower limit value D output value When S2 upper limit value S3 input value S3 input value S2 upper limit value D output value When S1 lower limit value S3 input value S2 upper limit value 0 D output value Return Value Description BOOL Execution condition Example of use W...

Страница 175: ...ue BIN 32 bit data Remarks The output value is controlled as described below When S1 lower limit value S3 input value S3 input value S1 lower limit value D output value When S2 upper limit value S3 input value S3 input value S2 upper limit value D output value When S1 lower limit value S3 input value S2 upper limit value 0 D output value Return Value Description BOOL Execution condition Example of...

Страница 176: ...alue BIN 16 bit data D OUT Output value BIN 16 bit data Remarks The output value is controlled as described below When S3 input value 0 S3 input value S1 negative bias value D output value When S3 input value 0 0 D output value When S3 input value 0 S3 input value S1 positive bias value D output value Return Value Description BOOL Execution condition Example of use When execution condition X0 turn...

Страница 177: ...nput value BIN 32 bit data D OUT Output value BIN 32 bit data Remarks The output value is controlled as described below When S3 input value 0 S3 input value S1 negative bias value D output value When S3 input value 0 0 D output value When S3 input value 0 S3 input value S1 positive bias value D output value Return Value Description BOOL Execution condition Example of use When execution condition X...

Страница 178: ...ecified in iData RSET_MD X0 iData Corresponding MELSEC command RSET File register block No switching 5 19 8 Set of file register file QDRSET_M The file name of the file registers used in a program is changed into the specified file name Function definition BOOL QDRSET_M BOOL EN STRING S1 Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1...

Страница 179: ...t Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Drive No File name of target comment file character string data Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the file name of the comment file of drive No 3 is changed into DEF QCD QCDSET_M X0 3 DEF Corresponding MELSEC command QCDSET ...

Страница 180: ...result is TRUE D 0 Year 1980 to 2079 D 1 Month 1 to 12 D 2 Day 1 to 31 D 3 Hour 0 to 23 D 4 Minute 0 to 59 D 5 Second 0 to 59 D OUT Read clock data ARRAY 0 6 OF ANY16 D 6 Day of week 0 to 6 Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the year month day hour minute second day of week are read from the clock element of the QCPU LCPU and store...

Страница 181: ...n the result is TRUE S 0 Year 1980 to 2079 S 1 Month 1 to 12 S 2 Day 1 to 31 S 3 Hour 0 to 23 S 4 Minute 0 to 59 S 5 Second 0 to 59 S IN Clock data to be written ARRAY 0 6 OF ANY16 S 6 Day of week 0 to 6 Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the clock data stored in TimeData are written to the clock element of the QCPU LCPU DATEWR_MD ...

Страница 182: ...cond 0 to 59 S2 0 Hour 0 to 23 S2 1 Minute 0 to 59 S2 IN Time data that will be added to data ARRAY 0 2 OF ANY16 S2 2 Second 0 to 59 D 0 Hour 0 to 23 D 1 Minute 0 to 59 D OUT Addition result time of day data ARRAY 0 2 OF ANY16 D 2 Second 0 to 59 Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the time data specified in TimeData2 is added to the...

Страница 183: ...nd 0 to 59 S2 0 Hour 0 to 23 S2 1 Minute 0 to 59 S2 IN Time data that will be subtracted from data ARRAY 0 2 OF ANY16 S2 2 Second 0 to 59 D 0 Hour 0 to 23 D 1 Minute 0 to 59 D OUT Subtraction result time of day data ARRAY 0 2 OF ANY16 D 2 Second 0 to 59 Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the time data specified in TimeData2 is subt...

Страница 184: ...meData Result Corresponding MELSEC command SECOND Clock data format conversion 5 20 6 Clock data format conversion second hour minute second HOUR_M The specified data in second is converted into hour minute second Function definition BOOL HOUR_M BOOL EN ANY32 S1 ANY16 3 D Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Clock data t...

Страница 185: ...sponding MELSEC command PSTOP Program standby command 5 21 2 Program output OFF standby POFF_M The program of the specified file name is brought into non execution and put in a standby status Function definition BOOL POFF_M BOOL EN STRING S1 Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN File name of program to be brought into non...

Страница 186: ...status PSCAN_M X0 sData Corresponding MELSEC command PSCAN Program scan execution registration command 5 21 4 Program low speed execution registration PLOW_M The program of the specified file name is put in a low speed execution status Function definition BOOL PLOW_M BOOL EN STRING S1 Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN...

Страница 187: ... WDT _M BOOL EN Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the watchdog timer is reset in the sequence program WDT_M X0 Corresponding MELSEC command WDT Watchdog timer reset ...

Страница 188: ...nction of the function 2 Indicates the data type of the function 3 Indicates the function name 4 Indicates the data type of the argument The STRING type is represented STRING number of characters It is represented STRING 6 when the number of characters is 6 5 Indicates the argument name 6 Indicates the list argument name IN OUT description of arguments used with the function 7 Indicates the list r...

Страница 189: ...l No are 04122 or larger Integer data to be converted to 32 bit floating decimal point data or head number of the devices where the integer data is stored BIN 16 32 bits Head number of the devices where the converted 32 bit floating decimal point data will be stored real number Setting Data Internal Devices R ZR J U G Zn Constants K H Other Bit Word Bit Word 1 Process High performance Redundant Un...

Страница 190: ...of the return value Example of use Argument Type ST Program Conversion Result Used Instruction BOOL di_data1 BOOL_TO_DINT b_data1 LD b_data1 DMOV K1 di_data1 LDI b_data1 DMOV K0 di_data1 LD DMOV LDI Function definition BOOL BOOL_TO_DINT_E BOOL EN BOOL S1 DINT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be co...

Страница 191: ...ue Example of use Argument Type ST Program Conversion Result Used Instruction INT D50 BOOL_TO_INT M100 LD M100 MOV K1 D50 LDI M100 MOV K0 D50 LD MOV LDI Function definition BOOL BOOL_TO_INT_E BOOL EN BOOL S1 INT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted bit data D1 OUT Conversion result BIN 16...

Страница 192: ...e return value is 1 Example of use Argument Type ST Program Conversion Result Used Instruction BOOL s_ary1 BOOL_TO_STR b_data1 LD b_data1 MOV K49 s_ary1 LDI b_data1 MOV K48 s_ary1 LD MOV LDI Function definition BOOL BOOL_TO_STR_E BOOL EN BOOL S1 STRING 2 D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be convert...

Страница 193: ...it data is other than 0 the return value is 1 Example of use Argument Type ST Program Conversion Result Used Instruction DINT M100 DINT_TO_BOOL di_data1 LDD di_data1 K0 OUT M100 LDD OUT Function definition BOOL DINT_TO_BOOL _E BOOL EN DINT S1 BOOL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN ...

Страница 194: ...er 16 bits are discarded Example of use Argument Type ST Program Conversion Result Used Instruction DINT i_data1 DINT_TO_INT di_data1 LD SM400 MOV di_data1 i_data1 LD MOV Function definition BOOL DINT_TO_INT_E BOOL EN DINT S1 INT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 32 bit data D1 OUT...

Страница 195: ... Conversion Result Used Instruction DINT r_data1 DINT_TO_REAL di_data1 LD SM400 DFLT di_data1 r_data1 LD DFLT Function definition BOOL DINT_TO_REAL_E BOOL EN DINT S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 32 bit data D1 OUT Conversion result real number data Return value Return Val...

Страница 196: ...PU Example of use Argument Type ST Program Conversion Result Used Instruction DINT s_ary1 DINT_TO_STR K65535 LD SM400 DBINDA K65535 s_ary1 LD DBINDA Function definition BOOL DINT_TO_STR _E BOOL EN DINT S1 STRING 12 D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 32 bit data D1 OUT Conversion res...

Страница 197: ...is other than 0 the return value is 1 Example of use Argument Type ST Program Conversion Result Used Instruction INT b_data1 INT_TO_BOOL i_data1 LD i_data K0 OUT b_data1 LD OUT Function definition BOOL INT_TO_BOOL _E BOOL EN INT S1 BOOL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 16 bit data...

Страница 198: ...ram Conversion Result Used Instruction INT di_data1 INT_TO_DINT D500 LD SM400 DBL D500 di_data1 LD DBL Function definition BOOL INT_TO_DINT _E BOOL EN INT S1 DINT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 16 bit data D1 OUT Conversion result BIN 32 bit data Return value Return Value Descri...

Страница 199: ... Conversion Result Used Instruction INT w_Real1 INT_TO_REAL D0 LD SM400 FLT D0 w_Real1 LD FLT Function definition BOOL INT_TO_REAL_E BOOL EN INT S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 16 bit data D1 OUT Conversion result real number data Return value Return Value Description BOO...

Страница 200: ...Example of use Argument Type ST Program Conversion Result Used Instruction INT w_Str1 INT_TO_STR D0 LD SM400 BINDA D0 w_Str1 LD BINDA Function definition BOOL INT_TO_STR _E BOOL EN INT S1 STRING 8 D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted BIN 16 bit data D1 OUT Conversion result character stri...

Страница 201: ...T Program Conversion Result Used Instruction REAL w_DWord1 REAL_TO_DINT w_Real1 LD SM400 DINT w_Real1 w_DWord1 LD DINT Function definition BOOL REAL_TO_DINT_E BOOL EN REAL S1 DINT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted real number data D1 OUT Conversion result BIN 32 bit data Return value R...

Страница 202: ...rsion Result Used Instruction REAL w_Word1 REAL_TO_INT w_Real1 LD SM400 INT w_Real1 w_Word1 LD INT Function definition BOOL REAL_TO_INT_E BOOL EN REAL S1 INT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted real number data D1 OUT Conversion result BIN 16 bit data Return value Return Value Descriptio...

Страница 203: ...igits is 5 Example of use Argument Type ST Program Conversion Result Used Instruction REAL w_Str1 REAL_TO_STR w_Real1 LD SM400 MOV K1 D10237 MOV K13 D10238 MOV K5 D10239 ESTR w_Real1 D10237 w_Str1 LD MOV ESTR Function definition BOOL REAL_TO_STR _E BOOL EN REAL S1 STRING 14 D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 I...

Страница 204: ...acter string data is other than 0 the return value is 1 Example of use Argument Type ST Program Conversion Result Used Instruction STRING w_Bit1 STR_TO_BOOL w_Str1 LD w_Str1 K48 OUT w_Bit1 LD OUT Function definition BOOL STR_TO_BOOL_E BOOL EN STRING 2 S1 BOOL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be co...

Страница 205: ...U Example of use Argument Type ST Program Conversion Result Used Instruction STRING w_DWord1 STR_TO_DINT 123 LD SM400 DDABIN 123 w_DWord1 LD DDABIN Function definition BOOL STR_TO_DINT _E BOOL EN STRING 12 S1 DINT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted character string data D1 OUT Conversio...

Страница 206: ...f use Argument Type ST Program Conversion Result Used Instruction STRING w_Word1 STR_TO_INT w_Str1 LD SM400 DABIN w_Str1 w_Word1 LD DABIN Function definition BOOL STR_TO_INT _E BOOL EN STRING 6 S1 INT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted character string data D1 OUT Conversion result BIN ...

Страница 207: ...Program Conversion Result Used Instruction STRING w_Real1 STR_TO_REAL w_Str1 LD SM400 EVAL w_Str1 w_Real1 LD EVAL Function definition BOOL STR_TO_REAL _E BOOL EN STRING 24 S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be converted character string data D1 OUT Conversion result real number data Return v...

Страница 208: ...NT D0 ABS D1 LD SM400 MOV D1 D0 LD D1 K0 NEG D0 LD MOV LD NEG DINT di_data1 ABS di_data2 LD SM400 DMOV di_data2 di_data1 LDD di_data2 K0 DCML di_data2 di_data1 D K1 di_data1 LD DMOV LDD DCML D Function definition BOOL ABS_E BOOL EN ANY_NUM S1 ANY_NUM D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data whose absolute va...

Страница 209: ...Instruction REAL r_data1 SQRT r_data2 LD SM400 SQR r_data2 r_data1 LD SQR Function definition BOOL SQRT_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data whose square root will be found real number data D1 OUT Square root operation result real number data Return value Return Value Description B...

Страница 210: ... Program Conversion Result Used Instruction REAL r_data1 LN 1 23456 LD SM400 LOG E1 23456 r_data1 LD LOG Function definition BOOL LN_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data whose natural logarithm will be found real number data D1 OUT Natural logarithm operation result real number dat...

Страница 211: ...esult Used Instruction REAL r_data1 EXP r_data2 LD SM400 EXP r_data2 r_data1 LD EXP Function definition BOOL EXP_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data whose natural exponent will be found real number data D1 OUT Natural exponent operation result real number data Return value Return ...

Страница 212: ...ST Program Conversion Result Used Instruction REAL r_data1 SIN 1 23456 LD SM400 SIN E1 23456 r_data1 LD SIN Function definition BOOL SIN_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Angle data to be SIN sine operated real number data Remarks Set the specified angle in radian unit angle 180 D1 O...

Страница 213: ...w_Real1 COS w_Real2 LD SM400 COS w_Real2 w_Real1 LD COS Function definition BOOL COS_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Angle data to be COS cosine operated real number data Remarks Set the specified angle in radian unit angle 180 D1 OUT COS operation result real number data Remarks S...

Страница 214: ...Result Used Instruction REAL w_Real1 TAN w_Real2 LD SM400 TAN w_Real2 w_Real1 LD TAN Function definition BOOL TAN_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Angle data to be TAN tangent operated real number data Remarks Set the specified angle in radian unit angle 180 D1 OUT TAN operation res...

Страница 215: ...nt Type ST Program Conversion Result Used Instruction REAL w_Real1 ASIN w_Real2 LD SM400 ASIN w_Real2 w_Real1 LD ASIN Function definition BOOL ASIN_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN SIN value to be SIN 1 arcsine operated 1 0 to 1 0 real number data D1 OUT SIN 1 operation result real ...

Страница 216: ...ent Type ST Program Conversion Result Used Instruction REAL w_Real1 ACOS w_Real2 LD SM400 ACOS w_Real2 w_Real1 LD ACOS Function definition BOOL ACOS_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN COS value to be COS 1 arccosine operated 1 0 to 1 0 real number data D1 OUT COS 1 operation result re...

Страница 217: ...ent Type ST Program Conversion Result Used Instruction REAL w_Real1 ATAN w_Real2 LD SM400 ATAN w_Real2 w_Real1 LD ATAN Function definition BOOL ATAN_E BOOL EN REAL S1 REAL D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN TAN value to be TAN 1 arctangent operated real number data D1 OUT TAN 1 operation result real number ...

Страница 218: ...on result Return value Return Value Description BOOL Execution condition bit data Example of use Argument Type ST Program Conversion Result Used Instruction REAL b_result ADD_E b_select r_data1 r_data2 r_data3 LD b_select E r_data1 r_data2 r_data3 LD b_select OUT b_result LD E OUT INT b_result ADD_E b_select D10 D20 D30 D40 LD b_select D10 D20 D40 D30 D40 LD b_select OUT b_result LD OUT DINT b_res...

Страница 219: ... Description BOOL Execution condition bit data Example of use Argument Type ST Program Conversion Result Used Instruction REAL b_result MUL_E b_select r_data1 r_data2 r_data3 LD b_select E r_data1 r_data2 r_data3 LD b_select OUT b_result LD E OUT INT b_result MUL_E b_select D10 D20 D30 D40 LD b_select D10 D20 D10238 D10238 D30 D10236 MOV D10236 D40 LD b_select OUT b_result LD MOV OUT DINT b_result...

Страница 220: ... Return value Return Value Description BOOL Execution condition bit data Example of use Argument Type ST Program Conversion Result Used Instruction REAL b_result SUB_E b_select r_data1 r_data2 r_data3 LD b_select E r_data1 r_data2 r_data3 LD b_select OUT b_result LD E OUT INT b_result SUB_E b_select 32767 D100 i_data1 LD b_select K32767 D100 i_data1 LD b_select OUT b_result LD OUT DINT b_result SU...

Страница 221: ...Value Description BOOL Execution condition bit data Example of use Argument Type ST Program Conversion Result Used Instruction REAL b_result DIV_E b_select r_data1 r_data2 r_data3 LD b_select E r_data1 r_data2 r_data3 LD b_select OUT b_result LD E OUT INT b_result DIV_E b_select D10 D20 D30 LD b_select D10 D20 D10238 MOV D10238 D30 LD b_select OUT b_result LD MOV OUT DINT b_result DIV_E b_select d...

Страница 222: ...nd data S2 IN Divisor data D1 OUT Modulus operation result Return value Return Value Description BOOL Execution condition bit data Example of use Argument Type ST Program Conversion Result Used Instruction INT B100 MOD_E M1 D10 D20 D30 LD M1 D10 D20 D10238 MOV D10239 D30 LD M1 OUT B100 LD MOV OUT DINT b_result MOD_E b_select di_data1 di_data2 di_data3 LD b_select D di_data1 di_data2 D10236 DMOV D1...

Страница 223: ... Description REAL Operation result real number data Example of use Argument Type ST Program Conversion Result Used Instruction REAL r_data1 EXPT r_data2 r_data3 LD SM400 LOG r_data2 r_data1 E r_data1 r_data3 r_data1 EXP r_data1 r_data1 LD LOG E EXP INT r_data1 EXPT 1 123 k32767 LD SM400 LOG E1 123 r_data1 FLT K32767 D10238 E r_data1 D10238 r_data1 EXP r_data1 r_data1 LD LOG FLT E EXP DINT r_data1 ...

Страница 224: ...2 IN Data used as exponent D1 OUT Operation result Remarks The operation result is the angle data in radian unit Return value Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the data stored in rData is natural exponential operated with the data stored in iData and the result is stored into Result M0 EXPT_E X0 rData iData Result For the usable d...

Страница 225: ...SM400 DMOV K2147483647 w_DWord1 LD DMOV BOOL w_Bit1 MOVE w_Bit2 LD SM400 MPS AND w_Bit2 SET w_Bit1 MRD ANI w_Bit2 RST w_Bit1 MPP OUT M8191 LD MPS AND SET MRD ANI RST MPP OUT STRING w_Str1 MOVE ABCDEFG LD SM400 MOV ABCDEFG w_Str1 LD MOV Function definition BOOL MOVE_E BOOL EN ANY S1 ANY D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result ...

Страница 226: ...Instruction INT D0 SHL D1 1 LD SM400 MOV D1 D0 SFL D0 K1 LD MOV SFL Function definition BOOL SHL_E BOOL EN ANY_BIT S1 ANY_BIT n ANY_BIT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be shifted n IN Number of bits to be shifted Remarks Only a constant can be specified as the number of bits to be shifted D1 OUT ...

Страница 227: ...INT D0 SHR D1 1 LD SM400 MOV D1 D0 SFR D0 K1 LD MOV SFR Function definition BOOL SHR_E BOOL EN ANY_BIT S1 ANY_BIT n ANY_BIT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be shifted n IN Number of bits to be shifted Remarks Only a constant can be specified as the number of bits to be shifted D1 OUT Shifted data...

Страница 228: ...INT D0 ROR D1 1 LD SM400 MOV D1 D0 ROR D0 K1 LD MOV ROR Function definition BOOL ROR_E BOOL EN ANY_BIT S1 ANY_BIT n ANY_BIT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be rotated n IN Number of bits to be rotated Remarks Only a constant can be specified as the number of bits to be rotated D1 OUT Rotation res...

Страница 229: ...INT D0 ROL D1 1 LD SM400 MOV D1 D0 ROL D0 K1 LD MOV ROL Function definition BOOL ROL_E BOOL EN ANY_BIT S1 ANY_BIT n ANY_BIT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be rotated n IN Number of bits to be rotated Remarks Only a constant can be specified as the number of bits to be rotated D1 OUT Rotation res...

Страница 230: ...d D1 OUT AND operation result Return value Return Value Description BOOL Execution condition Example of use Argument Type ST Program Conversion Result Used Instruction BOOL b_result AND_E b_select b_data1 b_data2 b_data3 b_data4 LD b_data1 AND b_data2 AND b_data3 OUT M8191 LD b_select AND M8191 SET b_data4 LD b_select ANI M8191 RST b_data4 LD b_select OUT b_result LD AND OUT SET ANI RST Word devic...

Страница 231: ...IN Data to be ORed D1 OUT OR operation result Return value Return Value Description BOOL Execution condition Remarks Example of use Argument Type ST Program Conversion Result Used Instruction BOOL b_result OR_E TRUE b_data1 b_data2 b_data3 LD b_data1 OR b_data2 OUT M8191 LD SM400 AND M8191 SET b_data3 LD SM400 ANI M8191 RST b_data3 LD SM400 OUT b_result LD OR OUT AND SET ANI RST Word device B1 OR_...

Страница 232: ...XCLUSIVE OR operation result Return value Return Value Description BOOL Execution condition Remarks Example of use Argument Type ST Program Conversion Result Used Instruction BOOL b_result XOR_E b_select b_data1 b_data2 b_data3 LD b_data1 ANI b_data2 LDI b_data1 AND b_data2 ORB OUT M8191 LD b_select AND M8191 SET b_data3 LD b_select ANI M8191 RST b_data3 LD b_select OUT b_result LD ANI LDI AND ORB...

Страница 233: ...I b_data1 OUT b_result LDI OUT Word device d0z2 NOT d1z3 LD SM400 CML D1Z3 D0Z2 LD CML Function definition BOOL NOT_E BOOL EN ANY_BIT S1 ANY_BIT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be logical NOT operated D1 OUT Logical NOT operation result Return value Return Value Description BOOL Execution conditi...

Страница 234: ...S3 Example of use Argument Type ST Program Conversion Result Used Instruction REAL r_data1 SEL b_select r_data2 r_data3 LDI b_select EMOV r_data2 r_data1 LD b_select EMOV r_data3 r_data1 LDI EMOV LD INT D1 SEL X1 D2 D3 LDI X1 MOV D2 D1 LD X1 MOV D3 D1 LDI MOV LD DINT K8X100 SEL X1 K8X10 K2147483647 LDI X1 DMOV K8X10 K8X100 LD X1 DMOV K2147483647 K8X100 LDI DMOV LD BOOL b_result SEL b_select b_data...

Страница 235: ...to be selected when S1 is TRUE D1 OUT Selection result When S1 is FALSE Return value S2 When S1 is TRUE Return value S3 Return value Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the data stored in iData1 is stored into Result if the bit data in bData is FALSE or the data stored in iData2 is stored into Result if the bit data in bData is TRUE...

Страница 236: ...on Result Used Instruction REAL w_Real4 MAX w_Real1 w_Real2 w_Real3 LD SM400 EMOV w_Real1 w_Real4 LDE w_Real4 w_Real2 EMOV w_Real2 w_Real4 LDE w_Real4 w_Real3 EMOV w_Real3 w_Real4 LD EMOV LDE INT D0 MAX D1 D2 D3 LD SM400 MOV D1 D0 LD D0 D2 MOV D2 D0 LD D0 D3 MOV D3 D0 LD MOV LD DINT w_DWord4 MAX 2147483648 0 2147483647 LD SM400 DMOV K2147483647 w_DWord4 LD DMOV BOOL w_Bit4 MAX w_Bit1 w_Bit2 w_Bit3...

Страница 237: ...ed only when the result is TRUE S1 to Sn IN Search target data D1 OUT Search result Return value Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the data stored in iData1 iData2 and iData3 are searched for the maximum value and the result is stored into Result M0 MAX_E X0 iData1 iData2 iData3 Result For the usable data type refer to 3 2 2 About...

Страница 238: ...tion REAL Real4 MIN Real1 Real2 Real3 LD SM400 EMOV Real1 Real4 LDE Real4 Real2 EMOV Real2 Real4 LDE Real4 Real3 EMOV Real3 Real4 LD EMOV LDE INT Int4 MIN Int1 Int2 Int3 LD SM400 MOV Int1 Int4 LD Int4 Int2 MOV Int2 Int4 LD Int4 Int3 MOV Int3 Int4 LD MOV LD DINT Dint4 MIN Dint1 Dint2 Dint3 LD SM400 DMOV Dint1 Dint4 LDD Dint4 Dint2 DMOV Dint2 Dint4 LDD Dint4 Dint3 DMOV Dint3 Dint4 LD DMOV LDD BOOL b...

Страница 239: ...n EN IN Execution condition Function is executed only when the result is TRUE S1 to Sn IN Search target data D1 OUT Search result Return value Return Value Description BOOL Execution condition Example of use BOOL MIN_E BOOL EN ANY_SIMPLE S1 ANY_SIMPLE S2 ANY_SIMPLE Sn ANY_SIMPLE D1 M0 MIN_E X0 iData1 iData2 iData3 Result For the usable data type refer to 3 2 2 About ANY type ...

Страница 240: ...lue S1 input value Return value MAX upper limit value When MIN lower limit value S1 input value MAX upper limit value Return value S1 input value Example of use Argument Type ST Program Conversion Result Used Instruction REAL Real4 LIMIT Real1 Real2 Real3 LDE Real2 Real1 ANDE Real2 Real3 EMOV Real2 Real4 LDE Real2 Real1 EMOV Real1 Real4 LDE Real2 Real3 EMOV Real3 Real4 LDE ANDE EMOV LDE LDE INT In...

Страница 241: ...it value When MAX upper limit value S1 input value D1 MAX upper limit value When MIN lower limit value S1 input value MAX upper limit value D1 S1 input value Return value Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON the iData1 value is stored into Result if the iData2 data is less than the iData1 data or minimum value the iData3 value is sto...

Страница 242: ...gument Type ST Program Conversion Result Used Instruction REAL Real4 MUX Int1 Real1 Real2 Real3 LD Int1 K1 EMOV Real1 Real4 LD Int1 K2 EMOV Real2 Real4 LD Int1 K3 EMOV Real3 Real4 LD EMOV INT Int4 MUX wCon1 Int1 Int2 Int3 LD wCon1 K1 MOV Int1 Int4 LD wCon1 K2 MOV Int2 Int4 LD wCon1 K3 MOV Int3 Int4 LD MOV DINT Dint4 MUX D0 Dint1 Dint2 Dint3 LD D0 K1 DMOV Dint1 Dint4 LD D0 K2 DMOV Dint2 Dint4 LD D0...

Страница 243: ...to Sn IN Selection target data D1 OUT Selection result When n 1 D1 S1 When n 2 D1 S2 When n n D1 Sn Return value Return Value Description BOOL Execution condition Example of use When execution condition X0 turns ON one of the data stored in iData2 iData3 iData4 and iData5 is stored into Result after judgment made from the data in iData1 M0 MUX_E X0 iData1 iData2 iData3 iData4 iData5 Result For the...

Страница 244: ...lt Remarks D1 S1 S2 S2 S3 Sn 1 Sn Return value Return Value Description BOOL Execution condition Example of use Argument Type ST Program Conversion Result Used Instruction REAL GT_E M0 Real1 Real2 Real3 bBit1 LDE Real1 Real2 ANDE Real2 Real3 OUT M8191 LD M0 AND M8191 SET bBit1 LD M0 ANI M8191 RST bBit1 LDE ANDE OUT LD AND SET ANI RST INT GT_E M0 Int1 Int2 Int3 bBit1 LD Int1 Int2 AND Int2 Int3 OUT ...

Страница 245: ...1 LD M101 ANI M102 ANB LD M102 ANI M103 ANB OUT M8191 LD M0 AND M8191 SET bBit1 LD M0 ANI M8191 RST bBit1 LD ANI ANB OUT AND SET RST STRING GT_E M0 Str1 Str2 Str3 bBit1 LD Str1 Str2 AND Str2 Str3 OUT M8191 LD M0 AND M8191 SET bBit1 LD M0 ANI M8191 RST bBit1 LD AND OUT LD AND SET ANI RST For the usable data type refer to 3 2 2 About ANY type ...

Страница 246: ...lt Remarks D1 S1 S2 S2 S3 Sn 1 Sn Return value Return Value Description BOOL Execution condition Example of use Argument Type ST Program Conversion Result Used Instruction REAL GE_E M0 Real1 Real2 Real3 bBit1 LDE Real1 Real2 ANDE Real2 Real3 OUT M8191 LD M0 AND M8191 SET bBit1 LD M0 ANI M8191 RST bBit1 LDE ANDE OUT LD AND SET ANI RST INT GE_E M0 Int1 Int2 Int3 bBit1 LD Int1 Int2 AND Int2 Int3 OUT ...

Страница 247: ... M101 ORI M102 ANB LD M102 ORI M103 ANB OUT M8191 LD M0 AND M8191 SET bBit1 LD M0 ANI M8191 RST bBit1 LD ORI ANB OUT AND SET ANI RST STRING GE_E M0 Str1 Str2 Str3 bBit1 LD Str1 Str2 AND Str2 Str3 OUT M8191 LD M0 AND M8191 SET bBit1 LD M0 ANI M8191 RST bBit1 LD AND OUT LD AND SET LD ANI RST For the usable data type refer to 3 2 2 About ANY type ...

Страница 248: ...use Argument Type ST Program Conversion Result Used Instruction REAL b_result EQ_E b_select r_data1 r_data2 r_data3 b_data1 LDE r_data1 r_data2 ANDE r_data2 r_data3 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select OUT b_result LDE ANDE OUT LD AND SET ANI RST INT B100 EQ_E M20 D10 D20 D30 M200 LD D10 D20 AND D20 D30 OUT M8191 LD M20 AND M8191 SET M200 LD M20...

Страница 249: ...I X12 ORB ANB OUT M8191 LD b_select AND M8191 SET M20 LD b_select ANI M8191 RST M20 LD b_select OUT b_result LD AND LDI ANI ORB ANB SET RST STRING b_result EQ_E b_select s_ary1 s_ary2 b_data1 LD s_ary1 s_ary2 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select OUT b_result LD OUT LD AND SET ANI RST For the usable data type refer to 3 2 2 About ANY type ...

Страница 250: ...n target data D1 OUT Comparison result Remarks D1 S1 S2 S2 S3 Sn 1 Sn Return value Return Value Description BOOL Execution condition Example of use Argument Type ST Program Conversion Result Used Instruction REAL b_result LE_E b_select r_data1 r_data2 r_data3 b_data1 LDE r_data1 r_data2 ANDE r_data2 r_data3 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select O...

Страница 251: ...sult LDD ANDD OUT LD AND SET ANI RST BOOL b_result LE_E b_select X10 X11 X12 M20 LDI X10 OR X11 LDI X11 OR X12 ANB OUT M8191 LD b_select AND M8191 SET M20 LD b_select ANI M8191 RST M20 LD b_select OUT b_result LDI OR ANB OUT AND SET ANI RST STRING b_result LE_E b_select s_ary1 s_ary2 b_data1 LD s_ary1 s_ary2 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select ...

Страница 252: ...ata D1 OUT Comparison result Remarks D1 S1 S2 S2 S3 Sn 1 Sn Return value Return Value Description BOOL Execution condition Example of use Argument Type ST Program Conversion Result Used Instruction REAL b_result LT_E b_select r_data1 r_data2 r_data3 b_data1 LDE r_data1 r_data2 ANDE r_data2 r_data3 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select OUT b_resul...

Страница 253: ...ult LDD ANDD OUT LD AND SET ANI RST BOOL b_result LT_E b_select X10 X11 X12 M20 LDI X10 AND X11 LDI X11 AND X12 ANB OUT M8191 LD b_select AND M8191 SET M20 LD b_select ANI M8191 RST M20 LD b_select OUT b_result LDI AND ANB OUT LD SET ANI RST STRING b_result LT_E b_select s_ary1 s_ary2 b_data1 LD s_ary1 s_ary2 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select...

Страница 254: ...cription BOOL Execution condition Example of use Argument Type ST Program Conversion Result Used Instruction REAL b_result NE_E b_select r_data1 r_data2 b_data1 LDE r_data1 r_data2 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select OUT b_result LDE OUT LD AND SET ANI RST INT B100 NE_E M20 D10 D20 M200 LD D10 D20 OUT M8191 LD M20 AND M8191 SET M200 LD M20 ANI ...

Страница 255: ...1 LD b_select AND M8191 SET M20 LD b_select ANI M8191 RST M20 LD b_select OUT b_result LD ANI LDI AND ORB OUT SET RST STRING b_result NE_E b_select s_ary1 s_ary2 b_data1 LD s_ary1 s_ary2 OUT M8191 LD b_select AND M8191 SET b_data1 LD b_select ANI M8191 RST b_data1 LD b_select OUT b_result LD OUT LD AND SET ANI RST For the usable data type refer to 3 2 2 About ANY type ...

Страница 256: ...Basic model QCPU Example of use Argument Type ST Program Conversion Result Used Instruction STRING i_data1 LEN s_ary1 LD SM400 LEN s_ary1 i_data1 LD LEN Function definition BOOL LEN_E BOOL EN STRING S1 INT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data whose character string length will be acquired character strin...

Страница 257: ...store the acquired character string data Example of use Argument Type ST Program Conversion Result Used Instruction STRING s_ary1 LEFT s_ary2 i_data1 LD SM400 LEFT s_ary2 s_ary1 i_data1 LD LEFT Function definition BOOL LEFT _E BOOL EN STRING S1 INT n STRING D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be acqu...

Страница 258: ... the acquired character string data Example of use Argument Type ST Program Conversion Result Used Instruction STRING s_ary1 RIGHT s_ary2 i_data1 LD SM400 RIGHT s_ary2 s_ary1 i_data1 LD RIGHT Function definition BOOL RIGHT _E BOOL EN STRING S1 INT n STRING D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be acqui...

Страница 259: ...quired character string data Example of use Argument Type ST Program Conversion Result Used Instruction STRING s_ary1 MID s_ary2 i_data1 i_data2 LD SM400 MOV i_data1 D10239 MOV i_data2 D10238 MIDR s_ary2 s_ary1 D10238 LD MOV MIDR Function definition BOOL MID_E BOOL EN STRING S1 INT n INT POS STRING D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only whe...

Страница 260: ...aracter string data Example of use Argument Type ST Program Conversion Result Used Instruction STRING s_result CONCAT s_ary1 s_ary2 s_ary3 LD SM400 MOV s_ary1 s_result s_ary2 s_result s_ary3 s_result LD MOV Function definition BOOL_ CONCAT_E BOOL EN STRING S1 STRING S2 STRING Sn STRING D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result ...

Страница 261: ...Type ST Program Conversion Result Used Instruction STRING w_Str3 INSERT w_Str1 w_Str2 w_Word1 LD SM400 w_Str2 w_Str1 w_Str3 AND w_Word1 K1 MOV K1 D10238 w_Word1 K1 D10239 MIDW w_Str1 w_Str3 D10238 MOV w_Word1 D10238 LEN w_Str2 D10239 MIDW w_Str2 w_Str3 D10238 LD AND MOV MIDW LEN Function definition BOOL INSERT_E BOOL EN STRING S1 STRING S2 INT POS STRING D1 Argument Argument Name IN OUT Descriptio...

Страница 262: ...ram Conversion Result Used Instruction STRING w_Str2 DELETE w_Str1 w_Word1 w_Word2 LD SM400 LEN w_Str1 D10238 w_Word1 D10238 RIGHT w_Str1 w_Str2 D10238 w_Word2 K1 D10239 AND 10239 K0 MOV K1 D10238 MIDW w_Str1 w_Str2 D10238 LD LEN RIGHT AND MOV MIDW Function definition BOOL DELETE_E BOOL EN STRING S1 INT n INT POS STRING D1 Argument Argument Name IN OUT Description EN IN Execution condition Functio...

Страница 263: ...Str3 REPLACE w_Str1 w_Str2 w_Word1 w_Word2 LD SM400 MOV w_Str1 w_Str3 MOV w_Word1 D10239 MOV w_Word2 D10238 MIDW w_Str2 w_Str3 D10238 LD MOV MOV MIDW Function definition BOOL REPLACE_E BOOL EN STRING S1 STRING S2 INT n INT POS STRING D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Data to be replaced character string da...

Страница 264: ...Result Used Instruction STRING w_Word1 FIND w_Str1 w_Str2 LD SM400 INSTR w_Str2 w_Str1 w_Word1 K1 LD INSTR Function definition BOOL FIND_E BOOL EN STRING S1 STRING S2 INT D1 Argument Argument Name IN OUT Description EN IN Execution condition Function is executed only when the result is TRUE S1 IN Character string to be searched character string data S2 IN Character string to be searched for charac...

Страница 265: ...played for a single error Conversion error list error message cause corrective action No Error Message Cause Corrective Action 1 An unanalyzable character exists C1009 The character string that cannot be analyzed exists As character strings that cannot be analyzed there are the following examples Example 1 2 The format is wrong Example 2 STRING type STRV1 is defined STRV1 abc The symbol is used Ex...

Страница 266: ...of a comment is wrong C1018 The description of the comment is illegal It is not written in the format As illegal descriptions there are the following examples Example 1 A parenthesis is insufficient Example 2 The parenthesis and format is wrong Example 3 There is a space between and Example 4 aaaaa is insufficient Correct the description of the comment 7 Description of a character constant is wron...

Страница 267: ...n A to F are used in hexadecimal Example 3 D0 1234 Define the used variable 10 An error is in element specification of array C1033 The method of specifying the array element is wrong Example 1 Word type array label W_ARY W_ARY 0 1 1 The array was described in the format different from the defined one Correct the description of the array 11 Function 1 is undefined C1049 Function name enters 1 An un...

Страница 268: ... in argument No 2 Use a constant in the specified argument 14 Syntax error C2054 Wrong grammar was described There are the following examples where grammar will be illegal Example 1 D0 0 is not described in the assignment statement Example 2 FOR ARY 0 0 TO D10 BY D20 DO D100 D100 1 END_FOR The array element was specified in the repeat variable Example 3 FOR STR W_TMP 0 TO D10 BY D20 DO D100 D100 1...

Страница 269: ...the loop syntax Describe the EXIT syntax in the loop syntax 17 Description of a constant is wrong C8010 The unsupported data type was used Example 1 Timer label wTime wTime T 1111111111111111 1s The used data type is not supported Correct the data type 18 Undefined FB was called C8011 The undefined FB was called There are the following examples of using undefined FBs Example 1 FB_1 The undefined F...

Страница 270: ... name enters 1 The variable to which a value cannot be assigned has been specified as the I O variable or output variable of the called FB Example 1 I O variable IO_TEST1 IO_TEST1 TRUE Diverted FB name FB1 A constant is passed to the I O variable Example 2 Input variable IN1 Output variable OUT1 Diverted FB name FB1 Word type constant label wCon FB1 IN1 1 OUT1 wCon A constant label is passed to th...

Страница 271: ...e wrong Boolean constant is described Change the description of the Boolean constant into the usable one 27 It is used except the INT type for the element number of an array variable C8021 Other than the word type is used for element specification Example 1 Bit type array BoolAry1 Real number type label RealVal BoolAry1 RealVal x0 Example 2 Bit type array BoolAry1 BoolAry1 D0 D1 The wrong element ...

Страница 272: ...as a FB output is used C8025 FB variable name enters 1 and FB name enters 2 The FB variable that cannot be used as FB output was used Example 1 Internal variable word type TEMP1 Diverted FB name FB1 D100 FB1 TEMP1 The internal variable is used as FB output Use the correct FB variable and describe it as FB output 32 Variable 1 FB 2 cannot be used other than an argument C8026 FB variable name enters...

Страница 273: ...able does not match Example 1 Word type array IntAry1 0 1 M1 BACOS_MD TRUE IntAry1 D1 Correct the type in the specified error location of the function argument or correct the variable type 36 Type mismatch for 1 C8030 Operator such as or enters 1 The left member of the variable device differs in data type from the right member Example 1 D0 TRUE The bit type is assigned to the word device Example 2...

Страница 274: ...titution is impossible for a constant variable inside of FOR syntax C8033 An attempt was made to write to the constant variable There is the following program example for the above error Example 1 Constant label tei FOR tei W10 TO W20 BY W30 DO R10 R20 END_FOR Write to the constant variable in FOR syntax cannot be performed 40 By FOR syntax variables other than INT DINT type are used C8034 The var...

Страница 275: ... keyword 1 is missing C8039 DO UNTIL OF THEN or DO enters 1 DO is not described in the WHILE syntax Describe DO in the WHILE syntax 42 Illegal parameter for call of 1 C8040 FB name enters 1 The description of the input output or I O variable of the called FB is illegal Example 1 Diverted FB name FB1 FB1 X10 Example 2 Input variable IN1 Diverted FB name FB1 FB1 FB1 IN1 Correct the call description ...

Страница 276: ...he control syntax is too long Shorten the control syntax program e g reduce the number of nesting level or reduce the number of conditions 45 The value of the execution conditions EN of function 1 is not right C9019 Function name enters 1 In a specific function TRUE must always be entered into execution condition EN but FALSE has been entered Example 1 EI_M FALSE Example 2 DI_M 0 Example 3 COM_M F...

Страница 277: ...whose element number is variable was specified in the specified input variable of the MELSEC function Example 1 BMOV_M X0 MAX D0 D1 D2 D100 D200 The function was used in the input variable Example 2 TO_M X0 D0 1 D1 D2 D3 The operation expression was used in the input variable Example 3 DTO_M X0 Dint1 K8X0 D1 D2 D3 The operation expression was used in the input variable Example 4 BKRST_M X0 ARY D0 ...

Страница 278: ...678901234567890 123 When the number of character string characters is 33 Change the character string to within 32 characters 56 The illegal device or value beyond the range is used F0137 1 Illegal conversion result is displayed in 1 An illegal device or a numeric value outside the range is used Example 1 M0 COUNTER_M TRUE CC2 1 Correct the device or the numeric value to within the range 57 Devices...

Страница 279: ...rgument and return value of the INSERT _E function 61 An illegal device type is used C10000 The illegal device type timer retentive timer counter pointer is used Example 1 Timer1 0 The device type timer was used The illegal device type timer retentive timer counter pointer cannot be used Change it into the applicable device type 62 The device and numerical value which were specified can be over it...

Страница 280: ...e array element specification Correct the nesting of the array element specification to up to five levels Six or more levels are not supported 17 or more levels will result in an error 65 Specified FB name is already used C10004 An FB call is made two or more times under the same FB name in the program Example 1 Diverted FB name FB1 I O variable name INOUT1 FB1 INOUT1 D100 FB1 INOUT1 D101 Make an ...

Страница 281: ...C function Example 1 RST_M M0 ddev1 The double word type was specified in the second argument of function RST_M Example 2 DECO_M M0 Real1 K8 Real2 The real number type was specified in the second fourth argument of function DECO_M Example 3 COMRD_S_MD M0 ddev1 Str32 The double word type was specified in the second argument of function COMRD_SD_MD Use the variable of correct data type in the argume...

Страница 282: ...ING TIME UDINT UINT USINT WORD DO DT DWORD DWORD_TO_BOOL BYTE DINT INT REAL SINT STRING UDINT UINT USINT WORD DX DY D_BCD_TO_DINT INT SINT E E ELSE ELSIF EN END END_ACTION END_CASE END_FOR END_FUNCTION END_PROGRAM END_IF END_REPEAT END_RESOURCE END_STEP END_STRUCT END_TRANSITION END_TYPE END_VAR END_WHILE ENQ EQ EQ_STRING EXIT F F FALSE FD FOR FROM FUNCTION FUNCTION_BLOCK FX FY F_EDGE F_TRIG G G G...

Страница 283: ... VAR_TEMP VD VOID W W WHILE WITH WORD WORD_TO_BOOL BYTE DINT DWORD INT REAL SINT STRING UDINT UINT USINT WORKR WORKRP WORKW WORKWP WRITE WSTRING W_BCD_TO_DINT INT SINT X X XOR XORN Y Y Z Z ZNRF ZR Precaution on label name 1 A space cannot be used 2 A numeral cannot be used as the first character 3 The following characters cannot be used _ An error occurs if an underscore exists at the end of a cha...

Страница 284: ...S DIS_M INC INC_M BKBCD BKBCD_M DLIMIT DLIMIT_MD MIDR MIDR_M BKBIN BKBIN_M DMAX DMAX_M NDIS NDIS_M BKOR BKOR_M DMIN DMIN_M NEG NEG_M BKRST BKRST_M DNEG DNEG_M NUNI NUNI_M BKXNR BKXNR_M DOR DOR_M OUT OUT_M BKXOR BKXOR_M DRCL DRCL_M PLOW PLOW_M BMOV BMOV_M DRCR DRCR_M POFF POFF_M BRST BRST_M DROL DROL_M PSCAN PSCAN_M BSET BSET_M DROR DROR_M PSTOP PSTOP_M BSFL BSFL_M DSER DSER_M QCDSET QCDSET_M BSFR ...

Страница 285: ...Works2 GX Developer GX Works2 GX Developer GX Works2 GX Developer STOP STOP_M WAND WAND_M WXNR WXNR_M SUM SUM_M WDT WDT_M WXOR WXOR_M SWAP SWAP_MD WOR WOR_M XCH XCH_M TEST TEST_MD WSUM WSUM_M ZONE ZONE_MD UNI UNI_M WTOB WTOB_MD ...

Страница 286: ...ve OR 3 devices DXOR_3_M 5 45 32 bit data exclusive OR 3 devices DXOR_3_M 5 45 32 bit data left rotation carry flag not included DROL_M 5 52 32 bit data logical product 2 devices DAND_M 5 40 32 bit data logical product 3 devices DAND_3_M 5 40 32 bit data logical sum 2 devices DOR_M 5 42 32 bit data logical sum 3 devices DOR_3_M 5 43 32 bit data maximum value retrieval DMAX_M 5 66 32 bit data minim...

Страница 287: ... format data floating point EREXP_M 5 87 BCD type COS operation BCOS_MD 5 96 BCD type COS 1 operation BACOS_MD 5 97 BCD type SIN operation BSIN_MD 5 95 BCD type SIN 1 operation BASIN_MD 5 97 BCD type TAN operation BTAN_MD 5 96 BCD type TAN 1 operation BATAN_MD 5 98 BCD_M BIN BCD conversion 5 23 BCDDA_S_MD BCD 4 digit decimal ASCII conversion 5 75 BCOS_MD BCD type COS operation 5 96 BDIVID_M Divisi...

Страница 288: ...n type BOOL double precision integer type DINT conversion 6 3 BOOL_TO_INT _E Boolean type BOOL integer type INT conversion 6 4 BOOL_TO_STR _E Boolean type BOOL character string type STRING conversion 6 5 BOOL 3 3 Boolean type BOOL character string type STRING conversion BOOL_TO_STR _E 6 5 Boolean type BOOL double precision integer type DINT conversion BOOL_TO_DINT _E 6 3 Boolean type BOOL integer ...

Страница 289: ...ata maximum value retrieval MAX_M 5 65 Data minimum value retrieval MIN_M 5 66 Data search SER_M 5 59 Data sort S SORT_M 5 67 DATEMINUS_M Subtraction of clock data 5 110 DATEPLUS_M Addition of clock data 5 109 DATERD_MD Read of clock data 5 107 DATEWR_MD Write of clock data 5 108 DBAND_MD 32 bit data dead band control 5 102 DBCD_M 32 bit BIN BCD conversion 5 23 DBCDDA_S_MD BCD 8 digit decimal ASCI...

Страница 290: ... BDIVID_M 5 17 Division of BCD 8 digit data DBDIVID_M 5 18 DLIMIT_MD 32 bit data upper lower limit control 5 100 DMAX_M 32 bit data maximum value retrieval 5 66 DMIN_M 32 bit data minimum value retrieval 5 67 DNEG_M 2 complement of 32 bit BIN 5 30 DOR_3_M 32 bit data logical sum 3 devices 5 43 DOR_M 32 bit data logical sum 2 devices 5 42 Double precision integer type DINT Boolean type BOOL convers...

Страница 291: ..._E_MD 5 91 Floating point BIN conversion INT_E_MD 5 25 Floating point character string conversion ESTR_M 5 82 Floating point COS operation COS _E 6 26 Floating point COS 1 operation ACOS_E_MD 5 90 Floating point COS 1 operation ACOS _E 6 29 Floating point natural exponential operation EXP_E_MD 5 92 Floating point natural logarithm operation LOG_E_MD 5 93 Floating point radian angle conversion DEG_...

Страница 292: ...NT_TO_DINT _E 6 11 Integer type INT real number type REAL conversion INT_TO_REAL _E 6 12 Intelligent function module 1 word data read FROM_M 5 71 Intelligent function module 1 word data write TO_M 5 72 Intelligent function module 2 word data read DFRO_M 5 71 Intelligent function module 2 word data write DTO_M 5 72 Interrupt disable DI_M 5 37 Interrupt enable EI_M 5 37 L Labels 3 11 LE_E Less than ...

Страница 293: ..._M Output to device 5 4 Output to device OUT_M 5 4 P PLOW_M Program low speed execution registration 5 113 POFF_M Program output OFF standby 5 112 Program low speed execution registration PLOW_M 5 113 Program output OFF standby POFF_M 5 112 Program scan execution registration PSCAN_M 5 113 Program standby PSTOP_M 5 112 PSCAN_M Program scan execution registration 5 113 PSTOP_M Program standby 5 112...

Страница 294: ...n 6 25 SORT_M Data sort S 5 67 SQR_E_MD Floating point square root 5 92 SQRT _E Square root 6 22 Square root SQRT _E 6 22 SRND_M Sequence change 5 94 Stop STOP_M 5 9 STOP_M Stop 5 9 STR_S_MD BIN character string conversion 5 80 STR_TO_BOOL _E Character string type STRING Boolean type BOOL conversion 6 17 STR_TO_DINT _E Character string type STRING double precision integer type DINT conversion 6 18...

Страница 295: ... DO syntax 4 17 WOR_3_M Logical sum 3 devices 5 42 WOR_M Logical sum 2 devices 5 41 WORD_M 32 bit BIN 16 bit BIN conversion 5 27 Write of clock data DATEWR_MD 5 108 WSUM_M Total value calculation 5 68 WTOB_MD Byte unit data disconnection 5 64 WXNR_3_M NOT exclusive OR 3 devices 5 47 WXNR_M NOT exclusive OR 2 devices 5 46 WXOR_3_M Exclusive OR 3 devices 5 44 WXOR_M Exclusive OR 2 devices 5 44 X XCH...

Страница 296: ...ed not to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including repair parts is not available after production is discontinued 3 Overseas service O...

Страница 297: ......

Страница 298: ...ithout notice 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 ...

Отзывы: