MITSUBISHI ELECTRIC MELSEC System Q Programmable Logic Controllers Programming Manual (Process Control Instructions) QnPH CPUs Art. no.
• 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. The safety cautions given here apply to this product in isolation. For information on the safety of the PLC system as a whole, refer to the CPU module User's Manual.
REVISIONS * The manual number is given on the bottom left of the back cover. Print Date * Manual Number Apr., 2002 SH (NA)-080316E-A First edition Revision Japanese Manual Version SH-080265-A 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.
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.....................................................................................................................................AREVISIONS ............................................................
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..............................................
9.10 Integration (S.I)..................................................................................................................................... 9 - 61 9.11 Differentiation (S.D).............................................................................................................................. 9 - 63 9.12 Dead Time (S.DED) ............................................................................................................................. 9 - 65 9.13 High Selector (S.HS) .......
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.
About Manuals The manuals related to the Q/QnACPU are listed in the table below. Please order those you require. Related Manuals Manual Name Process CPU User's Manual (Hardware Design, Maintenance and Inspections) Describes the specifications of the CPU module, power supply module, base unit, expansion cables, and memory card.
MEMO A-8 A-8
1 OVERVIEW MELSEC-Q 1 OVERVIEW 1 This manual describes the process control instructions equipped for the QnPHCPU. 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 widerange and accurate operations. (2) Increased efficiency of system adjustment Micro-blocked process control instructions are combined to perform PID control.
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. 1 Add the extraction operation instruction (S.SQR) to perform the extraction operation of an input signal to provide an output signal as shown below. FIC Regulator FE flow meter Liquid Diaphragm valve [Example of adding extraction operation instruction (S.
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.
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. Process control instructions are used Subdivided (micro-blocked) processings of PID control Manual MV Set value SV PV PID operation Automatic MV MV D/A converter module Controlled system A/D converter module Sensor Fig. 1.
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. (3) Forward operation and reverse action make the manipulated value larger as the difference between the set value and the process value becomes larger.
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.
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.
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.
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 I D) operation. Deviation (2) The PID operation when the deviation is a constant value stepped response is shown in Fig. 1.6.
2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q 2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS 2.1 Instruction Configuration 2 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. • Instruction part.................. This shows the functions for these instructions. • Device part .......................
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 by process control instruction Bit data Numeric data Integer data Word data 2 Double word data Real number data (floating-point data) 2.2.1 For bit data Bit data is handled on a single bit basis. The QnPHCPU uses a word device for alarm condition or selection on a single bit basis.
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) 1).
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). (The error codes are stored in special register SD0.
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. 2.3 Basic Loop Types Available by Combinations of Process Control Instructions Loop type Structure SET Application SV PV 2-degree-of-freedom PID control (S2PID) INPUT S.IN S.PHPL MV S.2PID SET S.OUT1 SV PV INPUT S.IN S.PHPL S.DUTY S.IN S.PHPL MV S.
2 STRUCTURE AND COMBINATIONS OF PROCESS CONTROL INSTRUCTIONS MELSEC-Q Loop type Batch counter (SBC) Structure INPUT S.PSUM S.BC MV Program setting device (SPGS) S.PGS Manual output (SMOUT) S.MOUT Monitor (SMON) INPUT S.IN S.PHPL Manual output with monitor (SMWM) INPUT S.IN S.PHPL Selector (SSEL) INPUT1 INPUT2 S.SEL 2-6 OUTPUT OUTPUT This is output in accordance with the previously set value time change. OUTPUT This manually operates the operation terminal end. MV PV OUTPUT PV S.
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.
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 used Operation constant setting Item Standard value setting K1 T0 Execution command T0 PLS M0 M0 CALL P1 RST T0 Data type BIN16bit +0 8H BIN16bit ALM 4000 H BIN16bit INH 4000 H +1 MODE +3 +4 BIN16bit +10 S.PHPL PV 0.
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) S.D (Differentiation) S.DED (Dead time) S.FLT (Standard filter) S.BUMP (Bump-less transfer) S.AT1 (Auto tuning) S.FG (Polygon) S.
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 • Block memory Section 3.3.3 • Operation constant Section 3.3.4 • Local work memory Section 3.2 3.3.1 Loop memory (1) Loop memory (a) The loop memory is an area that stores the data used commonly by the process control instructions specified as the loop type.
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 system at the time of process control instruction execution. The user cannot write data to this memory during run. If the user writes data to the loop tag past value memory during run, normal operation cannot be performed. (b) The loop tag past value memory is a 32-word area after the loop tag 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. Refer to the explanation section of the corresponding instruction.
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. Instructions used in loop tag After setting some values are changed by Abbreviated name the numbers from the operation results.
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 Name Abbreviation Stop alarm Description Shows the loop stop status. Changes the loop mode to manual. Conducts stop alarm processing for the output value (BW) and alarm signal. Conducts the change rate limiter for the input data and outputs the change rate alarm. (For the output change upper limit value/control value).
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. b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 C S V C M V C C B C A B C M B C A S A U T M A N L C C L C A L C M For MODE make one of them a 1 bit only flag 1.
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. 1) Method using timer A timer is used to measure the execution cycle and the process control instruction is executed when the timer times out.
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.
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" bit of the alarm detection (ALM) is used to run/stop the corresponding loop. (1) Basic operation during loop STOP (a) Output status hold (The S.
5 EXECUTION CONDITION SWITCHING AND FUNCTIONS MELSEC-Q 5.2 Functions 5.2.1 Tracking function The tracking function includes the "bump-less function" and "output limiter processing". (1) Bump-less function The bump-less function prevents manipulated value (MV) output stepping changes when switching from the automatic mode to manual mode and continuously controls MV output.
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. Setting item Setting Tracking bit (TRK) Set value pattern (SVPTN) Set value pattern Set value Used 1 (Tracking performed) 0 (Set value is upper loop MV.) 0 (E2 is used) 5.2.
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 1) 2) 4) 3) 5) 6) 6 Explanation 1) Classifies the instructions by application.
6 INSTRUCTION LIST MELSEC-Q 6.2 Functions 6.2.1 I/O control instruction Table 6.2 I/O Control instruction Category Instruction Symbols Symbol I/O control instruction 6-2 S.IN S.IN S1 D1 S2 D2 S.OUT1 S.OUT1 S1 D1 S2 D2 S.OUT2 S.OUT2 S1 D1 S2 D2 S.MOUT S.MOUT S1 D1 S2 D2 S.DUTY S.DUTY S1 D1 S2 D2 S.BC S.BC S1 D1 S2 D2 S.PSUM S.
6 INSTRUCTION LIST MELSEC-Q 6.2.2 Control operation instruction Table 6.3 Control Operation Instruction Category Instruction Symbols Symbol Control operation instruction 6-3 S.PID S.PID S1 D1 S2 D2 S3 S.2PID S.2PID S1 D1 S2 D2 S3 S.PIDP S.PIDP S1 D1 S2 D2 S3 S.SPI S.SPI S1 D1 S2 D2 S3 S.IPD S.IPD S1 D1 S2 D2 S3 S.BPI S.BPI S1 D1 S2 D2 S3 S.R S.R S1 D1 S2 D2 S3 S.PHPL S.PHPL S1 D1 S2 D2 S.LLAG S.
6 INSTRUCTION LIST MELSEC-Q Table 6.3 Control Operation Instruction Category Control operation instruction Instruction Symbols S.I S.I S1 D1 S2 D2 S.D S.D S1 D1 S2 D2 S.DED S.DED S1 D1 S2 D2 S.HS S.HS S1 D1 S2 D2 S.LS S.LS S1 D1 S2 D2 S.MID S.MID S1 D1 S2 D2 S.AVE S.AVE S1 D1 S2 D2 S.LIMT S.LIMT S1 D1 S2 D2 S.VLMT1 S.VLMT1 S1 D1 S2 D2 S.VLMT2 S.VLMT2 S1 D1 S2 D2 S.ONF2 S.ONF2 S1 D1 S2 D2 S3 S.ONF3 S.ONF3 S1 D1 S2 D2 S3 S.DBND S.DBND S1 D1 S2 D2 S.PGS S.
6 INSTRUCTION LIST MELSEC-Q 6.2.3 Compensation operation instruction Table 6.4 Compensation Operation Instruction Category Compensation operation instruction Instruction Symbols Symbol S.FG S.FG S1 D1 S2 D2 S.IFG S.IFG S1 D1 S2 D2 S.FLT S.FLT S1 D1 S2 D2 S.SUM S.SUM S1 D1 S2 D2 S.TPC S.TPC S1 D1 S2 D2 S.ENG S.ENG S1 D1 S2 D2 S.IENG S.IENG S1 D1 S2 D2 Processing Details Outputs the value that follows the polygon pattern whose input data is specified.
6 INSTRUCTION LIST MELSEC-Q 6.2.5 Comparison operation instruction Table 6.6 Comparison Operation Instruction Category Comparison operation instruction Instruction Symbols Symbol S. S. S1 D1 S2 D2 S. S. S1 D1 S2 D2 S. S. S1 D1 S2 D2 S. S. S1 D1 S2 D2 S. S. S1 D1 S2 D2 Processing Details Compares the input data and outputs the result of comparison. Compares the input data and outputs the result of comparison. Compares the input data and outputs the result of comparison.
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) 2) 3) 4) 5) 7 1) Shows the item No. in the instruction summary. 2) is added to devices that can be used the instruction. The usage classifications for devices that can be used is shown below.
7 HOW TO READ INSTRUCTIONS MELSEC-Q 6) 7) 7 3) This shows the expression and instruction execution conditions in the circuit mode. Execution conditions Normal execution Displays the No. of the explanation page Nothing recorded Executed during on Executed once during on Executed once during off Nothing recorded Nothing recorded 4) Explains the set data of the instruction. 5) Indicates the functions performed by the instruction. 6) Indicates the processing sequence of the instruction.
7 HOW TO READ INSTRUCTIONS MELSEC-Q 8) 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 HOW TO READ INSTRUCTIONS MELSEC-Q 3 Range check ". 9) 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).
8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8 I/O CONTROL INSTRUCTIONS 8.1 Analog Input Processing (S.IN) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.IN S.
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.
8 I/O CONTROL INSTRUCTIONS Specified position S2 Symbol +0 +1 EMAX +2 +3 EMIN +4 +5 +6 +7 Operation constant NMAX NMIN +8 +9 HH +10 +11 H +12 +13 L +14 +15 LL MELSEC-Q Recommended range *1 Name Engineering conversion upper limit Engineering conversion lower limit Input upper limit Input lower limit Upper limit range error occurrence Upper limit range error return Lower limit range error return Lower limit range error occurrence Unit Data format Standard value Store -999999 to 999999
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.
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. T2 EMAX T2 (EMAX EMIN) T1 NMIN NMAX NMIN EMIN EMIN NMIN NMAX T1 (4) Digital filter The input value (E1) is digitally filtered according to the following expression. The digital filter is used to reduce noise.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.2 Output Processing with Mode Switching1 (S.OUT1) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.OUT1 S.
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.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
8 I/O CONTROL INSTRUCTIONS Specified position D2 Loop tag memory *2 Symbol MELSEC-Q Recommended range *1 Name Unit Data format Standard value Store +18 +19 MH Output upper limit value -10 to 110 % Real number 100.0 U +20 +21 ML Output lower limit value -10 to 110 % Real number 0.0 U +48 +49 DML Output change rate limit value 0 to 100 % Real number 100.0 U +54 +55 I Integral constant 0 to 999999 s Real number 10.0 U MV inside Real operation (-999999 to 999999) % 0.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q (b) When the tracking flag (TRKF) of the alarm detection inhibition (INH) is 0, the temporary MV (T) is calculated with the following expression. T E1 MVP MVP T (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.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q (5) Output conversion In the output conversion, the output value is calculated from the following formula. BW NMAX NMIN 100 MV NMIN (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.OUT1 instruction. 1) BW retains the last value. 2) DMLA, MHA and MLA of the alarm detection (ALM) are turned to 0. 3) The operation mode (MODE) is changed to MAN.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.3 Output Processing with Mode Switching2 (S.OUT2) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.OUT2 S.
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.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
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. 2) BB1 to BB4 of BB are turned to 0. 3) "(3) Output conversion processing" is performed and the S.
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. 3) The operation mode (MODE) is changed to MAN. 4) BB1 to BB4 of BB are turned to 0. (b) Setting 0 in SPA of the alarm detection (ALM) selects a loop run. A loop run performs "(1) Mode judgment".
8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.4 Manual Output (S.MOUT) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.MOUT S.
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.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.MOUT instruction Specified position Block memory Symbol D1 +0 +1 BW S2 +0 +1 NMAX +2 +3 NMIN Operation constant Recommended range *1 Name Output value Output conversion upper limit Output conversion lower limit Unit Data format Standard value Store (-999999 to 999999) Real number -999999 to 999999 Real number 100.0 U -999999 to 999999 Real number 0.
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. (b) Setting 0 in SPA of the alarm detection (ALM) selects a loop run. A loop run performs "(1) Mode judgment".
8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.5 Time Rate Example (S.DUTY) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.DUTY S.
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.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
8 I/O CONTROL INSTRUCTIONS Specified position D2 Loop tag memory *2 Symbol *2 *3 Recommended range *1 Name Unit Data format Standard value Store +18 +19 MH Output upper limit value -10 to 110 % Real number 100.0 U +20 +21 ML Output lower limit value -10 to 110 % Real number 0.0 U +48 +49 DML Output change 0 to 100 rate limit value % Real number 100.0 U +54 +55 I Integral constant 0 to 999999 s Real number 10.0 U (-999999 to 999999) % Real number 0.
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. 2) BB1 to BB4 of BB are turned to 0. 3) The tracking flag (TRKF) of the alarm detection inhibition (INH) is turned to 1. 4) "(5) Output ON time conversion processing" is performed.
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.
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). OutputON Counter CTDUTY T MV 1 100 The output ON counter rounds off a fraction to no decimal places. (b) When the control output cycle (CTDUTY) is not reached, the output counter is incremented by 1 and "(6) Output conversion processing" is performed.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.6 Batch Counter (S.BC) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.BC S.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
8 I/O CONTROL INSTRUCTIONS Specified position Loop tag past value memory D2 Symbol MELSEC-Q Recommended range *1 Name Unit Data format Standard value Store +124 Used by the system as a work area. S *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. *2: The loop tag memory and loop tag past value memory occupy a total of 128 words. (Refer to Section 3.3.1 for details.
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). Condition (Xn Xn-m) Others BB3, DPPA *2 DPL 1 0 *2: When DPPI or ERRI of the alarm detection inhibition (INH) is 1, DPPA and BB3 turn to 0 since the alarm is prohibited.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q 8.7 Pulse Retentive (S.PSUM) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.PSUM S.
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 signal (e1) Reset Start Reset Start Reset When e1 turns OFF e2 should also turn OFF.
8 I/O CONTROL INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.PSUM instruction Specified position S1 +0 +1 Symbol E1 Recommended range *1 Name Input value Unit Data format Standard value Use the ring counter of 16 bits or more. • 16-bit ring counter 00000000H 0000FFFFH 00000000H • 24-bit ring counter BIN 00000000H 00FFFFFFH 00000000H pulse 32Bit • 32-bit ring counter 00000000H FFFFFFFFH 00000000H Set 32767 (7FFFH) or less as a pulse increment at each instruction execution.
8 I/O CONTROL INSTRUCTIONS Specified position Loop tag past value memory D2 Symbo l MELSEC-Q Recommended range *1 Name +116 +117 Unit Data format Standard value Store Used by the system as a work area. S *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. *2: The loop tag memory and loop tag past value memory occupy a total of 128 words. (Refer to Section 3.3.1 for details.
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).
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9 CONTROL OPERATION INSTRUCTIONS 9.1 Basics PID (S.PID) Internal devices (System, user) Setting data Bit Word File register Usable devices Intelligent MELSECNET/H function direct J \ module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.PID S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Data format Standard Store value 0 to FFFFH D2 +1 MODE Operation mode b15 b12 b8 b4 b0 C C C C C C A M L L L S M C A M A U A C C C V V B B B S T N C A M BIN 16bit 8H S/U BIN 16bit 4000H S/U BIN 16bit 4000H S/U 0.0 U 0.
9 CONTROL OPERATION INSTRUCTIONS Specified position D2 Loop tag memory *2 Loop tag past value memory *2 *3 D2 Symbol Recommended range *1 Name +60 GG +61 Gap gain 0 to 999999 +62 MVP +63 MV Inside operation value (-999999 to 999999) MELSEC-Q Unit % Data format Standard Store value Real number 1.0 U Real number 0.0 S +96 Used by the system as a work area. +111 S3 +0 Real 0.
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" is performed.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) PID operation PID operation is performed with the following operation expression.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.2 2-degree-of-freedom PID (S.2PID) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.2PID S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Standard value Store BIN 16bit 8H S/U BIN 16bit 4000H S/U BIN 16bit 4000H S/U Real number 0.0 U Real number 0.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol D2 Loop tag memory *2 +60 +61 GG +62 +63 MVP +64 +65 +66 +67 Loop tag past value memory *2 *3 Recommended range *1 Name Gap gain MELSEC-Q Unit 0 to 999999 MV inside (-999999 to 999999) operation value 2 degree-of0 to 1 freedom parameter *5 2 degree-offreedom 0 to 1 parameter *6 % Standard value Store Real number 1.0 U Real number 0.0 S Real number 0.0 U Real number 1.
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" is performed.
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.
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. 3) The operation mode (MODE) is changed to MAN. 4) BB1 of BB are turned to 0. (b) Setting 0 in SPA of the alarm detection (ALM) selects a loop run. A loop run performs "(7) Control cycle judgment".
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.3 Position type PID (S.PIDP) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.PIDP S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Standard value Store BIN 16bit 8H S/U BIN 16bit 4000H S/U BIN 16bit 4000H S/U Data format 0 to FFFFH b15 D2 b12 b8 +1 MODE Operation mode b4 b0 C C C C C C A M L L L S M C A M A U A C C C V V B B B S T N C A M 0 to FFFFH b15 +3 ALM b12 S P A Alarm detection b8 b4 D M L A b0 D M M V H L L A A A SPA DVLA, DMLA, MHA, MLA (0: Without alarm) 0: Loop RUN (1: With alarm) 1: Loop STOP
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol D2 Loop tag memory *2 Loop tag past value memory *2 Unit Standard value Store Real number 1.0 U Data format +52 +53 P Gain 0 to 999999 +54 +55 I Integral constant 0 to 999999 s Real number 10.0 U +56 +57 D Derivative constant 0 to 999999 s Real number 0.0 U GW Gap width 0 to 100 % 0.0 U GG Gap gain 0 to 999999 1.0 U +58 +59 +60 +61 D2 +96 Real number Real number Used by the system as a work area.
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" is performed.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) PID operation PID operation is performed with the following operation expression.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (7) 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 BB5 and DMLA.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q ERROR • When an operation error occurs 9 - 25 Error code: 4100 9 - 25
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.4 Sample PI (S.SPI) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.SPI S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Standard value Store BIN 16Bit 8H S/U BIN 16Bit 4000H S/U BIN 16Bit 4000H S/U Data format 0 to FFFFH b15 D2 b12 +1 MODE Operation mode b8 b4 b0 C C C C C C A M L L L S M C A M A U A C C C V V B B B S T N C A M 0 to FFFFH b15 +3 ALM b12 b8 b4 S P A Alarm detection b0 D M M V H L L A A A SPA 0: Loop RUN 1: Loop STOP DVLA, MHA, MLA (0: Without alarm) (1: With alarm) 0 to FFFFH
9 CONTROL OPERATION INSTRUCTIONS Specified position +60 +61 +62 +63 D2 +96 D2 Loop tag memory *2 Loop tag past value memory *2 *3 Symbol Recommended range *1 Name GG Gap gain MVP MV inside (-999999 to 999999) operation value MELSEC-Q Unit Data format 0 to 999999 % Real number Real number Standard value Store 1.0 U 0.0 S Used by the system as a work area. +101 S3 +0 Real Set value *4 E2 Set value -10 to 110 % 0.
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'. SVn' 100 (SVn RH RL RL) (b) When all of the following conditions hold, tracking processing is performed. 1) The tracking bit (TRK) of the operation constant is 1. 2) The set value (E2) is used. 3) The operation mode (MODE) is any of MAN, AUT, CMV, CMB, CAB, LCM, LCA and LCC.
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 DVL |DV| (DVL DVLS) |DV| |DV| (DVL DVLS) Result DVLA DVLA DVLA DVL BB1 BB1 BB1 *1 1 *1 Last value status hold 0 *1: When DVLI or ERRI of the alarm detection inhibition (INH) is 1, DVLA and BB1 turn to 0 since the alarm is inhibited.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.5 I-PD Control (S.IPD) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.IPD S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Data format Standard value Store BIN 16bit 8H S/U BIN 16bit 4000H S/U BIN 16bit 4000H S/U 0 to FFFFH b15 D2 b12 +1 MODE Operation mode b8 b4 b0 C C C C C C A M L L L S M C A M A U A C C C V V B B B S T N C A M 0 to FFFFH b15 +3 ALM b12 b8 b4 S P A Alarm detection b0 D M M V H L L A A A SPA 0: Loop RUN 1: Loop STOP DVLA, MHA, MLA (0: Without alarm) (1: With alarm) 0 to FFFFH b
9 CONTROL OPERATION INSTRUCTIONS Specified position +60 +61 +62 +63 D2 +96 D2 Loop tag memory *2 Loop tag past value memory *2 *3 Symbol Recommended range *1 Name GG Gap gain MVP MV inside (-999999 to 999999) operation value MELSEC-Q Unit 0 to 999999 % Data format Real number Real number Standard value Store 1.0 U 0.0 S Used by the system as a work area. +109 S3 +0 Real Set value *4 E2 Set value -10 to 110 % 0.
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" is performed.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (4) I-PD operation I-PD operation is performed with the following operation expression.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.6 Blend PI control (S.BPI) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.BPI S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Data format Standard value Store BIN 16bit 8H S/U BIN 16bit 4000H S/U BIN 16bit 4000H S/U 0.0 U 0.0 S 100.0 U 0.0 U 1.0 U 100.0 U 1.
9 CONTROL OPERATION INSTRUCTIONS Specified position +58 +59 +60 +61 D2 +96 D2 Loop tag Memory *2 Loop tag past value Memory *2 *3 Symbol Recommended range *1 Name GW Gap width 0 to 100 GG Gap gain 0 to 999999 MELSEC-Q Unit % Data format Real number Real number Standard value Store 0.0 U 1.0 U Used by the system as a work area. +99 S3 +0 Real Set value *4 E2 Set value -10 to 110 % 0.
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'. SVn' 100 (SVn RH RL RL) (b) When all of the following conditions hold, tracking processing is performed. 1) The tracking bit (TRK) of the operation constant is 1. 2) The set value (E2) is used. 3) The operation mode (MODE) is any of MAN, AUT, CMV, CMB, CAB, LCM, LCA and LCC.
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 DVL |DV| DVLS) |DV| (DVL DVLS) |DV| (DVL DVL Result DVLA DVLA DVLA BB1 BB1 BB1 *1 1 *1 Last value status hold 0 *1: When DVLI or ERRI in the alarm detection inhibition (INH) is set to 1, DVLA and BB1 show 0 since the alarm is prohibited.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.7 Rate (S.R) Setting data Internal devices (System, user) Bit Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Word Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.R S1 S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol +52 Rate upper RMAX +53 limit value Rate lower +54 RMIN limit value +55 +56 Rate current Rn +57 value D2 +96 D2 Loop tag memory *2 Loop tag past value memory *2 *3 Recommended range *1 Name MELSEC-Q Unit -999999 to 999999 -999999 to 999999 (-999999 to 999999) Data format Real number Real number Real number Standard value Store 100.0 U 0.0 U 0.0 S Used by the system as a work area.
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). (SPR (SPR |SPR Condition Rn) DR DR Rn) Rn| DR Rn Rn Rn Operation expression Rn-1 DR Rn-1 DR SPR (3) Rate operation Rate operation is performed with the following operation expression.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.8 Upper/lower limit alarm (S.PHPL) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.PHPL S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position +26 +27 +28 +29 +30 +31 +32 +33 +40 +41 +42 +43 +44 +45 D2 +96 D2 Loop tag memory *2 Loop tag past value memory *2 *3 Symbol PH PL HH LL HS CTIM DPL MELSEC-Q Recommended range *1 Name Upper limit alarm set value Lower limit alarm value Upper upper limit alarm value Lower lower limit alarm value Upper/lower limit alarm hysteresis Change rate alarm Check time Change rate alarm value Unit RL to RH RL to RH RL to RH RL to RH 0 to 999999 % 0 to 99999
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.
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 E1n+m Condition E1n DPL Others E1n+m E1n Change rate check DPL ALM DPPA DPPA 1 0 *1 *2 BB4 BB5 *1 1 0 *2 1 DPNA 1 Others DPNA 0 0 *1: When DPPI or ERRI in the alarm detection inhibition (INH) is set to 1, DPPA and BB4 show 0 since the alarm is prohibited.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.9 Lead/lag (S.LLAG) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.LLAG S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.LLAG instruction Specified position S1 Symbol +0 +1 E1 Recommended range *1 Name Input value Unit -999999 to 999999 b15 % b12 b8 b4 Data format Standard Store value Real number U BIN 16bit U b0 e 1 Input data +2 e1 Actuating signal 0: With lead/lag compensation 1: Without lead/lag compensation Real +0 BW Output value (-999999 to 999999) % number +1 S2 +0 Real 1.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.10 Integration (S.I) Setting data Internal devices (System, user) Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.I S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.I instruction Specified position Symbol S1 +0 +1 E1 Recommended range *1 Name Input value -999999 to 999999 b15 Input data Unit b12 b8 b4 Data format Standard Store value Real number U BIN 16bit U b0 e 1 +2 e1 Operation control signal 0: With integral operation 1: Without derivative operation Block memory Real BW Output value (-999999 to 999999) number +1 S2 +0 Real T Integral time 0 to 999999 s 1.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.11 Differentiation (S.D) Setting data Internal devices (System, user) Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.D S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.D instruction Specified position S1 Symbol +0 +1 E1 Recommended range *1 Name Input value Unit -999999 to 999999 b12 b15 b8 b4 Data format Standard Store value Real number U BIN 16bit U b0 e 1 Input data +2 Operation control signal e1 0: With derivative operation 1: Without derivative operation Block memory +0 Real BW Output value (-999999 to 999999) +1 number S2 +0 Real 1.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.12 Dead Time (S.DED) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.DED S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) The S.DED instruction performs the following operation. e1 OCHG Dead time 1 0/1 None 0 1 0 ST SN 1 0 0 0/1 ST SN BW E1 Up to SN times Later than SN times Up to SN times Later than SN times *1 Oldest data E1 when e1 turns from 1 to 0 Oldest data *1 YS Oldest data *1 *1: The oldest date is the E1 after the SNth time. • When the dead time table date is not filled, BB1 is turned 1. • When SN 0, BB1 0 and BW E1.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.13 High Selector (S.HS) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.HS S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.14 Low Selector (S.LS) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.LS S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.15. Intermediate Value Selection (S.MID) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.MID S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Remark The intermediate 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 intermediate value among the rearranged values is selected. Example) When the input data are 2, 5, 1, 4 and 3, the intermediate value is selected as described below.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.16 Average Value (S.AVE) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.AVE S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.17 Upper/lower Limiter (S.LIMT) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.LIMT S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.18 Change rate limiter 1 (S.VLMT1) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.VLMT1 S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.19 Change rate limiter 2 (S.VLMT2) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.VLMT2 S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.20 2-position ON/OFF (S.ONF2) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.ONF2 S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Data format Standard Store value 0 to FFFFH b15 D2 +4 INH b12 b8 b4 b0 T R K F Alarm detection inhibit BIN 16Bit 4000H S/U Real number 0.0 S Real number 0.0 U Real number 0.0 S Real number 0.
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" is performed.
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 CSV, CCB, CAB, CAS, AUT, LCC, LCA BW BW BW MVn MVn MV’ BW (5) 2-position ON/OFF control BB1 of BB is output under the following condition. Condition |BW| |BW| 50% 50% BB1 1 0 (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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.21 3-position ON/OFF (S.ONF3) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.ONF3 S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Data format Standard Store value 0 to FFFFH b15 D2 +4 INH b12 b8 b4 b0 T R K F Alarm detection inhibit BIN 16bit 4000H S/U 0.0 S 0.0 U 0.0 S 0.0 U 0.0 U 100.0 U 0.0 U 1.
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" is performed.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (b) Calculation of MV compensation value (MV') The MV compensation value (MV')is calculated under the following condition. MV’ Condition DV (HS1 HS0) DV (HS1 HS0) HS1 HS0) DV ( Other than above (HS1 HS0) 100% 0% 50% Last value (BW value) (4) MV output The manipulated value (MV(BW)) is calculated under the following condition.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.22 Dead zone (S.DBND) Setting data Internal devices (System, user) Bit Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Word Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.DBND S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.23 Program Setting Device (S.PGS) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.PGS S.
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 MV16 SV, SV1 to SV16 (3) TYPE MV PGS ML, MH (4) (5) MV PGS Operation SV count-up Output processing BW BB1 OR BB2 RUN(SPA 0) PTNO.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol +20 +21 +22 +23 Loop tag memory *2 +52 +53 +54 +55 Recommended range *1 Name ML Output lower limit value SV1 Setting time 1 SV16 Setting time 16 MV1 Setting output 1 MELSEC-Q Unit Data format Standard Store value -10 to 110 % Real number 0.0 U 0 to 999999 s Real number 0.0 U -10 to 110 % Real number 0.
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’ SV T (4) MVPGS operation Type Mode MVPGS operation SV SVn-1 Hold SV1 SV Cyclic CAS, CCB, CSV MV1 MVn MVn-1 SVn SVn-1 SVn Mode change Processing when SV' SVn Return AUT, CAB MAN (SV SVn-1) MVn-1 MAN Not moved SV Last value 0 0 MV Last value After SV is set, mode is changed from MAN to AUT.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.24 Loop Selector (S. SEL) Setting data Internal devices (System, user) Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 S3 [Instruction symbol] [Execution condition] Start contact S.SEL Set data S1 D1 S2 D2 S3 S.
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.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS Specified position Symbol MELSEC-Q Recommended range *1 Name Unit Standard value Store 8H S/U BIN 16bit 4000H S/U BIN 16bit 4000H S/U 0.0 S 0.0 S 0.0 S 0.0 S 100.0 U 0.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) Engineering value conversion Engineering value conversion is performed with the following expression. PVn RH RL En RL 100 (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).
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q (5) Output conversion processing Engineering value conversion is performed with the following expression. BW NMAX NMIN MVn NMIN 100 (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). 1) The operation mode (MODE) is any of MAN, CMB, CMV and LCM. 2) The tracking bit (TRK) is 1.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.25 Bump-less transfer (S.BUMP) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.BUMP S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q 9.26 Analog memory (S.AMR) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction Symbol] [Execution Condition] StartContact S.AMR S.
9 CONTROL OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10 COMPENSATION OPERATION INSTRUCTIONS 10.1 Polygon (S.FG) Internal devices (System, user) Setting data Bit File register Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.FG S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.2 Inverted Polygon (S.IFG) Internal devices (System, user) Setting data Bit File register Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.IFG S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.3 Standard Filter (S.FLT) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.FLT S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) The data update cycle is ST T. (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. POINT • When the sampling count (SN) is 0, BW and BB are cleared and the instruction is terminated. • Until the dead time table is filled with data, the average of the data provided until then is output.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.4 Retentive (S.SUM) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.SUM S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.5 Temperature/Pressure Compensation (S.TPC) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.TPC S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.6 Engineering Value Conversion (S.ENG) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.ENG S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.ENG instruction Specified position Input data Block memory +0 +1 D1 +0 +1 Symbol S1 Recommended range *1 Name E1 Input value -999999 to 999999 BW Output value (-999999 to 999999) Unit % Data format Standard value Real number Real number U S Engineering Real value upper -999999 to 999999 100.0 number limit Operation constant Engineering +2 Real RL value lower -999999 to 999999 0.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q 10.7 Engineering Value Reverse Conversion (S.IENG) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.IENG S.
10 COMPENSATION OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.IENG instruction Specified Position Input data Block memory Symbol +0 +1 D1 +0 +1 S1 Recommended range *1 Name E1 Input value -999999 to 999999 BW Output value (-999999 to 999999) Unit % Data format Real number Real number Standard value U S Engineering Real value upper -999999 to 999999 100.0 number limit Operation constant Engineering +2 Real RL -999999 to 999999 0.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11 ARITHMETIC OPERATION INSTRUCTIONS 11 11.1 Addition (S.ADD) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.ADD S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.2 Subtraction (S.SUB) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.SUB S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.3 Multiplication (S.MUL) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.MUL S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.4 Division (S.DIV) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.DIV S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.DIV instruction Specification position Symbol *1 Name Recommended range Unit Data format Standard Store Value +0 Input value 1 Real E1 -999999 to 999999 +1 (Minute) number Input data +2 Input value 2 Real E2 -999999 to 999999 +3 (Denominator) number D1 +0 Block Real BW Output value (-999999 to 999999) memory +1 number S2 +0 Real A Coefficient 1 -999999 to 999999 1.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.5 Extraction (S.SQR) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.SQR S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Processing contents (1) The S.SQR instruction performs the following operation. BW K (E1) (2) When K (E1) Also, when (E1 0LC, BW 0. 0), BW 0.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q 11.6 Absolute Value (S.ABS) Internal devices (System, user) Setting data Bit Word Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G File register Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S.ABS S.
11 ARITHMETIC OPERATION INSTRUCTIONS MELSEC-Q Control Data (1) Data specified in S.
12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q 12 COMPARISON OPERATION INSTRUCTIONS 12.1 Comparison(S. 12 Internal devices (System, user) Setting data Bit Word ) File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction Symbol] [Execution Condition] StartContact S. S.
12 COMPARISON OPERATION INSTRUCTIONS Control data (1) Data specified in S.
12 COMPARISON OPERATION INSTRUCTIONS 12.2 Comparison(S. Internal devices (System, user) Setting data Bit Word MELSEC-Q ) File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction Symbol] [Execution Condition] StartContact S. S.
12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
12 COMPARISON OPERATION INSTRUCTIONS 12.3 Comparison(S. Internal devices (System, user) Setting data Bit Word MELSEC-Q ) File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction Symbol] [Execution Condition] StartContact S. S.
12 COMPARISON OPERATION INSTRUCTIONS Control data (1) Data specified in S.
12 COMPARISON OPERATION INSTRUCTIONS ) 12.4 Comparison(S. Internal devices (System, user) Setting data Bit Word MELSEC-Q File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S. S.
12 COMPARISON OPERATION INSTRUCTIONS MELSEC-Q Control data (1) Data specified in S.
12 COMPARISON OPERATION INSTRUCTIONS 12.5 Comparison(S. Internal devices (System, user) Setting data Bit Word MELSEC-Q ) File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 [Instruction symbol] [Execution condition] Start contact S. S.
12 COMPARISON OPERATION INSTRUCTIONS Control data (1) Data specified in S.
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 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 K -Ls 1+Ts e K: Gain, T: Time constant, L: Dead time, s: Laplace operator 13 Auto tuning can be used for the loop that uses the S. PID or S.
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). 13 Make sure that the process of the tuning target is stable. (Adjust the MV so that the process is stabilized as required.) Disconnect the S.2PID/S.
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 Manipulated value MV MV MV + AT1STEPMV MV PID constants are set.
13 AUTO TUNING MELSEC-Q 13.1 Auto tuning instruction (S. AT1) Internal devices (System, user) Setting data Bit Word File register Usable devices MELSECNET/H Intelligent direct J \ function module Bit Word U \G Index register Zn Constant K, H Other S1 D1 S2 D2 D3 [Instruction symbol] [Execution condition] Start contact S.AT1 S.
13 AUTO TUNING MELSEC-Q Control data (1) Data specified in S.
13 AUTO TUNING Specified position D2 Loop tag memory *2 Local work memory *3 +52 +53 +54 +55 +56 +57 MELSEC-Q Symbol P Gain I D Integral constant Derivative constant Step manipulated value for AT1 Sampling cycle for AT1 +70 +71 AT1 STEP MV +72 +73 AT1ST +74 +75 AT1 Time-out time TOUT1 for AT1 +76 +77 D3 Recommended range *1 Name Unit 0 to 999999 Data format Standard value Store Real number Real number Real number 1.0 S/U 10.0 S/U 0.
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). e1 BB16 0 0 1 0 0 1 1 1 Processing BB2 to BB8 of BB are turned to 0. When the stepped manipulated value preset flag is 1, the following processing is performed. MV MV AT1STEPMV The S. AT1 instruction is terminated. "(2) Loop stop processing" is performed.
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. AT1 is terminated. 1) The input upper limit alarm (BB3) is turned to 1. 2) The auto tuning completed (BB16) is turned to 1. (b) If either of PLA and LLA of the alarm detection (ALM) is 1, the following processing is performed and the S.
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. Condition BB4 BB5 Result BB16 T1 MH 1 0 1 T1 ML 0 1 1 ML T1 0 0 0 MH MV Processing after upper/lower limiter Original MV unchanged Original MV unchanged S. AT1 instruction is terminated. T1 The processing in 2) and later is performed. 2) The stepped manipulated value preset flag is turned to 1.
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.
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. b (maximum slope-time PV) R' L (Auto tuning start-time PV0)-b R' (maximum slope counter) AT1ST 2) If L 0, the following processing is performed and the S. AT1 instruction is terminated. The identification alarm (BB8) is turned to 1.
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). MV MV AT1STEPMV ERROR When an operation error occurred.
14 ERROR CODE MELSEC-Q 14 ERROR CODE This chapter describes the definitions of the errors that will occur in the QnPHCPU and the compensation operation to be taken for the errors. 14.1 Error code list There is the following process control instruction error. • Error occurred midway through operation Error code: 4100 When an operation error occurs (error code: 4100), a detailed error code is stored into SD1502 and SD1503.
14 ERROR CODE MELSEC-Q Table 14.2 Processing Numbers of Instructions where Error Occurred (Stored in SD1503) Processing No. 1 Instruction S. DUTY Input addition processing S. BC S. PSUM S. PID S. 2PID S. PIDP S. SPI S. IPD S. BPI S. R S. PHPL S. ONF2 S. ONF3 S. PGS S. SEL S.
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. X10 0 MOVP H10 R1001 Changes operation mode to AUTO. MOVP H0 R1003 Changes Alarm Detection (ALM) to 0. SM402 CALL P0 5 8 10 12 App 14 16 21 24 X1 X1 X2 X2 SET SM1500 Sets last value hold processing. RST SM1500 Resets last value hold processing.
APPENDIX MELSEC-Q 81 RET End of subroutine program 82 FEND Main routine program end P0 83 SM400 EMOV E0.1 SD1500 Sets execution cycle to 0.1s. FMOV H0 R100 K100 Clears S.IN, S.PHPL. S.PID, S.OUT1 output values to 0. FMOV H0 R1000 K128 Clears loop tag to 0.
APPENDIX MELSEC-Q 151 SM400 EMOV E0 R1032 EMOV E100 R1034 EMOV E0 R1036 EMOV E0.
APPENDIX 216 MELSEC-Q SM400 EMOV E100 R200 EMOV E0 R202 EMOV E100 R204 EMOV E0 R206 Operation constant setting of S.IN instruction EMOV E110 R208 EMOV E100 R210 EMOV E0 R212 EMOV E-10 R214 249 264 SM400 SM400 EMOV E8 R240 EMOV E2 R242 MOV H0 R244 MOV H0 R245 MOV H3 R246 Operation constant setting of S.PID instruction EMOV E100 R260 Operation constant setting of S.
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 Instruction used S. PHPL S. OUT1/S. DUTY S. PID/S. 2PID/ S. SPI S. PID/S. 2PID/ S. SPI S. OUT1/S. DUTY S. OUT1/S. DUTY S. PHPL/S. PID/ S. 2PID/S. SPI S. PHPL/S. PID/ S. 2PID/S. SPI S. PHPL S. PHPL S. PHPL S. PHPL S. IN S. PHPL S. PHPL S. PHPL S. PID/S. 2PID/ S.
APPENDIX Instruction used MELSEC-Q Offset Name Recommended range Unit Data storage SPID SSPI S2PID DML Output change rate limit value 0 to 100 % U U DVL Change rate limit value 0 to 100 % U U P Gain 0 to 999999 U U 54 55 I *2 Integral constant 0 to 999999 s U U S. PID/S. 2PID/ S. SPI 56 57 D/STHT Derivative constant/Sample cycle 0 to 999999 s U (D Setting) U (STHT Setting) S. PID/S. 2PID/ S. SPI S. PID/S. 2PID/ S.
APPENDIX MELSEC-Q Appendix 2.2 I-PD Control (SIPD), Blend PI control (SBPI) Loop tag memory list Instruction used S. PHPL S. OUT1 S. IPD/S. BPI S. IPD/S. BPI S. OUT1 S. OUT1 S. PHPL/S. IPD/ S. BPI S. PHPL/S. IPD/ S. BPI S. PHPL S. PHPL S. PHPL S. PHPL S. IN S. PHPL S. PHPL S. PHPL S. IPD/S.
APPENDIX Instruction used S. OUT1 S. IPD/S. BPI S. IPD/S. BPI S. IPD/S. BPI S. OUT1 S. IPD/S. BPI S. IPD/S. BPI S. IPD/S. BPI S. IPD/S.
APPENDIX MELSEC-Q Appendix 2.3 Manual output (SMOUT), Monitor (SMON) Loop tag memory list Instruction used S. PHPL S. MOUT S. PHPL S. PHPL S. PHPL S. PHPL S. PHPL S. PHPL S. IN S. PHPL S. PHPL S.
APPENDIX MELSEC-Q Appendix 2.4 Manual output with monitor(SMWM), PIDP Control (SPIDP) Loop tag memory list Instruction used S. PHPL S. MOUT/S. PIDP S. PIDP S. PIDP S. PIDP S. PIDP S. PHPL/S. PIDP S. PHPL/S. PIDP S. PHPL S. PHPL S. PHPL S. PHPL S. IN S. PHPL S. PHPL S. PHPL S.
APPENDIX Instruction used S. PIDP S. PIDP S. PIDP S. PIDP S. PIDP S. PIDP S.
APPENDIX MELSEC-Q Appendix 2.5 2 Position ON/OFF Control (SONF2), 3 Position ON/OFF Control (SONF3) Loop tag memory list Instruction used S.PHPL S.ONF2/S.ONF3 S.ONF2/S.ONF3 S.ONF2/S.ONF3 S.ONF2/S.ONF3 S.ONF3 S.PHPL S.PHPL S.PHPL S.PHPL S.PHPL S.PHPL S.IN S.PHPL S.PHPL S.PHPL S.ONF2/S.
APPENDIX MELSEC-Q Appendix 2.6 Batch counter (SBC) Loop tag memory list Instruction used S. PSUM S. PSUM S. BC S. BC S. BC S. BC S.
APPENDIX MELSEC-Q Appendix 2.7 Rate control (SR) Loop tag memory list Instruction used S. PHPL S. OUT2 S. R S. R S. OUT2 S. OUT2 S. PHPL S. PHPL S. PHPL S. PHPL S. PHPL S. PHPL S. IN S. PHPL S. PHPL S. PHPL S.
APPENDIX Instruction used S. OUT2 S. R S. R S. R S. R MELSEC-Q Offset 48 49 50 51 52 53 54 55 56 57 Item Name Recommended range Unit Data storage SR % U DML Output change rate limit value 0 to 100 DR Change rate limit value 0 to 999999 U RMAX Rate upper limit value -999999 to 999999 U RMIN Rate lower limit value -999999 to 999999 U Rn Rate current value (-999999 to 999999) S POINT • MODE, ALM and INH marked *1 are shared among the instructions.
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. Instruction S.IN S.OUT1 S.OUT2 S.MOUT S.DUTY S.BC S.PSUM S.PID S.2PID S.PIDP S.SPI S.IPD S.
APPENDIX Instruction S.R S.PHPL S.LLAG S.I S.D S.DED S.HS S.LS S.MID S.AVE S.LIMT S.VLMT1 S.VLMT2 S.ONF2 S.ONF3 S.
APPENDIX Instruction S.PGS S.SEL S.BUMP S.AMR S.FG S.IFG S.FLT S.SUM S.TPC S.ENG S.IENG S.ADD S.SUB S.MUL S.DIV S.SQR S.ABS S.> S.< S.= S.>= S.<= S.
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 (a) S.
APPENDIX MELSEC-Q (3) Loop tag memory Offset +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +12 +14 +16 +18 +20 +22 +24 +26 +28 +30 +32 +34 +36 +38 +40 +42 +44 +46 +48 +50 +52 +54 +56 +58 +60 +62 +64 +66 Item Name Recommended range MODE Operation mode 0 to FFFFH ALM INH Alarm detection Alarm detection inhibition 0 to FFFFH 0 to FFFFH PV MV SV DV MH ML RH RL PH PL HH LL Process value Manipulated value Set value Deviation Output upper limit value Output lower limit value Engineering value upper limit Engineer
APPENDIX MELSEC-Q MEMO App - 21 App - 21
INDEX [Number] DPNI(Negative direction change rate alarm inhibition) .........................................................3- 8 DPPA (Positive direction change rate alarm) ...........3- 8 DPPI(Positive direction change rate alarm inhibition) .........................................................3- 8 DVLA(Deviation large alarm)..........................3- 8 DVLI(Deviation large alarm inhibition)............3- 8 2-degree-of-freedom PID(S.2PID)................. 9- 9 2-position ON/OFF(S.ONF) ...........
Ind Lower limit alarm inhibition(LLI) ..................... 3- 8 Lower limit alarm inhibition(PLI)..................... 3- 8 Lower limit alarm(LLA) ................................... 3- 8 Lower limit alarm(PLA)................................... 3- 8 [M] MAN(MANUAL) .............................................. 3- 9 Manual output(S.MOUT)............................... 8-17 MHA(Output upper limit alarm) ...................... 3- 8 MHI(Output upper limit alarm inhibition)........
S.OUT1(Output processing with mode switching 1) ........................................................................ 8- 6 S.OUT2(Output processing with mode switching 2) ....................................................................... 8-12 S.PGS(Program setting device).................... 9-97 S.PHPL(Upper/lower limit alarm).................. 9-53 S.PID(Basics PID) .......................................... 9- 1 S.PIDP(Position type PID) ............................ 9-17 S.PSUM(Pulse retentive) .
WARRANTY Please confirm the following product warranty details before starting use. 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 dealer or Mitsubishi Service Company.
MITSUBISHI ELECTRIC HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES MITSUBISHI ELECTRIC EUROPE EUROPE B.V. German Branch Gothaer Straße 8 D-40880 Ratingen Phone: +49 (0) 2102 / 486-0 Fax: +49 (0) 2102 / 486-1120 e mail: megfamail@meg.mee.com MITSUBISHI ELECTRIC FRANCE EUROPE B.V. French Branch 25, Boulevard des Bouvets F-92741 Nanterre Cedex Phone: +33 1 55 68 55 68 Fax: +33 1 55 68 56 85 e mail: factory.automation@fra.mee.com MITSUBISHI ELECTRIC IRELAND EUROPE B.