Table of Contents

Advertisement

Quick Links

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELSEC-Q QnPHCPU

  • Page 3: Safety Cautions

    • SAFETY CAUTIONS • (You must read these cautions before using the product) In connection with the use of this product, in addition to carefully reading both this manual and the related manuals indicated in this manual, it is also essential to pay due attention to safety and handle the product correctly.
  • Page 4: Revisions

    This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 5: Table Of Contents

    INTRODUCTION Thank you for purchasing the Mitsubishi MELSEC-Q Series (Q mode) PLC. Before using the product, please read this manual carefully to develop full familiarity with the functions and performance of the Q Series (Q mode) PLC you have purchased, so as to ensure correct use. CONTENTS SAFETY CAUTIONS.............................A- 1 REVISIONS ..............................A- 2...
  • Page 6 4. HOW TO EXECUTE PROCESS CONTROL INSTRUCTIONS 4 - 1 to 4 - 2 4.1 Execution Time and Control Cycle......................4 - 1 4.2 Concept of Program ..........................4 - 2 5. EXECUTION CONDITION SWITCHING AND FUNCTIONS 5 - 1 to 5 - 3 5.1 Execution Condition Switching.......................
  • Page 7 9.10 Integral (S.I) ............................9 - 61 9.11 Derivative (S.D) ............................ 9 - 63 9.12 Dead Time (S.DED) ..........................9 - 65 9.13 High Selector (S.HS) ..........................9 - 68 9.14 Low Selector (S.LS) ..........................9 - 70 9.15 Middle Value Selection (S.MID) ......................9 - 72 9.16 Average Value (S.AVE)........................
  • Page 8 14. ERROR CODE 14- 1 to 14 - 2 14.1 Error Code List ........................... 14 - 1 APPENDICES APP - 1 to APP - 21 APPENDIX1 EXAMPLE PROGRAM.......................APP - 1 APPENDIX 2 LOOP TAG MEMORY LIST ....................APP - 5 2.1 PID Control (SPID), 2-degree-of-freedom PID Control (S2PID), Sample PI Control (SSPI)..APP - 5 2.2 I-PD Control (SIPD), Blend PI Control (SBPI)................APP - 7 2.3 Manual Output (SMOUT), Monitor (SMON)...................APP - 9 2.4 Manual Output with Monitor (SMWM), PIDP Control (SPIDP)............APP -10...
  • Page 9: About Manuals

    ABOUT MANUALS The manuals related to the Q/QnACPU are listed in the table below. Please order those you require. Related Manuals Manual Number Manual Name (Model Code) QCPU User's Manual (Hardware Design, Maintenance and Inspections) SH-0800483ENG Describes the specifications of the CPU module, power supply module, base unit, expansion cables, and (13JR73) memory card.
  • Page 10 MEMO A - 8 A - 8...
  • Page 11: Overview

    1 OVERVIEW MELSEC-Q 1 OVERVIEW This manual describes the process control instructions equipped for the QnPHCPU/QnPRHCPU. 1.1 Features The process control instructions have the following features. (1) Use of floating-point data Capable of handling floating-point type real number data, the instructions can perform wide- range and accurate operations.
  • Page 12 1 OVERVIEW MELSEC-Q (3) Free combination of process control instructions for application to a wide range of control As an option, a process control instruction can be inserted in a loop that links process control instructions. Add the square root operation instruction (S.SQR) to perform the square root operation of an input signal to provide an output signal as shown below.
  • Page 13 1 OVERVIEW MELSEC-Q (5) PID algorithm using a velocity type incomplete differential format Partial differential has the following advantages over the complete differential format. (a) The differential gain is 1/ and the limit value can be set. (b) The output contains time amplitude, so the system actually responds to the operation edge so the derivative operation makes the movement valid.
  • Page 14: Pid Control Overview

    1 OVERVIEW MELSEC-Q 1.2 PID Control Overview PID control is applied to the process control of flow rate, speed, air volume, temperature, tension, compounding or like. In a configuration shown in Fig. 1.1, PID control maintains the object to be controlled at a preset value.
  • Page 15: Forward Oprration And Reverse Operation

    1 OVERVIEW MELSEC-Q 1.3 Forward Operation and Reverse Operation (1) Forward operation is the action that increases the manipulated value when the process value increases more than the set value. (2) Reverse operation is the action that increases the manipulated value when the process value is decreasing more than the set value.
  • Page 16: Pid Control

    1 OVERVIEW MELSEC-Q 1.4 PID Control This section explains "proportional operation", "integral operation" and "derivative operation" performed for PID control using the process control instructions. 1.4.1 Proportional operation (P operation) This section explains the control method using proportional operation. (1) Proportional operation is the action that compares the deviation (difference between the set value and the process value) to find the manipulated value.
  • Page 17: Integral Operation (I Operation)

    1 OVERVIEW MELSEC-Q 1.4.2 Integral operation (I operation) This section explains the control method using integral operation. (1) Integral operation is the operation that continuously changes the manipulated value to eliminate deviation when there is deviation. This operation can eliminate the offset that occurs during control performed by a proportional operation.
  • Page 18: Derivative Operation (D Operation)

    1 OVERVIEW MELSEC-Q 1.4.3 Derivative operation (D operation) This section explains the control method using the derivative operation. (1) The derivative operation is an operation that adds the proportional manipulated value to the change speed to eliminate deviation when a deviation has occurred. The derivative operation can prevent large changes in the object control from disturbances.
  • Page 19: Pid Operation

    1 OVERVIEW MELSEC-Q 1.4.4 PID operation This section explains the control operation using combinations of proportional operation (P operation), integral operation (I operation), and derivative operation (D operation). (1) The PID operation controls the calculated manipulated value using (P D) operation. (2) The PID operation when the deviation is a constant value stepped response is shown in Fig.
  • Page 20: Structure And Combinations Of Process Control Instructions

    2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q 2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS 2.1 Instruction Configuration The instructions that can be used by the process control instructions can be divided into the "instruction part" and "device part". The instruction part and device part are as follows.
  • Page 21: Method For Specifying The Data In A Device

    2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q 2.2 Method for Specifying the Data in a Device The following 4 types of data can be used by the process control instructions. Data that can be handled Bit data by process control instruction Numeric data Integer data Word data...
  • Page 22: Double Word (32-Bit) Data

    2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q 2.2.3 Double word (32-bit) data Double word data is 32-bit numeric data. • Decimal constant....K-2147483648 to K2147483647 • Hexadecimal constant....H00000000 to HFFFFFFFF When using double word data, specify the word device to be used in the lower-order 16 bits. The 32-bit data is stored into the (specified word device number) and ((specified word device number) Example) When D10 is specified for double word data, D10 and D11 are used.
  • Page 23: Process Control Instruction Operation Error

    2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q 2.2.5 Process control instruction operation error Operation errors from these process control instruction are stored in the following special registers. For information regarding other than operation errors, refer to the error codes listed in the QCPU(Q Mode)/QnACPU Programming Manual (Common Instructions).
  • Page 24: Index Qualification

    2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q 2.2.8 Index qualification Index qualification usable with the process control instructions is the same as the one usable with the basic instructions of the QnPHCPU/QnPRHCPU. 2.3 Basic Loop Types Available by Combinations of Process Control Instructions Loop type Structure...
  • Page 25 2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q Loop type Structure Application A valve or like is controlled ON/OFF in a Batch counter process of batch preparation for a tank or S.PSUM S.BC INPUT OUTPUT (SBC) like. Program setting device This is output in accordance with the (SPGS) S.PGS...
  • Page 26: Process Control Instructions And Data Configuration

    3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q 3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA 3.1 Process Control Instructions and Data Configuration This section explains the data structure (data flow) used for process control instructions. (a) Configuration when using loop tag 1) The loop units have common storage areas that show the control information.
  • Page 27 3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q (b) Loop tag memory and operation constant locations in ladder diagram Ladder diagram Use name instruction common table. Loop tag memory (96 words) Loop tag memory setting Instruction Standard Item...
  • Page 28: Local Work Memory

    3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q 3.2 Local Work Memory The local work memory is used as a temporary storage area in process control instruction operation. (Memory used for micro blocks only) The following instructions use the local work memory. Instruction name Remarks S.LLAG (Lead-Lag)
  • Page 29: Data Used For Process Control Instructions

    3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q 3.3 Data Used for Process Control Instructions The following data are used for the process control instructions. • Loop tag memory Section 3.3.1 • Input data Section 3.3.2 •...
  • Page 30: Input Data

    3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q (3) Loop tag past value memory (a) The loop tag past value memory is an area used by the QnPHCPU/QnPRHCPU system at the time of process control instruction execution. The user cannot write data to this memory during run.
  • Page 31: Block Memory

    3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q 3.3.3 Block memory The block memory is an area that stores the output information of the corresponding process control instruction. The block memory has "block words" and "block bits". The application of the block memory changes depending on the used instruction.
  • Page 32: Loop Tag Memory Allocation Contents

    3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q 3.3.5 Loop tag memory allocation contents The loop tag memory allocation contents are shown below. After setting some values are changed by Show the number of Instructions Abbreviated name the numbers from the operation results.
  • Page 33 3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q S: Stored by the system Table 3.1 ALM details list U: Set by the user Flag Name Abbreviation Description establishment conditions Shows the loop stop status. Changes the loop mode to manual. Stop alarm Conducts stop alarm processing for the output value (BW) and alarm signal.
  • Page 34 3 DATA USED FOR PROCESS CONTROL INSTRUCTIONS AND HOW TO SPECIFY DATA MELSEC-Q (c) MODE The process control instructions have the following operation modes that satisfy the following operations in a system connected to an operator station, PLC, host computer, machine side operation panel and like.
  • Page 35: How To Execute Process Control Instructions

    4 HOW TO EXECUTE PROCESS CONTROL INSTRUCTIONS MELSEC-Q 4 HOW TO EXECUTE PROCESS CONTROL INSTRUCTIONS 4.1 Execution Cycle and Control Cycle (1) Execution cycle (a) An execution cycle is an interval at which the process control instruction is executed. (b) There are the following methods to execute the process control instruction in each execution cycle.
  • Page 36: Concept Of Program

    4 HOW TO EXECUTE PROCESS CONTROL INSTRUCTIONS MELSEC-Q 4.2 Concept of Program [Program example using S.2PID instruction at execution cycle of 1s] Loop tag memory setting Loop tag memory setting Operation constant setting Operation constant setting Setting of data for S.IN, S.PHPL, S.2PID and S.OUT1 Execution (1s)
  • Page 37: Execution Condition Switching And Functions

    5 EXECUTION CONDITION SWITCHING AND FUNCTIONS MELSEC-Q 5 EXECUTION CONDITION SWITCHING AND FUNCTIONS 5.1 Execution Condition Switching 5.1.1 Loop RUN/STOP If any loop component such as a detector or operation end other than the PLC fails, each loop can be run/stopped to perform the maintenance of the corresponding loop. The "SPA"...
  • Page 38: Functions

    5 EXECUTION CONDITION SWITCHING AND FUNCTIONS MELSEC-Q 5.2 Functions 5.2.1 Tracking function The tracking function includes the "bumpless function" and "output limiter processing". (1) Bumpless function The bumpless function prevents manipulated value (MV) output stepping changes when switching from the automatic mode to manual mode and continuously controls MV output. (2) Output limiter processing function The output limiter processing function limits the upper limit and lower limit of the manipulated value (MV) output by the PID operation during the automatic mode.
  • Page 39: Loop Selector Tracking

    5 EXECUTION CONDITION SWITCHING AND FUNCTIONS MELSEC-Q (2) Make the following settings to perform tracking. (Tracking is performed when the operation mode is switched to other than CAS, CSV or CCB.) For 2-degree-of-freedom PID (S.2PID), set the following operation constant items to specify tracking.
  • Page 40: Instruction List

    6 INSTRUCTION LIST MELSEC-Q 6 INSTRUCTION LIST 6.1 How to Read the Instruction List Table The process control instruction is largely divided into the I/O control instructions, control operation instructions, compensation operation instructions, arithmetic operation instructions, comparison operation instructions, and auto tuning instructions. Table 6.1 How to read the instruction list Explanation 1) Classifies the instructions by application.
  • Page 41: Functions

    6 INSTRUCTION LIST MELSEC-Q 6.2 Functions 6.2.1 I/O control instruction Table 6.2 I/O Control instruction See for Instruction Number of Category Symbol Processing Details Descript Symbols Basic Steps I/O control Conducts the input data (PV) instruction Upper/lower limit check, input S.IN limiter processing, engineering 8- 1...
  • Page 42: Control Operation Instruction

    6 INSTRUCTION LIST MELSEC-Q 6.2.2 Control operation instruction Table 6.3 Control Operation Instruction See for Instruction Number of Category Symbol Processing Details Descript Symbols Basic Steps Control Conducts process value operation derivative type PID operations. instruction (Incomplete derivative) Performs S.PID SV setting processing, tracking S.PID S1 D1...
  • Page 43 6 INSTRUCTION LIST MELSEC-Q Table 6.3 Control Operation Instruction See for Instruction Number of Category Symbol Processing Details Descript Symbols Basic Steps Control Conducts integral operations on operation the input data and outputs the S1 D1 S2 D2 9-61 instruction operation results.
  • Page 44: Compensation Operation Instruction

    6 INSTRUCTION LIST MELSEC-Q 6.2.3 Compensation operation instruction Table 6.4 Compensation Operation Instruction See for Instruction Number of Category Symbol Processing Details Descript Symbols Basic Steps Compensa- Outputs the value that follows tion S.FG the function generator pattern 10- 1 S.FG S1 D1 S2 D2 operation...
  • Page 45: Comparison Operation Instruction

    6 INSTRUCTION LIST MELSEC-Q 6.2.5 Comparison operation instruction Table 6.6 Comparison Operation Instruction See for Instruction Number of Category Symbol Processing Details Descript Symbols Basic Steps Comparison Compares the input data and 12- 1 S1 D1 S2 D2 operation outputs the result of comparison. instruction Compares the input data and 12- 3...
  • Page 46: How To Read Instructions

    7 HOW TO READ INSTRUCTIONS MELSEC-Q 7 HOW TO READ INSTRUCTIONS The following format will be used to explain to read instructions presented hereafter. 1) Shows the item No. in the instruction summary. is added to devices that can be used the instruction. The usage classifications for devices that can be used is shown below.
  • Page 47 7 HOW TO READ INSTRUCTIONS MELSEC-Q 3) This shows the expression and instruction execution conditions in the circuit mode. Executed once Executed once Execution conditions Normal execution Executed during on during on during off Displays the No. of the Nothing recorded Nothing recorded Nothing recorded explanation page...
  • Page 48 7 HOW TO READ INSTRUCTIONS MELSEC-Q upper Upper *1: When SEI or ERRI in the alarm detection inhibition (INH) is set to 1, SEA, BB1, BB2, and BB3 show 0 since the alarm is prohibited. Upper 8) Explains each processing of the instruction. 7 - 3 7 - 3...
  • Page 49 7 HOW TO READ INSTRUCTIONS MELSEC-Q Range check ". 9) Indicates the condition for error occurrence and the error number. For errors other than the one described, refer to the QCPU (Q Mode)/QnACPU Programming Manual (Common Instructions). 7 - 4 7 - 4...
  • Page 50: I/O Control Instructions

    8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8 I/O CONTROL INSTRUCTIONS 8.1 Analog Input Processing (S.IN) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.IN...
  • Page 51 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.IN instruction is shown below. (The numerals (1) to (5) in the diagram indicate the order of the processing.) HH, H, L, LL NMAX, NMIN EMAX, EMIN Engineering Range check Input limiter...
  • Page 52 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Engineering Real EMAX conversion -999999 to 999999 100.0 number upper limit Engineering Real EMIN conversion -999999 to 999999 number lower limit Input upper Real NMAX -999999 to 999999...
  • Page 53 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Processing contents (1) Range check (a) A range check is performed on the input value (E1). An alarm is output if the input value (E1) exceeds the upper/lower limit value. Range check result (alarm output) Range check Condition BB1, SEA...
  • Page 54 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (3) Engineering value reverse conversion The result (T1) of the input limiter is converted reversely from the engineering value according to the following expression. EMAX NMIN (EMAX EMIN) EMIN NMAX NMIN EMIN NMIN NMAX (4) Digital filter The input value (E1) is digitally filtered according to the following expression.
  • Page 55: Output Processing-1 With Mode Switching (S.out1)

    8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.2 Output Processing-1 with Mode Switching (S.OUT1) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.OUT1 S.OUT1...
  • Page 56 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.OUT1 instruction is shown below. (The numerals (1) to (6) in the diagram indicate the order of the processing.) MH, ML, DML NMAX, NMIN or like Change rate, Output Mode Input addition...
  • Page 57 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.OUT1 instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input data Input value Real -999999 to 999999 number Real Output value (-999999 to 999999) number Alarm Block...
  • Page 58 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Output upper Real -10 to 110 100.0 limit value number Output lower Real -10 to 110 limit value number Output Real Loop tag change rate 0 to 100 100.0...
  • Page 59 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (2) Input addition processing The temporary MV (T) is calculated on the basis of the input value (E1 MV). (a) When the tracking flag (TRKF) of the alarm detection inhibition (INH) is 1, the following processing is performed.
  • Page 60 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (4) Reset windup If the manipulated value (MV) exceeds the upper/lower limit value, the following operation is performed to return it to the upper/lower limit value and enable immediate response when the deviation is inverted. However, when the integral constant (T1) is 0, the reset windup processing is not performed.
  • Page 61: Output Processing-2 With Mode Switching (S.out2)

    8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.3 Output Processing-2 with Mode Switching (S.OUT2) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.OUT2 S.OUT2...
  • Page 62 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.OUT2 instruction is shown below. (The numerals (1) to (4) in the diagram indicate the order of the processing.) MH, ML, DML NMAX, NMIN Change rate, Output Mode upper/lower conversion...
  • Page 63 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.OUT2 instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input data -999999 to 999999 value(MV) number Real Output value (-999999 to 999999) number Alarm Block...
  • Page 64 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (2) Execution cycle ( T) Set the execution cycle in SD1500 and SD1501 as real numbers. Processing contents (1) Mode judgment Either of the following processings is performed depending on the operation mode (MODE). (a) When the operation mode (MODE) is any of MAN, CMB, CMV and LCM (alarm clear processing) 1) MHA, MLA and DMLA of the alarm detection (ALM) are turned to 0.
  • Page 65 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (4) Loop stop processing (a) Setting 1 in SPA of the alarm detection (ALM) selects a loop stop. A loop stop performs the following processing and terminates the S.OUT2 instruction. 1) BW retains the last value. 2) DMLA, MHA and MLA of the alarm detection (ALM) are turned to 0.
  • Page 66: Manual Output (S.mout)

    8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.4 Manual Output (S.MOUT) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.MOUT S.MOUT...
  • Page 67 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.MOUT instruction is shown below. (The numerals (1) to (3) in the diagram indicate the order of the processing.) NMAX, NMIN MAN or like Mode Output judgment conversion RUN(SPA 0) AUT or like...
  • Page 68 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.MOUT instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Block Real Output value (-999999 to 999999) memory number Output Real NMAX conversion -999999 to 999999 100.0 number Operation...
  • Page 69 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (3) Loop stop processing (a) Setting 1 in SPA of the alarm detection (ALM) selects a loop stop. A loop stop performs the following processing and terminates the S.MOUT instruction. 1) BW retains the last value. 2) The operation mode (MODE) is changed to MAN.
  • Page 70: Time Proportioning(S.duty)

    8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.5 Time Proportioning(S.DUTY) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.DUTY S.DUTY Set data...
  • Page 71 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.DUTY instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) MH, ML, DML CTDUTY or like Output Change rate, Mode Input addition Output...
  • Page 72 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.DUTY instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input value Real Input data -999999 to 999999 ( MV) number BW1 Output bit 16Bit (0: OFF) (1: ON) Block...
  • Page 73 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Output upper Real -10 to 110 100.0 limit value number Output lower Real -10 to 110 limit value number Output change Real 0 to 100 100.0 Loop tag rate limit value...
  • Page 74 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Processing contents (1) Mode judgment Either of the following processings is performed depending on the operation mode (MODE). (a) When the operation mode (MODE) is any of MAN, CMB, CMV and LCM (alarm clear processing) 1) MHA, MLA and DMLA of the alarm detection (ALM) are turned to 0.
  • Page 75 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (3) Change rate, upper/lower limiter Change rate and upper/lower limit checks are performed on a difference between the temporary MV (T) and manipulated value (MV), and the data and alarm are output after the limiter processings. (a) The change rate limiter performs the following operation and outputs the result of the operation to BB4 and DMLA.
  • Page 76 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (5) Output ON time conversion processing (a) When the control output cycle (CTDUTY) is reached, the output ON counter is calculated with the following expression. At this time, the output counter is cleared (to 0). CTDUTY OutputON Counter The output ON counter rounds off a fraction to no decimal places.
  • Page 77: Batch Counter (S.bc)

    8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.6 Batch Counter (S.BC) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.BC S.BC...
  • Page 78 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.BC instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input data Input value 0 to 2147483647 32Bit BW1 Output1 16Bit BW2 Output2 (0: OFF) (1: ON) Block memory...
  • Page 79 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value +124 Loop tag past value Used by the system as a work area. memory *2 *3 +127 *1: The data of the item(s) where the values within the recommended range are given in the parentheses are stored by the system. Users cannot set the data.
  • Page 80 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (2) Change rate check processing Performs a change rate alarm check during the change rate alarm check time (CTIM) specified in the loop tag memory. The change rate alarm check compares the change of the input value (E1) with the change rate alarm value (DPL) in each execution cycle ( T).
  • Page 81: Pulse Integration (S.psum)

    8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.7 Pulse Integration (S.PSUM) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.PSUM S.PSUM...
  • Page 82 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (1) Operation performed when the integration pattern is set to "integrated value returns to 0 when the integration upper limit value is exceeded" Integration start Reset Start Reset Start Reset signal (e1) When e1 turns OFF e2 should also turn OFF.
  • Page 83 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.PSUM instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Use the ring counter of 16 bits or more. • 16-bit ring counter 00000000 0000FFFF 00000000 •...
  • Page 84 8 I/O CONTROL INSTRUCTIONS MELSEC-Q Symbo Standard Specified position Name Recommended range Unit Data format Store value Loop tag past value +116 Used by the system as a work area. memory +117 *2 *3 *1: The data of the item(s) where the values within the recommended range are given in the parentheses are stored by the system. Users cannot set the data.
  • Page 85 8 I/O CONTROL INSTRUCTIONS MELSEC-Q (3) Output conversion In the output conversion, the following processing is performed for the integrated value (T2, T3). SUMPTN Condition BW1, SUM1 BW2, SUM2 remainder of T2 / HILMT HILMT SUM1 remainder of T2 / HILMT SUM2 Others SUM1...
  • Page 86: Control Operation Instructions

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9 CONTROL OPERATION INSTRUCTIONS 9.1 Basic PID (S.PID) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.PID...
  • Page 87 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.PID instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RL, RH P, I, D, MTD, CT DVL, DVLS DV GW, GG Gain K SV setting...
  • Page 88 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.PID instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Output value Real (-999999 to 999999) ( MV) number Block...
  • Page 89 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF Operation +1 MODE mode 16bit 0 to FFFF Alarm 4000 detection 16bit DVLA, MHA, MLA 0: Loop RUN (0: Without alarm) 1: Loop STOP (1: With alarm) 0 to FFFF...
  • Page 90 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Gap gain 0 to 999999 number Loop tag MV Inside memory Real operation (-999999 to 999999) number value Loop tag past value Used by the system as a work area.
  • Page 91 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) SV setting processing Either of the following processings is performed depending on the operation mode (MODE) setting. (a) When the operation mode (MODE) is any of CAS, CCB and CSV 1) When the set value (E2) is specified, engineering value conversion is performed with the following expression and then "(2) Tracking processing"...
  • Page 92 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) PID operation PID operation is performed with the following operation expression. Item Operation expression When forward operation {(PV (PN 1) When reverse operation (PN 0) {(DV BW ( MV) Gain (P), M : Derivative gain (MTD) : Integral constant (I), T : Derivative constant (D) In the following case, however, note that special processing will be performed.
  • Page 93 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (7) Control cycle judgment (a) If the specified control cycle is not reached, BW ( MV) is turned to 0 and the S.PID instruction is terminated. (b) When the specified control cycle is reached, "(1) SV setting processing" is performed. Error •...
  • Page 94: 2-Degree-Of-Freedom Pid Control (S.2Pid)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.2 2-degree-of-freedom PID Control (S.2PID) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.2PID S.2PID...
  • Page 95 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.2PID instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RL, RH DV GW, GG P, I, D, MTD, CT DVL, DVLS Gain K 2-degree-of-...
  • Page 96 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.2PID instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Output value Real (-999999 to 999999) ( MV) number Block...
  • Page 97 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF +1 MODE Operation mode 16bit 0 to FFFF Alarm detection 4000 16bit DVLA, MHA, MLA 0: Loop RUN (0: Without alarm) 1: Loop STOP (1: With alarm) 0 to FFFF...
  • Page 98 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Gap gain 0 to 999999 number MV inside Real operation (-999999 to 999999) number value Loop tag 2 degree-of- memory Real freedom 0 to 1 number parameter...
  • Page 99 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) SV setting processing Either of the following processings is performed depending on the operation mode (MODE) setting. (a) When the operation mode (MODE) is any of CAS, CCB and CSV 1) When the set value (E2) is specified, engineering value conversion is performed with the following expression and then "(2) Tracking processing"...
  • Page 100 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) 2-degree-of-freedom PID operation 2-degree-of-freedom PID operation is performed with the following operation expression. Item Operation expression {(DV When forward operation (PN 1) When reverse operation ( PV (PN 0) When forward operation {(PV (PN 1) When reverse operation (PN 0) BW ( MV)
  • Page 101 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (6) Loop stop processing (a) Setting 1 in SPA of the alarm detection (ALM) selects a loop stop. A loop stop performs the following processing and terminates the S.2PID instruction. 1) BW is turned to 0. 2) DVLA of the alarm detection (ALM) is turned to 0.
  • Page 102: Position Type Pid Control (S.pidp)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.3 Position Type PID Control (S.PIDP) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.PIDP S.PIDP...
  • Page 103 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.PIDP instruction is shown below. (The numerals (1) to (10) in the diagram indicate the order of the processing.) MH, ML, DVL, DVLS RH, RL GW,GG P, I, D, MTD, CT NMIN, NMAX Change Gain K...
  • Page 104 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.PIDP instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input data Input value -999999 to 999999 number Real Output value (-999999 to 999999) number BB1 Alarm Deviation large...
  • Page 105 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF +1 MODE Operation mode 16bit 0 to FFFF Alarm detection 4000 16bit DVLA, DMLA, MHA, MLA 0: Loop RUN (0: Without alarm) 1: Loop STOP (1: With alarm) 0 to FFFF...
  • Page 106 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Gain 0 to 999999 number Integral Real 0 to 999999 10.0 constant number Loop tag Derivative Real memory 0 to 999999 constant number Real Gap width...
  • Page 107 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) SV setting processing Either of the following processings is performed depending on the operation mode (MODE) setting. (a) When the operation mode (MODE) is any of CAS, CCB and CSV 1) When the set value (E2) is specified, engineering value conversion is performed with the following expression and then "(2) Tracking processing"...
  • Page 108 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) PID operation PID operation is performed with the following operation expression. Item Operation expression When forward operation {(PV When reverse operation Kp (DVn Gain (P), M : Derivative gain (MTD) : Integral constant (I), T : Derivative constant (D) In the following case, however, note that special processing will be performed.
  • Page 109 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (6) Mode judgment Either of the following processings is performed depending on the operation mode (MODE) setting. (a) When the operation mode (MODE) is any of MAN, CMB, CMV and LCM (alarm clear processing) 1) MHA, MLA and DMLA of the alarm detection (ALM) are turned to 0. 2) MAH2 and MLA2 of the alarm detection 2 (ALM2) are turned to 0.
  • Page 110 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (9) Loop stop processing (a) Setting 1 in SPA of the alarm detection (ALM) selects a loop stop. A loop stop performs the following processing and terminates the S.PIDP instruction. 1) BW retains the last value. 2) DVLA, MHA, MLA and DMLA of the alarm detection (ALM) are turned to 0.
  • Page 111: Sample Pi Control (S.spi)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.4 Sample PI Control (S.SPI) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.SPI S.SPI...
  • Page 112 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.SPI instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RL, RH P, I DVL, DVLS DV GW, GG Gain K SV setting Tracking...
  • Page 113 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.SPI instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Output value Real (-999999 to 999999) ( MV) number Block...
  • Page 114 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF +1 MODE Operation mode 16Bit 0 to FFFF Alarm detection 4000 16Bit DVLA, MHA, MLA 0: Loop RUN (0: Without alarm) 1: Loop STOP (1: With alarm) 0 to FFFF...
  • Page 115 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Gap gain 0 to 999999 number Loop tag memory MV inside Real (-999999 to 999999) operation value number Loop tag past value Used by the system as a work area.
  • Page 116 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (2) Tracking processing (a) The set value (SV) is converted reversely from the engineering value with the following operation expression to calculate SVn'. (b) When all of the following conditions hold, tracking processing is performed. 1) The tracking bit (TRK) of the operation constant is 1.
  • Page 117 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (5) Deviation check A deviation check is made under the following condition and the result of the check is output to DVLA of the alarm detection (ALM) and the deviation large alarm (BB1) of the block memory. Condition Result |DV|...
  • Page 118: I-Pd Control (S.ipd)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.5 I-PD Control (S.IPD) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.IPD S.IPD...
  • Page 119 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.IPD instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RL, RH P, I, D, CT, MTD DVL, DVLS DV GW, GG Gain K SV setting...
  • Page 120 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.IPD instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Output value Real (-999999 to 999999) ( MV) number Block...
  • Page 121 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF +1 MODE Operation mode 16bit 0 to FFFF Alarm detection 4000 16bit DVLA, MHA, MLA 0: Loop RUN (0: Without alarm) 1: Loop STOP (1: With alarm) 0 to FFFF...
  • Page 122 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Gap gain 0 to 999999 number Loop tag memory MV inside Real (-999999 to 999999) operation value number Loop tag past value Used by the system as a work area.
  • Page 123 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) SV setting processing Either of the following processings is performed depending on the operation mode (MODE) setting. (a) When the operation mode (MODE) is any of CAS, CCB and CSV 1) When the set value (E2) is specified, engineering value conversion is performed with the following expression and then "(2) Tracking processing"...
  • Page 124 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) I-PD operation I-PD operation is performed with the following operation expression. Item Operation expression {(PV When forward operation (PN When reverse operation (PN When forward operation (PN BW ( MV) When reverse operation (PN Gain (P), M : Derivative gain (MTD) : Integral constant (I), T...
  • Page 125 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (7) Control cycle judgment (a) If the specified control cycle is not reached, BW ( MV) is turned to 0 and the S.IPD instruction is terminated. (b) When the specified control cycle is reached, "(1) SV setting processing" is performed. Error •...
  • Page 126: Blend Pi Control (S.bpi)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.6 Blend PI control (S.BPI) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.BPI S.BPI...
  • Page 127 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.BPI instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RL, RH P, I, CT DVL, DVLS DV GW, GG Gain K SV setting Tracking...
  • Page 128 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.BPI instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Output value Real (-999999 to 999999) ( MV) number Block...
  • Page 129 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF +1 MODE Operation mode 16bit 0 to FFFF Alarm detection 4000 16bit DVLA, MHA, MLA 0: Loop RUN (0: Without alarm) 1: Loop STOP (1: With alarm) 0 to FFFF...
  • Page 130 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Gap width 0 to 100 number Loop tag Memory Real Gap gain 0 to 999999 number Loop tag past value Used by the system as a work area. *2 *3 Memory Real...
  • Page 131 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (2) Tracking processing (a) The set value (SV) is converted reversely from the engineering value with the following operation expression to calculate SVn'. (b) When all of the following conditions hold, tracking processing is performed. 1) The tracking bit (TRK) of the operation constant is 1.
  • Page 132 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (5) Deviation check A deviation check is made under the following condition and the result of the check is output to DVLA of the alarm detection (ALM) and the deviation large alarm (BB1) of the block memory. Condition Result |DV|...
  • Page 133: Ratio (S.r)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.7 Ratio (S.R) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact Set data Description Input data head device...
  • Page 134 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.R instruction is shown below. (The numerals (1) to (6) in the diagram indicate the order of the processing.) RMIN, RMAX BIAS Engineering Tracking Change rate (When value Ratio operation processing...
  • Page 135 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.R instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Block Real Output value (-999999 to 999999) memory number 0: Not trucked...
  • Page 136 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Rate upper Real RMAX -999999 to 999999 100.0 limit value number Loop tag Rate lower Real RMIN -999999 to 999999 memory limit value number Rate current Real...
  • Page 137 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (2) Change rate limiter In the change rate limiter, the following operation is performed and the result of the operation is stored into the current rate value (Rn). Condition Operation expression (SPR (SPR |SPR (3) Rate operation Rate operation is performed with the following operation expression.
  • Page 138: High/Low Limit Alarm (S.phpl)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.8 High/Low Limit Alarm (S.PHPL) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.PHPL S.PHPL...
  • Page 139 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.PHPL instruction is shown below. (The numerals (1) to (5) in the diagram indicate the order of the processing.) RL, RH DPL, CTIM Engineering value reverse conversion Engineering HH' PL' value...
  • Page 140 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.PHPL instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Real Output value (-999999 to 999999) number BB1 Alarm Upper limit...
  • Page 141 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Upper limit alarm Real RL to RH 100.0 set value number Lower limit alarm Real RL to RH value number Upper upper limit Real RL to RH 100.0...
  • Page 142 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (2) Upper/lower limit check The upper/lower limit checks of the input value (E1) are made under the following conditions. Check item Condition PH’ Upper limit check PH’ Others PHA: Last value is status hold Hold PL’...
  • Page 143 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (b) The change of the input data is compared with the change rate alarm value (DPL) in each execution cycle ( T). Check item Condition DPPA n + m Others DPPA Change rate check DPNA n + m Others DPNA...
  • Page 144: Lead-Lag (S.llag)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.9 Lead-Lag (S.LLAG) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.LLAG S.LLAG Set data...
  • Page 145 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.LLAG instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input value -999999 to 999999 number Input data Actuating signal 16bit 0: With lead-lag compensation 1: Without lead-lag compensation Block Real...
  • Page 146: Integral (S.i)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.10 Integral (S.I) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact Set data Description Input data head device...
  • Page 147 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.I instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input value -999999 to 999999 number Input data Operation control signal 16bit 0: With integral operation 1: Without derivative operation Block Real...
  • Page 148: Derivative (S.d)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.11 Derivative (S.D) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact Set data Description Input data head device...
  • Page 149 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.D instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input value -999999 to 999999 number Input data Operation control signal 16bit 0: With derivative operation 1: Without derivative operation Block Real...
  • Page 150: Dead Time (S.ded)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.12 Dead Time (S.DED) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.DED S.DED...
  • Page 151 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.DED instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input value -999999 to 999999 number Input data Operation control signal 16bit 0: With dead time 1: Without dead time Real Output value...
  • Page 152 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) The S.DED instruction performs the following operation. OCHG Dead time None Up to SN E1 when e1 turns from 1 to 0 times Later than Oldest data SN times Up to SN times Later than Oldest data...
  • Page 153: High Selector (S.hs)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.13 High Selector (S.HS) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.HS S.HS...
  • Page 154 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.HS instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input count 1 to 16 16bit Input value 1 Input Input value 2 data -999999 to 999999 Real number +2 n-1...
  • Page 155: Low Selector (S.ls)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.14 Low Selector (S.LS) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.LS S.LS...
  • Page 156 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.LS instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input count 1 to 16 16bit Input value 1 Input Input value 2 data Real -999999 to 999999 number +2 n-1...
  • Page 157: Middle Value Selection (S.mid)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.15. Middle Value Selection (S.MID) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.MID S.MID...
  • Page 158 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.MID instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input count 1 to 16 16bit Input value 1 Input Input value 2 data Real -999999 to 999999 number Input value n...
  • Page 159 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Remark The middle value is selected as described below. 1) The input value 1 (E1) to input value n (En) are rearranged in order of increasing value. (If there are the same input values, they are arranged in order of increasing input number.) 2) The middle value among the rearranged values is selected.
  • Page 160: Average Value (S.ave)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.16 Average Value (S.AVE) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.AVE S.AVE...
  • Page 161 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.AVE instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input count 1 to 16 16bit Input value 1 Input Input value 2 data Real -999999 to 999999 number Input value n...
  • Page 162 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.17 High/Low Limiter (S.LIMT) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.LIMT S.LIMT...
  • Page 163 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.LIMT instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Real Output value (-999999 to 999999) number Upper limit Block...
  • Page 164: Variation Rate Limiter 1 (S.vlmt1)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.18 Variation Rate Limiter 1 (S.VLMT1) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.VLMT1 S.VLMT1...
  • Page 165 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.VLMT1 instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Real Output value (-999999 to 999999) number Positive Block...
  • Page 166: Variation Rate Limiter 2 (S.vlmt2)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.19 Variation Rate Limiter 2 (S.VLMT2) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.VLMT2 S.VLMT2...
  • Page 167 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.VLMT2 instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Real Output value (-999999 to 999999) number Block Positive direction...
  • Page 168: 2-Position On/Off (S.onf2)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.20 2-position ON/OFF (S.ONF2) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.ONF2 S.ONF2...
  • Page 169 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.ONF2 instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RL, RH SV setting Tracking (When MV output processing processing compensation...
  • Page 170 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.ONF2 instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input data Input value -999999 to 999999 number Real Output value (-999999 to 999999) number Block memory...
  • Page 171 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF Alarm detection 4000 inhibit 16Bit TRKF (0: Without tracking) (1: With tracking) Manipulated Real -10 to 110 value number Real Set value RL to RH number...
  • Page 172 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) SV setting processing Either of the following processings is performed depending on the operation mode (MODE) setting. (a) When the operation mode (MODE) is any of CAS, CCB and CSV 1) When the set value (E2) is specified, engineering value conversion is performed with the following expression and then "(2) Tracking processing"...
  • Page 173 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) MV output The manipulated value (MV(BW)) is calculated under the following condition. Condition CMV, MAN, CMB, LCM MV’ CSV, CCB, CAB, CAS, AUT, LCC, LCA (5) 2-position ON/OFF control BB1 of BB is output under the following condition. Condition |BW| |BW|...
  • Page 174: 3-Position On/Off (S.onf3)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.21 3-position ON/OFF (S.ONF3) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.ONF3 S.ONF3...
  • Page 175 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.ONF3 instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RL, RH SV setting Tracking (When MV output processing processing compensation...
  • Page 176 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.ONF3 instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input Real Input value -999999 to 999999 data number Real Output value (-999999 to 999999) number Block Operation result...
  • Page 177 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF Alarm detection 4000 inhibit 16bit TRKF (0: Without tracking) (1: With tracking) Manipulated Real -10 to 110 value number Real Set value RL to RH Loop tag...
  • Page 178 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) SV setting processing Either of the following processings is performed depending on the operation mode (MODE) setting. (a) When the operation mode (MODE) is any of CAS, CCB and CSV 1) When the set value (E2) is specified, engineering value conversion is performed with the following expression and then "(2) Tracking processing"...
  • Page 179 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (b) Calculation of MV compensation value (MV') The MV compensation value (MV')is calculated under the following condition. Condition MV’ (HS1 HS0) 100% (HS1 HS0) HS0) (HS1 HS0) Other than above Last value (BW value) (4) MV output The manipulated value (MV(BW)) is calculated under the following condition.
  • Page 180: Dead Band (S.dbnd)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.22 Dead Band (S.DBND) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.DBND S.DBND...
  • Page 181 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.DBND instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input data Input value -999999 to 999999 number Real Output value (-999999 to 999999) number Block memory...
  • Page 182: Program Setter (S

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.23 Program Setter (S.PGS) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.PGS S.PGS...
  • Page 183 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block diagram The processing block diagram of the S.PGS instruction is shown below. (The numerals (2) to (5) in the diagram indicate the order of the processing.) MV, MV1 to SV, SV1 to TYPE ML, MH MV16 SV16 Output...
  • Page 184 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.PGS instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Output value (-999999 to 999999) number Alarm Block memory Output upper 16bit limit alarm (0: Without alarm) Output lower (1: With alarm)
  • Page 185 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Output lower Real -10 to 110 limit value number Setting time 1 Real 0 to 999999 number Loop tag SV16 Setting time 16 memory Setting output 1 Real...
  • Page 186 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (3) SV count-up processing SV count-up is performed with the following expression in each execution cycle. SV’ (4) MV operation Type Hold Return Cyclic Mode AUT, CAB CAS, CCB, CSV ) MV operation Mode change Not moved Last value Processing when...
  • Page 187: Loop Selector (S. Sel)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.24 Loop Selector (S. SEL) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.SEL S.SEL...
  • Page 188 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Block Diagram The processing block diagram of the S. SEL instruction is shown below. (The numerals (1) to (7) in the diagram indicate the order of the processing.) RH, RL SLNO PV, PV1 to PV2 RH, RL NMAX, NMIN Engineering...
  • Page 189 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S. SEL instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input data 1 Input value 1 -999999 to 9999999 number Real Output value (-999999 to 9999999) number Alarm...
  • Page 190 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value 0 to FFFF Operation +1 MODE BIN 16bit mode 0 to FFFF Alarm 4000 detection 16bit DMLA, MHA, MLA 0: Loop RUN (0: Without alarm) 1: Loop STOP (1: With alarm) 0 to FFFF...
  • Page 191 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) Engineering value conversion Engineering value conversion is performed with the following expression. RH RL (2) Input value 1 (E1) or input value 2 (E2) selection processing Whether the input value 1 (E1) or input value 2 (E2) will be used is selected depending on the e1 setting of the set value pattern (SVPTN).
  • Page 192 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (5) Output conversion processing Engineering value conversion is performed with the following expression. NMAX NMIN NMIN (6) Tracking processing (a) When all of the following conditions hold, the BW value is output to the input value 1 (E1) or input value 2 (E2).
  • Page 193: Bumpless Transfer (S.bump)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.25 Bumpless transfer (S.BUMP) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.BUMP S.BUMP...
  • Page 194 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S. BUMP instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Output set Real -999999 to 999999 value number Input Output control Real -999999 to 999999 data value number...
  • Page 195: Analog Memory (S.amr)

    9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.26 Analog memory (S.AMR) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction Symbol] [Execution Condition] StartContact S.AMR S.AMR...
  • Page 196 9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.AMR instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Output addition Real -999999 to 9999999 value number Output Real subtraction -999999 to 9999999 number value Output set Real...
  • Page 197: Compensation Operation Instructions

    10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10 COMPENSATION OPERATION INSTRUCTIONS 10.1 Function Generator (S.FG) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.FG...
  • Page 198 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.FG instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input data Input value -999999 to 999999 number Block Real Output value (-999999 to 999999) memory number Operation...
  • Page 199: Inverse Function Generator (S.ifg)

    10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.2 Inverse Function Generator (S.IFG) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.IFG S.IFG...
  • Page 200 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.IFG instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Input data Input value -999999 to 999999 Real number Block Output value (-999999 to 999999) Real number memory Operation...
  • Page 201: Standard Filter (S.flt)

    10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.3 Standard Filter (S.FLT) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.FLT S.FLT...
  • Page 202 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.FLT instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input data Input value -999999 to 999999 number Real Output value (-999999 to 999999) number Block memory...
  • Page 203 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) The data update cycle is . (The decimal is rounded down.) (2) The data sufficiency bit (BB1) turns to 0 when the dead time table is filled with SN pieces of data. It turns to 1 when the dead time table is not filled.
  • Page 204: Summation (S.sum)

    10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.4 Summation (S.SUM) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.SUM S.SUM Set data...
  • Page 205 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.SUM instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input value -999999 to 999999 number Input data Integration start signal 16Bit 0: Integration not executed 1: Integration executed Block Real...
  • Page 206: Temperature/Pressure Correction (S.tpc)

    10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.5 Temperature/Pressure Correction (S.TPC) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.TPC S.TPC...
  • Page 207 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.TPC instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Differential Real -999999 to 999999 pressure number Measurement Real -999999 to 999999 temperature number Measured Real -999999 to 999999 pressure...
  • Page 208: Engineering Value Conversion (S.eng)

    10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.6 Engineering Value Conversion (S.ENG) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.ENG S.ENG...
  • Page 209 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.ENG instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input data Input value -999999 to 999999 number Block Real Output value (-999999 to 999999) memory number Engineering...
  • Page 210: Inverse Engineering Value Conversion (S.ieng)

    10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.7 Inverse Engineering Value Conversion (S.IENG) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.IENG S.IENG...
  • Page 211 10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.IENG instruction Specified Data Standard Symbol Name Recommended range Unit Store Position format value Real Input data Input value -999999 to 999999 number Block Real Output value (-999999 to 999999) memory number Engineering...
  • Page 212: Arithmetic Operation Instructions

    11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11 ARITHMETIC OPERATION INSTRUCTIONS 11.1 Addition (S.ADD) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.ADD S.ADD...
  • Page 213 11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.ADD instruction Standard Specification position Symbol Name Recommended range Unit Data format Store value Input count 0 to 5 16Bit Input value 1 Input data Input value 2 Real -999999 to 999999 number +2n -1...
  • Page 214: Subtraction (S.sub)

    11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.2 Subtraction (S.SUB) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.SUB S.SUB Set data...
  • Page 215 11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.SUB instruction Standard Specification position Symbol Name Recommended range*1 Unit Data format Store value Input count 0 to 5 16Bit Input value 1 Input data Input value 2 Real -999999 to 999999 number +2n-1...
  • Page 216: Multiplication (S.mul)

    11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.3 Multiplication (S.MUL) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.MUL S.MUL Set data...
  • Page 217 11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.MUL instruction Standard Specification position Symbol Name Recommended range Unit Data format Store Value Input count 0 to 5 16Bit Input value 1 Input data Input value 2 Real -999999 to 999999 number +2n-1...
  • Page 218: Division (S.div)

    11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.4 Division (S.DIV) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.DIV S.DIV Set data...
  • Page 219 11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.DIV instruction Standard Specification position Symbol Name Unit Data format Store Recommended range Value Input value 1 Real -999999 to 999999 (Minute) number Input data Input value 2 Real -999999 to 999999 (Denominator) number...
  • Page 220 11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.5 Square Root (S.SQR) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.SQR S.SQR...
  • Page 221 11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) The S.SQR instruction performs the following operation. (E1) (E1) (2) When K 0LC , BW Also, when (E1 0), BW Error • When an operation error occurs Error code: 4100 11 - 10 11 - 10...
  • Page 222: Absolute Value (S.abs)

    11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.6 Absolute Value (S.ABS) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.ABS S.ABS...
  • Page 223 11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.ABS instruction Standard Specification Position Symbol Name Recommended range Unit Data format Store Value Input Real Input value -999999 to 999999 data number Real Output value (0 to 999999) number Block memory...
  • Page 224: Comparison Operation Instructions

    12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q 12 COMPARISON OPERATION INSTRUCTIONS 12.1 Compare Greater Than(S. Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction Symbol] [Execution Condition] StartContact Set data...
  • Page 225 12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S. instruction Standard Specified position Symbol Name Recommended range Unit Data format Store Value Real Input value 1 -999999 to 999999 Input number data Real Input value 2 -999999 to 999999 number (The same value as the input value 1 (E1) is Real...
  • Page 226: Compare Less Than (S. )

    12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q 12.2 Compare Less Than(S. Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction Symbol] [Execution Condition] StartContact Set data Description...
  • Page 227 12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S. instruction Standard Specified position Symbol Name Recommended range Unit Data format Store Value Real Input value 1 -999999 to 999999 number Input data Real Input value 2 -999999 to 999999 number (The same value as the input value 1 (E1) is Real...
  • Page 228: Compare Equal Than (S. )

    12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q 12.3 Compare Equal Than(S. Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction Symbol] [Execution Condition] StartContact Set data Description...
  • Page 229 12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S. instruction Standard Specified position Symbol Name Recommended range Unit Data format Store Value Real Input value 1 -999999 to 999999 number Input data Real Input value 2 -999999 to 999999 number (The same value as the input value 1 (E1) is Real...
  • Page 230: Compare Greater Or Equal (S. )

    12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q 12.4 Compare Greater Or Equal(S. Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact Set data Description...
  • Page 231 12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S. instruction Standard Specification Position Symbol Name Recommended range Unit Data format Store Value Real Input value 1 -999999 to 999999 number Input data Real Input value 2 -999999 to 999999 number (The same value as the input value 1 (E1) is Real...
  • Page 232: Compare Less Or Equal (S. )

    12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q 12.5 Compare Less Or Equal (S. Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact Set data Description...
  • Page 233 12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S. instruction Standard Specification Position Symbol Name Recommended range Unit Data format Store Value Real Input value1 -999999 to 999999 number Input data Real Input value2 -999999 to 999999 number (The same value as the input value 1 (E1) is Real...
  • Page 234: Auto Tuning

    13 AUTO TUNING MELSEC-Q 13 AUTO TUNING Auto tuning is designed to make the initial setting of the PID constants. The auto tuning of the QnPHCPU/QnPRHCPU can be used for processes that can be approximated with a primary delay plus dead time represented by the following expression. Example: Process with relatively slow response such as temperature adjustment 1+Ts e K: Gain, T: Time constant, L: Dead time, s: Laplace operator...
  • Page 235 13 AUTO TUNING MELSEC-Q Auto tuning procedure Start Since the PID constants are overwritten at completion of auto tuning, record the PID constants as required. Set the loop tag and operation constants necessary for auto tuning. Change the operation mode (MODE) of the tuning target loop to Manual (MAN). Make sure that the process of the tuning target is stable.
  • Page 236 13 AUTO TUNING MELSEC-Q (1) Time chart from auto tuning start until normal completion Auto tuning start Auto tuning start signal e1 Auto tuning completion Auto tuning completion BB16 Various Alarm BB1 to BB8 MV + AT1STEPMV Manipulated value MV PID constants are set.
  • Page 237: Auto Tuning Instruction (S.at1)

    13 AUTO TUNING MELSEC-Q 13.1 Auto tuning instruction (S. AT1) Usable devices Internal devices MELSECNET/H Intelligent Setting Index (System, user) File direct J \ function Constant data register Other register module K, H Word Word U \G [Instruction symbol] [Execution condition] Start contact S.AT1 S.AT1...
  • Page 238 13 AUTO TUNING MELSEC-Q Control data (1) Data specified in S. AT1 instruction Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Input value -999999 to 999999 number Input data Auto tuning start signal 16bit 0: Stop/end 1: Start Alarm Input upper...
  • Page 239 13 AUTO TUNING MELSEC-Q Standard Specified position Symbol Name Recommended range Unit Data format Store value Real Gain 0 to 999999 number Integral Real 0 to 999999 10.0 constant number Derivative Real 0 to 999999 constant number Loop tag Step Real memory STEP...
  • Page 240 13 AUTO TUNING MELSEC-Q Processing contents (1) Start signal judgement processing Any of the following processings is performed depending on the statuses of the auto tuning start signal (e1) and auto tuning completed (BB16). BB16 Processing BB2 to BB8 of BB are turned to 0. When the stepped manipulated value preset flag is 1, the following processing is performed.
  • Page 241 13 AUTO TUNING MELSEC-Q (4) Input check processing Either of the following processings is performed depending on the alarm detection (ALM) setting. (a) If either of PHA and HHA of the alarm detection (ALM) is 1, the following processing is performed and the S.
  • Page 242 13 AUTO TUNING MELSEC-Q In the upper/lower limiter, the following operation is performed and the result of the operation is output to BB4 and BB5. Result Processing after upper/lower Condition BB16 limiter Original MV unchanged S. AT1 instruction is terminated. Original MV unchanged The processing in 2) and later is...
  • Page 243 13 AUTO TUNING MELSEC-Q (b) Maximum slope value Depending on the slope (T2), the following processing is performed and the S. AT1 instruction is terminated. 1) If reverse operation is performed (PN 0) and AT1 stepped manipulated value (AT1STEPMV) 0 or forward operation is performed (PN 1) and AT1 stepped manipulated value (AT1STEPMV) Condition...
  • Page 244 13 AUTO TUNING MELSEC-Q (b) Equivalent dead time 1) The segment (b) made by the Y axis and the equivalent dead time (L) provided when the tangent line is drawn at the response speed for calculation (R') are calculated with the following expression.
  • Page 245 13 AUTO TUNING MELSEC-Q (c) PID constant storage The following processing is performed and the S. AT1 instruction is terminated. 1) The PID constants are stored into the gain (P), integral constant (I) and derivative constant (D). 2) The auto tuning completed (BB16) is turned to 1. 3) The AT1 stepped manipulated value (AT1STEPMV) is subtracted from the manipulated value (MV), and the result is stored into the manipulated value (MV).
  • Page 246: Error Code List

    14 ERROR CODE MELSEC-Q 14 ERROR CODE This chapter describes the definitions of the errors that will occur in the QnPHCPU/QnPRHCPU and the compensation operation to be taken for the errors. 14.1 Error code list There is the following process control instruction error. •...
  • Page 247 14 ERROR CODE MELSEC-Q Table 14.2 Processing Numbers of Instructions where Error Occurred (Stored in SD1503) Processing Instruction S. DUTY Input Change Reset Output ON Output addition rate, windup time conversion processing upper/lower conversion limiter S. BC Upper limit Change rate Output check check...
  • Page 248: Appendix1 Example Program

    APPENDIX MELSEC-Q APPENDIX Appendix 1 EXAMPLE PROGRAM In the following program, the operation mode switches to the manual mode at power-on. Turning X10 ON selects AUTO (automatic mode), starting PID control. MOVP R1001 Changes operation mode to AUTO. Changes Alarm Detection (ALM) to 0. MOVP R1003 SM402...
  • Page 249 APPENDIX MELSEC-Q End of subroutine program FEND Main routine program end SM400 EMOV E0.1 SD1500 Sets execution cycle to 0.1s. FMOV R100 K100 Clears S.IN, S.PHPL. S.PID, S.OUT1 output values to 0. FMOV R1000 K128 Clears loop tag to 0. R1000 R1001 H7C7...
  • Page 250 APPENDIX MELSEC-Q SM400 EMOV R1032 EMOV E100 R1034 EMOV R1036 EMOV E0.2 R1038 EMOV R1040 EMOV R1042 EMOV E100 R1044 EMOV R1046 Default value setting of loop tag EMOV E100 R1048 EMOV E100 R1050 EMOV R1052 EMOV R1054 EMOV R1056 EMOV R1058 EMOV...
  • Page 251 APPENDIX MELSEC-Q SM400 EMOV E100 R200 EMOV R202 EMOV E100 R204 EMOV R206 Operation constant setting of S.IN instruction EMOV E110 R208 EMOV E100 R210 EMOV R212 EMOV E-10 R214 SM400 EMOV R240 EMOV R242 Operation constant setting of S.PID instruction R244 R245 R246...
  • Page 252: Appendix 2 Loop Tag Memory List

    APPENDIX MELSEC-Q Appendix 2 Loop Tag Memory List Appendix 2.1 PID control (SPID) 2-degree-of-freedom PID control (S2PID) Sample PI control (SSPI) Loop tag memory list Data storage Instruction used Offset Item Name Recommended range Unit SPID SSPI S2PID MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF...
  • Page 253 APPENDIX MELSEC-Q Data storage Instruction used Offset Item Name Recommended range Unit SPID SSPI S2PID Output change rate limit S. OUT1/S.DUTY 0 to 100 value S. PID/S. 2PID/ Deviation limit value 0 to 100 S. SPI S. PID/S. 2PID/ Gain 0 to 999999 S.
  • Page 254: I-Pd Control (Sipd), Blend Pi Control (Sbpi)

    APPENDIX MELSEC-Q Appendix 2.2 I-PD Control (SIPD), Blend PI control (SBPI) Loop tag memory list Data storage Instruction used Offset Item Name Recommended range Unit SIPD SBPI MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF Alarm detection inhibition 0 to FFFF S.
  • Page 255 APPENDIX MELSEC-Q Data storage Instruction used Offset Item Name Recommended range Unit SIPD SBPI Output change rate limit S. OUT1 0 to 100 value S. IPD/S. BPI Deviation limit value 0 to 100 S. IPD/S. BPI Gain 0 to 999999 S.
  • Page 256: Manual Output (Smout), Monitor (Smon)

    APPENDIX MELSEC-Q Appendix 2.3 Manual output (SMOUT), Monitor (SMON) Loop tag memory list Data storage Instruction used Offset Item Name Setting/Store range Unit SMOUT SMON MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF Alarm detection inhibition 0 to FFFF S.
  • Page 257 APPENDIX MELSEC-Q Appendix 2.4 Manual output with monitor(SMWM), PIDP Control (SPIDP) Loop tag memory list Data storage Instruction used Offset Item Name Recommended range Unit SMWM SPIDP MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF Alarm detection inhibition 0 to FFFF S.
  • Page 258 APPENDIX MELSEC-Q Data storage Instruction used Offset Item Name Recommended range Unit SMWM SPIDP Output change rate limit S. PIDP 0 to 100 value S. PIDP Deviation limit value 0 to 100 S. PIDP Gain 0 to 999999 S. PIDP Integral constant 0 to 999999 S.
  • Page 259: Position On/Off Control (Sonf2), 3 Position On/Off Control (Sonf3)

    APPENDIX MELSEC-Q Appendix 2.5 2 Position ON/OFF Control (SONF2), 3 Position ON/OFF Control (SONF3) Loop tag memory list Data storage Instruction used Offset Item Name Recommended range Unit SONF2 SONF3 MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF Alarm detection inhibition 0 to FFFF S.PHPL...
  • Page 260: Batch Counter (Sbc)

    APPENDIX MELSEC-Q Appendix 2.6 Batch counter (SBC) Loop tag memory list Data storage Instruction used Offset Item Name Recommended range Unit MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF Alarm detection inhibition 0 to FFFF S. PSUM Integration value (Integer SUM1 (0 to 2147483647)
  • Page 261: Ratio Control (Sr)

    APPENDIX MELSEC-Q Appendix 2.7 Ratio control (SR) Loop tag memory list Data storage Instruction used Offset Item Name Recommended range Unit MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF Alarm detection inhibition 0 to FFFF S. PHPL Process value (RL to RH) S.
  • Page 262 APPENDIX MELSEC-Q Data storage Instruction used Offset Item Name Recommended range Unit Output change rate limit S. OUT2 0 to 100 value S. R Change rate limit value 0 to 999999 S. R RMAX Ratio upper limit value -999999 to 999999 S.
  • Page 263: Appendix 3 Operation Processing Time

    APPENDIX MELSEC-Q Appendix 3 OPERATION PROCESSING TIME Appendix 3.1 The Operation Processing Time of Each Instruction The operation processing time of each instruction is indicated in the table on this page and later. Since the operation processing time changes depending on the setting conditions, refer to the value in the table as the guideline of the processing time.
  • Page 264 APPENDIX MELSEC-Q Instruction Condition Processing time(µs) Set value pattern 3(Without cascade) Tracking bit Execution cycle Control cycle Executed during loop run in AUT S.PHPL Condition where ALM does not turn ON during loop run in AUT mode Input data 50, With lead-lag guarantee S.LLAG Lead time 1, Delay time...
  • Page 265 APPENDIX MELSEC-Q Instruction Condition Processing time(µs) Number of operation constant polygon points Operation type 0(Hold type) S.PGS Execution cycle Set value Condition where ALM does not turn ON during loop run in AUT mode Set value pattern (E1, E2 Used, Without cascade) S.SEL Tracking bit Condition where ALM does not turn ON during loop run in AUT mode...
  • Page 266: Operation Processing Time Of 2-Degree-Of-Freedom Pid Control Loop

    APPENDIX MELSEC-Q Appendix 3.2 Operation processing time of 2-degree-of-freedom PID control loop This section gives an example of the operation constant of each instruction and the processing times taken when actual values are stored into the loop tag memory. (1) Loop type and used instructions (a) Loop type: S2PID (b) Used instructions: S.IN, S.PHPL, S.2PID, S.OUT1 (2) Operation constants...
  • Page 267 APPENDIX MELSEC-Q (3) Loop tag memory Offset Item Name Recommended range Setting MODE Operation mode 0 to FFFF Alarm detection 0 to FFFF Alarm detection inhibition 0 to FFFF Process value RL to RH Manipulated value -10 to 110 Set value RL to RH 55.0 Deviation...
  • Page 268 APPENDIX MELSEC-Q MEMO App - 21 App - 21...
  • Page 269 INDEX [Number] DMLA (Output change rate limit alarm) ..3- 8 2-degree-of-freedom PID (S.2PID)....9- 9 DMLI (Output change rate limit alarm inhibition) 2-position ON/OFF (S.ONF) ......9-83 .................3- 8 3-position ON/OFF (S.ONF3) ....... 9-89 DPNA (Negative direction change rate alarm) .................3- 8 Absolute value (S.ABS) ......
  • Page 270 Loop selector ..........5- 3 PHA (Upper limit alarm)........3- 8 Loop selector (S.SEL) ......... 9-102 PHI (Upper limit alarm inhibition)....3- 8 Loop tag memory list PID Operation ..........1- 9 ....Add- 5, Add- 7, Add- 9, Add- 11, Add- 13 PLA (Lower limit alarm) ........3- 8 Loop tag past value memory ......
  • Page 271 S.LLAG (Lead-lag) ........9-59 SR (Ratio control) ...........2- 5 S.LS (Low selector)........9-70 SSEL (Selector) ..........2- 6 S.MID (Middle value selection) ..... 9-72 SSPI (Sample PI control)....2- 5, Add- 5 S.MOUT (Manual output)......8-17 SSR (Ratio control) ........Add- 16 S.MUL (Multiplication) ........
  • Page 272 WARRANTY Please confirm the following product warranty details before using this product. 1. Gratis Warranty Term and Gratis Warranty Range If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company.

This manual is also suitable for:

Melsec-q qnprhcpu

Table of Contents