background image

 
 

 

9 - 14 

MELSEC-Q/QnA

9.   COMPLETE DERIVATIVE PID CONTROL INSTRUCTIONS AND 

PROGRAM EXAMPLES 

 

Sets the initial
processing flag to 0.

Sets the SV to 600.

PID operation start command

Sets the automatic
mode.

Sets the PV from the Q64AD to the I/O 
data area (for loop 1).

Sets the SV to 1000.

Sets the automatic
mode.

Sets the PV from the Q64AD to the I/O data 
area (for loop 2).

PID operation

Turns ON the output enable of CH. 1 of 
the Q62DA.

Turns ON the output enable of CH. 2 of 
the Q62DA.

Writes the MV of loop 1 to CH. 1 of 
the Q62DA.

PID operation stop

Writes the MV of loop 2 to CH. 2 of 
the Q62DA.

Setting of common data
of I/O data

Setting of I/O data
for loop 1

Setting of I/O data
for loop 2

 

 

Содержание Q Mode

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

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

Страница 3: ...mmable controller that keeps the entire system safe even when there are problems with the external power supply or the programmable controller Otherwise it may cause an output error or an operating error resulting in an accident 1 Configure a circuit such as an emergency stop circuit and a protective circuit on the outside of the programmable logic controller 2 When the programmable controller det...

Страница 4: ...on the remote sequence from an external device an immediate action may not be taken for a programmable controller s trouble due to a data communication fault Configure the interlock circuit in the sequence program Simultaneously a recovery method for system in which a data communications fault occurs should be determined between the external device and the programmable controller CPU Startup Maint...

Страница 5: ... model QCPU Dec 2003 SH NA 080040 F Correction Chapter 1 Jun 2004 SH NA 080040 G Addition of Redundant CPU Partial addition About Manuals Chapter 1 Chapter 2 Section 2 1 3 1 1 3 1 3 3 2 1 3 2 3 4 3 5 5 1 5 2 Chapter 6 Chapter 7 Section 8 1 1 to 8 1 4 Section 9 1 1 to 9 1 5 9 2 Appendix 1 Sep 2006 SH NA 080040 H Partial addition Section 4 2 5 Appendix 2 Apr 2007 SH NA 080040 I Addition of Universal...

Страница 6: ...6PHCPU Partial correction GENERIC TERMS AND ABBREVIATIONS USED IN THIS MANUAL Section 2 1 Appendix 1 Japanese Manual Version SH 080022 K This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent licenses Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result o...

Страница 7: ... 3 PID control instruction list 3 3 3 2 PID Control by Complete Derivative 3 8 3 2 1 Performance specifications 3 8 3 2 2 PID operation block diagram and operation expressions 3 9 3 2 3 PID control instruction list 3 10 4 FUNCTIONS OF PID CONTROL 4 1 to 4 14 4 1 Outline of PID Control 4 1 4 2 Functions of PID Control 4 2 4 2 1 Operation method 4 2 4 2 2 Forward operation and reverse operation 4 2 ...

Страница 8: ...ol 8 9 8 2 3 Program example for changing the PID control mode between automatic and manual 8 13 9 COMPLETE DERIVATIVE PID CONTROL INSTRUCTIONS AND PROGRAM EXAMPLES 9 1 to 9 28 9 1 PID Control Instructions 9 1 9 1 1 PID control data settings PIDINIT PIDINITP 9 2 9 1 2 PID control PIDCONT PIDCONTP 9 3 9 1 3 Monitoring PID control status QnACPU only PID57 PID57P 9 5 9 1 4 Operation stop start of des...

Страница 9: ...A 7 APPENDIX APP 1 to APP 3 Appendix 1 Processing Time List APP 1 Appendix 2 Anti Reset Windup Measure APP 3 ...

Страница 10: ...devices parameters and types of program Sold separately IB 66614 13JF46 QCPU Q mode QnACPU Programming Manual Common Instructions Describes how to use sequence instructions basic instructions and application instructions Sold separately SH 080039 13JF58 QnACPU Programming Manual Special Function Describes the dedicated instructions for special function modules available when using the Q2ACPU S1 Q3...

Страница 11: ...he functions executable programs I O processing and device names of the QCPU QCPU Q mode QnACPU Programming Manual Common Instructions QCPU Q mode QnACPU Programming Manual PID Control Instructions QCPU Q mode QnACPU Programming Manual SFC Describes the instructions other than those given on the right Describes the instructions used for PID control Describes SFC This manual QCPU Q mode Programming...

Страница 12: ...ual SFC Describes the programs I O processing device names etc that can be executed by the QnACPU Describes the instructions other than those given on the right Describes the instructions for the special function modules such as the AJ71QC24 and AJ71PT32 S3 Describes the AD57 commands for controlling the AD57 AD58 Describes the instructions used for PID control Describes SFC This manual Q4ARCPU Pr...

Страница 13: ...Q03UDCPU Q04UDHCPU Q06UDHCPU Q13UDHCPU Q26UDHCPU Q03UDECPU Q04UDEHCPU Q06UDEHCPU Q13UDEHCPU Q26UDEHCPU QnCPU Abbreviation of Q02CPU QnHCPU Abbreviation of Q02HCPU Q06HCPU Q12HCPU Q25HCPU QnPHCPU Abbreviation of Q02PHCPU Q06PHCPU Q12PHCPU Q25PHCPU QnPRHCPU Abbreviation of Q12PRHCPU Q25PRHCPU QnUD H CPU Abbreviation of Q03UDCPU Q04UDHCPU Q06UDHCPU Q13UDHCPU Q26UDHCPU Q03UDECPU Q04UDEHCPU Q06UDEHCPU ...

Страница 14: ...A 12 MEMO ...

Страница 15: ...ative PID control instructions as standard features Since the incomplete derivative PID control instructions and complete derivative PID control instructions are independent of each other they can be executed at the same time The following table indicates the CPU modules that can use the incomplete derivative PID control instructions and complete derivative PID control instructions CPU Module Mode...

Страница 16: ...PRMW PIDPRMW P PID control via PID control instructions is implemented by combining the CPU module with the A D converter module and D A converter module In the case of the QnACPU the PID control status can be monitored using the AD57 S1 CRT controller module POINT 1 The Process CPU is not compatible with the PID control instructions described in this manual To implement PID control using the Proc...

Страница 17: ...odule and the manipulated value MV is then calculated The calculated MV manipulated value is output to the D A converter module When a PID operation instruction is executed in a sequence program the sampling cycle is measured and a PID operation is performed PID operation in accordance with the PID operation instruction is executed in preset sampling cycles Sequence program Step 0 PID operation in...

Страница 18: ...1 4 MELSEC Q QnA 1 GENERAL DESCRIPTION MEMO ...

Страница 19: ...e a system refer to the following manual Basic model QCPU High Performance model QCPU Universal model QCPU MELSEC Q DATA BOOK QnACPU User s manual details of the used CPU module CRT Operation panel D A conversion module A D conversion module Main base unit Extension cable Extension base unit For PV process value input For MV manipulated value output For PID control monitoring Only QnACPU CRT contr...

Страница 20: ...be set When the resolution of the A D converter module or D A converter module used for I O of PID control is other than 0 to 2000 convert the digital values into 0 to 2000 2 1 Applicable PLC CPU Component Module Basic model QCPU Q00JCPU Q00CPU Q01CPU First 5 digits of serial No are 04122 or later High Performance model QCPU Q02CPU Q02HCPU Q06HCPU Q12HCPU Q25HCPU Redundant CPU Q12PRHCPU Q25PRHCPU ...

Страница 21: ...PU High Performance model QCPU Redundant CPU Universal model QCPU QnA CPU Number of PID control loops 8 loops maximum 32 loops maximum 8 loops maximum 32 loops maximum Sampling cycle TS 0 01 to 60 00 s PID operation method Process value differentiation incomplete derivative forward operation reverse operation Proportional constant KP 0 01 to 100 00 Integral constant TI 0 1 to 3000 0 s Derivative c...

Страница 22: ... in the present sampling cycle EVn 1 Deviation in the preceding sampling cycle SV Set value PVfn Process value of the present sampling cycle after filtering PVfn 1 Process value of the preceding sampling cycle after filtering PVfn 2 Process value of the sampling cycle two cycles before after filtering MV Output change value MVn Present manipulation value Dn Present derivative term Dn 1 Derivative ...

Страница 23: ...D operation with the SV set value and the PV process value S PIDSTOP S PIDRUN Stops or starts PID operation for the set loop No S PIDPRMW Changes the operation parameters for the designated loop number to PID control data Usable Unusable The Basic model QCPU High Performance model QCPU Redundant CPU and Universal model QCPU allow selection of with without PID limits Refer to Sections 5 1 and 5 2 f...

Страница 24: ...ated by S 8 7 6 5 4 3 2 1 Common data setting area For loop 1 For loop 2 For loop n S 1 S 2 to S 15 S 16 S 29 to S m 0 to S m 13 to S 0 m n 1 14 2 Number of Basic Steps Explanation 1 Classification of instructions according to their application 2 Instruction names written in a sequence program 3 Symbols used in the ladder diagram 4 Processing for each instruction Four consecutive device numbers be...

Страница 25: ... leading edge OFF to ON of the condition for its execution thereafter the instruction will not be executed and no processing will be carried out even if the condition is ON 6 Number of instruction steps For details on the number of steps refer to the QCPU Q mode QnACPU Programming Manual Common Instructions 7 A circle indicates that subset processing is possible indicates that subset processing is...

Страница 26: ...alue designated by S and stores the PID operation results in the MV manipulated value area of the word device designated by S to S 9 SV setting area For loop 2 For loop n PV setting area MV value storage area For loop 1 SV setting area PV setting area SV setting area PV setting area MV value storage area Common data setting area S 10 to S 32 S 33 to S 55 S m 0 to S m 22 MV value storage area S m n...

Страница 27: ...ecuted simultaneously since they are independent 2 When the S P PIDINIT instruction has been used to make initialization use the S P PIDCONT instruction to perform PID operation To stop and start the PID operation of the specified loop No and to change the PID control data use the S P PIDSTOP S P PIDRUN and S P PIDPRMW instructions accordingly ...

Страница 28: ...model QCPU QnACPU Number of PID control loops 8 loops maximum 32 loops maximum 8 loops maximum 32 loops maximum 32 loops maximum Sampling cycle TS 0 01 to 60 00 s PID operation method Process value differentiation complete derivative forward operation reverse operation Proportional constant KP 0 01 to 100 00 Integral constant TI 0 1 to 3000 0 s PID constant setting range Derivative constant TD 0 0...

Страница 29: ...tion in the present sampling cycle EVn 1 Deviation in the preceding sampling cycle SV Set value PVfn Process value of the present sampling cycle after filtering PVfn 1 Process value of the preceding sampling cycle after filtering PVfn 2 Process value of the sampling cycle two cycles before after filtering MV Output change value MVn Present manipulation value Dn Present derivative term KP Proportio...

Страница 30: ...ue and the PV process value PID57 Used to monitor the results of PID operation at an AD57 S1 PIDSTOP PIDRUN Stops or starts PID operation for the set loop No PIDPRMW Changes the operation parameters for the designated loop number to PID control data Usable Unusable The Basic model QCPU High Performance model QCPU Redundant CPU and Universal model QCPU allow selection of with without PID limits Ref...

Страница 31: ...gnated by S 8 7 6 5 4 3 2 1 Common data setting area For loop 1 For loop 2 For loop n S 1 S 2 to S 11 S 12 S 21 to S m 0 to S m 9 to S 0 m n 1 10 2 Number of Basic Steps Explanation 1 Classification of instructions according to their application 2 Instruction names written in a sequence program 3 Symbols used in the ladder diagram 4 Processing for each instruction Four consecutive device numbers b...

Страница 32: ... leading edge OFF to ON of the condition for its execution thereafter the instruction will not be executed and no processing will be carried out even if the condition is ON 6 Number of instruction steps For details on the number of steps refer to the QCPU Q mode QnACPU Programming Manual Common Instructions 7 A circle indicates that subset processing is possible indicates that subset processing is...

Страница 33: ...es PID operation with the SV set value and the PV process value designated by S and stores the PID operation results in the MV manipulated value area of the word device designated by S to S 9 SV setting area For loop 2 For loop n PV setting area MV value starage area For loop 1 SV setting area PV setting area SV setting area PV setting area MV value starage area Common data setting area S 10 to S ...

Страница 34: ...IDPRMW n S Parameter change PIDPRMW PIDPRMWP n S Changes the operation parameter for the loop number designated by n to the PID control data stored in the word device designated by S 3 9 9 POINT 1 PID operation by incomplete derivative and PID operation by complete derivative can be executed simultaneously since they are independent 2 When the PIDINIT P instruction was used to make initialization ...

Страница 35: ...alue PV Process Value MV Manipulated Value Fig 4 1 Application of PID Control Process Control During PID control the value measured by the sensor process value is compared with the preset value set value The output value manipulated value is then adjusted in order to eliminate the difference between the process value and the set value The MV manipulated value is calculated by combining the proport...

Страница 36: ...rentiating the PV process value Because the deviation is not subject to differentiation sudden changes in the output due to differentiation of the changes in the deviation generated by changing the set value can be reduced 4 2 2 Forward operation and reverse operation Either forward operation or reverse operation can be selected to designate the direction of PID control 1 In forward operation the ...

Страница 37: ...OL 5 The figure below shows examples of process control with forward operation and reverse operation Temperature Process value Set value Time Forward operation for cooling Reverse operation for heating Temperature Process value Set value Time ...

Страница 38: ...roportional constant and is called the proportional gain Condition Proportional Operation When proportional gain Kp is smaller Control operation gets slower When proportional gain Kp is larger Control operation gets faster However hunting is more likely to occur 3 The proportional operation in step response with a constant E deviation is illustrated in Fig 4 2 Deviation MV E Time Time Kp E Fig 4 2...

Страница 39: ...Integral Operation When integral time TI is shorter Integrating effect increases and the time to eliminate the offset becomes shorter However hunting is more likely to occur When integral time TI is longer Integrating effect decreases and the time to eliminate the offset becomes longer 3 The integral operation in step response with a constant E deviation is illustrated in Fig 4 3 Deviation MV TI E...

Страница 40: ...called the derivative time Derivative time is expressed as TD Condition Derivative Operation When derivative time TD is shorter Differentiating effect decreases When derivative time TD is longer Differentiating effect increases However hunting of short cycle is more likely to occur 3 The derivative operation when the deviation is a constant value stepped response is shown in Fig 4 4 DV Time K DV T...

Страница 41: ...ive is effective for the following cases Control susceptible to high frequency noise When energy effective to actuate an operation end is not given when a step change occurs in a complete derivative system Complete derivative Complete derivative is PID control that uses the input of a derivative term as it is The PIDCONT instruction is the complete derivative PID control instruction PV Input Time ...

Страница 42: ... operation are used in combination is described below 1 During PID operation the system is controlled by the MV manipulated value calculated in the P I D operation 2 PID operation in step response with a constant E deviation is illustrated in Fig 4 5 Deviation MV Time Complete derivative PID Deviation MV Time Incomplete derivative PID Fig 4 5 PID Operation with Constant Deviation ...

Страница 43: ...he control mode is changed in the I O data area see Section 5 2 a Changing from the manual mode to the automatic mode The MV in the manual mode is transmitted to the MV area for the automatic mode b Changing from the automatic mode to the manual mode The MV in the automatic mode is transmitted to the MV area for the manual mode POINT 1 Manual and automatic modes of PID control 1 Automatic mode PID...

Страница 44: ...n the range between the limits EV deviation MVAUTO MVAUTO without limit control MVLL MV lower limit MVHL MV upper limit Fig 4 6 Operation in Accordance with the MV Upper Lower limit 3 When the MV upper lower limit control is used the MV is controlled as illustrated above A MVHL MV upper limit and MVLL MV lower limit takes on a value between 50 and 2050 or a user defined value except the QnACPU The...

Страница 45: ...hich the PID data SV and PV are stored Device number display Display the first device number of the devices in which the PID value SV and PV are stored Present value display The SV PV and MV present values for each loop are displayed as percentages Limit operation status display If an SV PV and or MV limiter is activated the corresponding character is highligted Bar graph display The SV PV and MV ...

Страница 46: ... achieve the SV starting from the MV output in the manual mode Before switching to the automatic mode store the SV into the SV storage device POINT Depending on whether SM774 SM794 is ON or OFF there are the following differences in control when the manual mode is switched to the automatic mode When SM774 SM794 is OFF the PV is transferred to the SV storage device Therefore there is no difference ...

Страница 47: ...ing valid turn the bit corresponding to the relevant loop of the PID limit setting special register SD774 SD775 SD794 SD795 to 1 PID Limit Setting Special Register Incomplete derivative Complete derivative Setting Range SD794 SD774 0 1 b15 0 1 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 0 1 b1 0 1 b0 LOOP 15 LOOP 16 LOOP 1 LOOP 2 LOOP 8 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 SD795 SD775 0...

Страница 48: ...4 14 MELSEC Q QnA 4 FUNCTIONS OF PID CONTROL MEMO ...

Страница 49: ... Set the manual automatic selection for I O data to automatic After reading the data from the A D converter module set it in the PV area of the I O data area See Section 8 1 1 9 1 1 for details on the instruction See Section 5 2 for details on I O data See Section 5 2 for details on I O data Selecting manual MV control Set the manual automatic selection for I O data to manual Setting the manually ...

Страница 50: ...nging the PID control data per sequence program scan will present no problem However execute the the PID control data setting instructions 2 when you registered or changed the PID control data If you do not execute the PID control data setting instructions instruction the data registered or the correction made to the PID control data will not be reflected at the execution of the the PID operation ...

Страница 51: ...5 3 MELSEC Q QnA 5 PID CONTROL PROCEDURE MEMO ...

Страница 52: ...n 3 2 2 Forward operation 0 Reverse operation 1 0 or 1 Forward operation 0 Reverse operation 1 0 or 1 2 Sampling cycle TS Sets the cycle of PID operation 0 01 to 60 00 s 1 to 6000 unit 10 ms 0 01 to 60 00 s 1 to 6000 unit 10 ms 3 Proportional constant KP PID operation Proportional gain 0 01 to 100 00 1 to 10000 unit 0 01 0 01 to 100 00 1 to 10000 unit 0 01 0 1 to 3000 0 s 0 1 to 3000 0 s 4 Integra...

Страница 53: ...ion is not executed for all loops Forward operation 0 Reverse operation 1 0 or 1 Forward operation 0 Reverse operation 1 0 or 1 0 01 to 60 00s 1 to 6000 unit 10 ms 0 01 to 60 00 s 1 to 6000 unit 10 ms 0 01 to 100 00 1 to 10000 unit 0 01 0 01 to 100 00 1 to 10000 unit 0 01 An error occurs and PID operation for the corresponding loop is not executed 0 1 to 3000 0 s 0 1 to 3000 0 s Infinite If the se...

Страница 54: ...limit value 1 is set for bit 1 b1 of the alarm device Does not limit the MV variation If the MV variation is greater than the limit value it is used unchanged as the MV variation to calculate the MV 0 to 2000 0 to 2000 32768 to 32767 32768 to 32767 10 PV change rate limit PVL Sets the limit for variation between the previous PV and present PV When the PV variation is greater than the limit value 1...

Страница 55: ...used When the MVLL or MVHL value is greater than 2050 2050 is used 0 to 2000 0 to 2000 32768 to 32767 32768 to 32767 In the case of with PID limits PID operation is performed after conversion into the following value When the MVL value is less than 50 it is converted into 50 When the MVL value is greater than 2050 it is converted into 2050 0 to 2000 0 to 2000 32768 to 32767 32768 to 32767 In the c...

Страница 56: ... operation 0 01 to 60 00 s 1 to 6000 unit 10 ms 0 01 to 60 00 s 1 to 6000 unit 10 ms 3 Proportional constant KP PID operation proportional gain 0 01 to 100 00 1 to 10000 unit 0 01 0 01 to 100 00 1 to 10000 unit 0 01 0 1 to 3000 0 s 0 1 to 3000 0 s 4 Integral constant TI This constant expresses the magnitude of the integral operation I operation effect Increasing the integral constant slows down th...

Страница 57: ...60 00 s 1 to 6000 units 10 ms 0 01 to 60 00 s 1 to 6000 units 10 ms 0 01 to 100 00 1 to 10000 units 0 01 0 01 to 100 00 1 to 10000 units 0 01 An error occurs and PID operation for the corresponding loop is not executed 0 1 to 3000 0 s 0 1 to 3000 0 s Infinite If the setting for TI exceeds 3000 0 s 1 to 32767 units 100 ms Infinite If the setting for TI exceeds 3000 0 s 1 to 32767 units 100 ms An er...

Страница 58: ... limit value 1 is set for bit 1 b1 of the alarm device Does not limit the MV variation If the MV variation is greater than the limit value it is used unchanged as the MV variation to calculate the MV 0 to 2000 0 to 2000 32768 to 32767 32768 to 32767 10 PV change rate limit PVL Sets the limit for variation between the previous PV and present PV When the PV variation is greater than the limit value ...

Страница 59: ... it is converted into 50 When the MVLL or MVHL value is greater than 2050 it is converted into 2050 0 to 2000 0 to 2000 32768 to 32767 32768 to 32767 In the case of with PID limits PID operation is performed after conversion into the following value When the MVL value is less than 0 it is converted into 0 When the MVL value is greater than 2000 it is converted into 2000 0 to 2000 0 to 2000 32768 t...

Страница 60: ...ering effect decreases as the value gets closer to 0 0 to 100 0 to 100 An error occurs and PID operation for the corresponding loop is not executed 7 MV Lower limit MVLL In the automatic mode sets the lower limit for the MV manipulated value calculated in PID operation When the MV is less than the MV lower limit the MVLL is used as the MV 50 to 2050 50 to 2050 8 MV Upper limit MVHL In the automati...

Страница 61: ...KP Integral constant TI Derivative constant TD MV lower limit MVLL MV upper limit MVHL Selection of operational expression Sampling cycle TS Proportional constant KP Integral constant TI Derivative constant TD Filter coefficient MV lower limit MVLL MV upper limit MVHL Conmon to all loops For loop No 1 14 words For loop No 2 14 words For loop No n 14 words For the total number of loops to be used t...

Страница 62: ...egral constant TI Derivative constant TD MV lower limit MVLL MV upper limit MVHL Selection of opperational expression Sampling cycle TS Selection of opperational expression Sampling cycle TS Proportional constant KP Integral constant TI Derivative constant TD Filter coefficient MV lower limit MVLL MV upper limit MVHL Conmon to all loops For loop No 1 10 words For loop No 2 10 words For loop No 3 1...

Страница 63: ... sampling cycle when the PID operation instruction is executed If the number of loops to be executed in a single scan is set PID operation is only executed for the set number of loops even if there are a greater number of loops for which the sampling cycle time reaches or exceeds the set sampling cycle when the PID operation instruction is executed PID operation is executed for the rest of the loo...

Страница 64: ...0 ms 19 ms 0 END 19 ms 19 ms 0 END 19 19 38 ms 19 ms 0 END 4 19 23 ms 0 END 26 19 45 ms 0 END 7 19 26 ms 19 ms 19 ms PID control data setting instruction 0 END 38 19 57 ms 19 ms 19 ms 0 END 45 19 64 ms Power ON Measured value Sequence program Measured value Set value Measured value Set value Measured value Set value Measured value Set value Measured value Set value Measured value Set value Measure...

Страница 65: ...5 17 MELSEC Q QnA 5 PID CONTROL PROCEDURE MEMO ...

Страница 66: ...2 POINT 1 in Section 3 2 2 50 to 2050 32768 to 32767 Manual manipulated value MVMAN In the manual control mode the data output from the D A converter module is stored 50 to 2050 32768 to 32767 Manual automatic selection MAN AUTO Selects whether the output data to the D A converter module is shown as a manual manipulated value or an automatic manipulated value In manual control mode the automatic m...

Страница 67: ...hen PV is less than 50 PV must be 50 When PV is greater than 2050 PV must be 2050 50 to 2050 50 to 2050 50 to 2050 QCPU with PID limit or QnACPU PID operation is performed after conversion into the following value When MVMAN is less than 50 MVMAN must be 50 When MVMAN is greater than 2050 MVMAN must be 2050 0 Manual manipulated value 1 Automatic manipulated value An error occurs if the setting is ...

Страница 68: ...O Alarm ALARM Set value SV Process value PV Automatic manipulated value MV to Set value SV Process value PV Automatic manipulated value MV Process value after filtering PVf Manual manipulated value MVMAN Manual automatic selection MAN AUTO Alarm ALARM Work area for PID control cannot be used Work area for No 1 loop cannot be used Work area for No 2 loop cannot be used Work area for No n loop canno...

Страница 69: ...lly from the loop for which the initial processing has been completed The number of processing loops per scan is the set number of loops to be executed per scan 4 Where write is designated for a data area it indicates that the data should be written with a user sequence program Where read is designated for a data area it indicates that the data should be read with a user sequence program Never att...

Страница 70: ...value PV Automatic manipulated value MV Process value after filtering PVf Manual manipulated value MVMAN Manual automatic selection MAN AUTO Alarm ALARM Work area for PID control cannot be used Work area for No 1 loop cannot be used Work area for No 2 loop cannot be used Work area for No n loop cannot be used Write Read write disabled Write Read Write Read write Read write disabled Write Read Writ...

Страница 71: ...as been completed The number of processing loops per scan is the set number of loops to be executed per scan 4 Where write is designated for a data area it indicates that the data should be written with a user sequence program Where read is designated for a data area it indicates that the data should be read with a user sequence program Never attempt to write data to a data area designated read wr...

Страница 72: ...5 24 MELSEC Q QnA 5 PID CONTROL PROCEDURE MEMO ...

Страница 73: ...control instructions are defined in the same configuration as High Performance model QCPU Redundant CPU Universal model QCPU and QnACPU control instructions For details on the configuration of control instructions see the QCPU Q mode QnACPU Programming Manual Common Instructions ...

Страница 74: ...6 2 MELSEC Q QnA 6 PID CONTROL INSTRUCTIONS MEMO ...

Страница 75: ...to execute the S PIDCONT instruction in every scan If not PID operation in a normal sampling cycle will not available It is not possible to execute the S PIDCONT instruction more than once in one scan If it is executed more than once in one scan PID operation cannot be performed in a normal sampling cycle 5 The S PIDCONT instruction is not available for use in an interrupt program fixed scan execu...

Страница 76: ...ted while either or both of the modules are faulty PID operation cannot be executed correctly because the PV process value cannot be read correctly and or the MV manipulated value cannot be output correctly OPERATION ERRORS 1 An operation error will occur the error flag SM0 will be turned ON and an error code will be stored in SD0 in the following cases When the S PIDINIT instruction is executed b...

Страница 77: ...OL INSTRUCTIONS AND PROGRAM EXAMPLES 8 INCOMPLETE DERIVATIVE PID CONTROL INSTRUCTIONS AND PROGRAM EXAMPLES This section explains how to use the PID control instructions for PID control and shows some programming examples 8 1 PID Control Instructions 8 ...

Страница 78: ...PU module in a batch thereby making the PID control possible See section 5 1 for details on PID control data 2 When the S PIDINIT instruction is executed at more than one point within a scan the setting value of the S PIDINIT instruction closest to the S PIDCONT instruction is effective 3 The S PIDINIT instruction must be executed before the S PIDCONT instruction PID control is not possible if the...

Страница 79: ... of the set value SV and process value PV in the I O data area set to the device number specified by S or later and the operation result is stored into the automatically manipulated value MV area of the I O data area 3 PID operation is executed in response to the execution of the S PIDCONT instruction appearing first after the set time for sampling cycle has elapsed see Section 5 1 2 4 During PID ...

Страница 80: ... for reading the PV process value and the D A converter module for outputting the MV manipulated value are normal S PIDCONT D100 Control command READY signal for the A D converter module READY signal for the D A converter module If the S PIDCONT instruction is executed while either or both of the modules are faulty PID operation cannot be executed correctly because the PV process value cannot be r...

Страница 81: ...OP instruction does not resume PID operation even if the S PIDINIT instruction is executed b Retains the operation data during the stop 2 S PIDRUN SP PIDRUN a Starts the PID operation of the loop No specified by n This instruction is designed to re execute PID operation of the loop No that has stopped with the S PIDSTOP instruction b This instruction will be ignored if the instruction is executed ...

Страница 82: ...DATA Set Data Description Data Type n Loop number for which change is to be made S First number of devices in which PID control data to be changed is stored 16 bit binary FUNCTIONS 1 Changes the operation parameter for the loop number designated by n to the PID control data stored in the devices starting with the device number designated by S 2 The configuration of the data for PID control which s...

Страница 83: ...c model QCPU Error code 4100 When n is outside the range 1 to 32 High Performance model QCPU Redundant CPU Universal model QCPU Error code 4100 When the PID control data is outside the setting range Error code 4100 When any of S 10 S 12 and S 13 in the PID control data is not 0 Error code 4100 When the device range assigned to the PID control data area by S exceeds the last device number of the ap...

Страница 84: ...s that execute PID control 8 2 1 System configuration for program examples The following illustrates the system configuration for the program examples in Sections 8 2 2 and 8 2 3 CPU module PID operation Loop 1 Loop 2 PV MV MV PV Q62DA CH 1 CH 2 CH 1 CH 2 External device External device Q64AD PID operation Q64AD I O numbers X Y80 to X Y8F Q62DA I O numbers X YA0 to X YAF ...

Страница 85: ...oops 3 The sampling cycle is 1 second 4 The PID control data is set in the following devices 1 Common data D500 and D501 Loop 1 data D502 to D515 Loop 2 data D516 to D529 5 The I O data is set in the following devices 2 Common data D600 to D609 Loop 1 data D610 to D632 Loop 2 data D633 to D655 6 The following SV are set for loop 1 and loop 2 using a sequence program Loop 1 600 Loop 2 1000 7 The fo...

Страница 86: ...ation Sets the sampling cycle to 1s Sets the proportional constant to 1 Sets the integral constant to 3000s Sets the derivative constant to 0s Sets the filter coefficient to 0 Sets the MV lower limit to 0 Sets the MV upper limit to 2000 Sets the MV change rate limit to 2000 Sets the PV change rate limit to 2000 Setting of common data of PID control data Setting of PID control data for loop 1 Sets ...

Страница 87: ... 0 Sets the MV upper limit to 2000 Sets the MV change rate limit to 2000 Sets the PV change rate limit to 2000 Sets the PID control data that are set in D500 to D529 Setting of PID control data for loop 2 Sets the SV to 600 Sets the automatic mode Sets the SV to 1000 Sets the automatic mode PID operation start command Sets the initial processing flag to 0 Sets 0 Sets the derivative gain to 8 Sets ...

Страница 88: ...4AD to the I O data area for loop 1 Sets the PV from the Q64AD to the I O data area for loop 2 PID operation Turns ON the output enable of CH 1 of the Q62DA Writes the MV of loop 1 to CH 1 of the Q62DA Writes the MV of loop 2 to CH 2 of the Q62DA PID operation stop Turns ON the output enable of CH 2 of the Q62DA ...

Страница 89: ...in the following devices Common data D500 and D501 Loop 1 data D502 to D515 5 The I O data is set in the following devices Common data D600 to D609 Loop 1 data D610 to D630 6 The SV and MV in manual mode are set with external digital switches as follows SV X30 to X3F MV manual control mode X20 to X2F 7 The following devices are used to start and stop PID control and the automatic manual changeover...

Страница 90: ... the one used in the automatic mode before switching to the manual mode The SV is rewritten step by step 10 times as illustrated below SV value in manual mode SV value in automatic mode Manual to automatic mode change command 1 s 10 s 1 s 1 s 1 s The SV is rewritten using the operation method illustrated below Incremental value Remainder SV value in manual mode SV value in automatice mode 10 The i...

Страница 91: ...lter coefficient to 0 Sets the MV lower limit to 0 Sets 0 Sets the MV change rate limit to 2000 Sets the PV change rate limit to 2000 Sets the PID control data that are set in D500 to D515 Sets the initial processing flag to 0 Inputs the SV externally Saves the SV for manual to automatic mode change processing PID operation start command Sets the PV value from the Q64AD to the I O data area I O da...

Страница 92: ...e SV Executes the S PIDCONT instruction in either the manual mode or automatic mode End of manual to automatic mode change processing Processing to return the SV to the value used in the automatic mode Subtracts the remainder from the SV only at the first time is calculated the quotient is stored in D215 and the remainder in D216 Present SV value Resets the devices used for manual to automatic mod...

Страница 93: ...ONTROL INSTRUCTIONS AND PROGRAM EXAMPLES 9 COMPLETE DERIVATIVE PID CONTROL INSTRUCTIONS AND PROGRAM EXAMPLES This chapter explains the PID control instruction usage and program examples for implementing PID control 9 1 PID Control Instructions 9 ...

Страница 94: ...ered in the CPU module in a batch thereby making the PID control possible Refer to Section 5 1 for details of the PID control data 2 When the PIDINIT instruction is executed at more than one point within a scan the setting value of the PIDINIT instruction closest to the PIDCONT instruction is effective 3 The PIDINIT instruction must be executed before the PIDCONT instruction PID control is not pos...

Страница 95: ...nd process value PV in the I O data area set to the device number specified by S or later and the operation result is stored into the automatically manipulated value MV area of the I O data area 3 PID operation is executed in response to the execution of the PIDCONT instruction appearing first after the set time for sampling cycle has elapsed see Section 5 1 2 4 During PID control turn ON the cont...

Страница 96: ...for reading the PV process value and the D A converter module for outputting the MV manipulated value are normal PIDCONT D100 Control command READY signal for the A D converter module READY signal for the D A converter module If the PIDCONT instruction is executed while either or both of the modules are faulty PID operation cannot be executed correctly because the PV process value cannot be read c...

Страница 97: ...play request 16 bit binary FUNCTION 1 The display unit of the AD57 S1 designated by n displays the PID control status of the loop number designated by S1 in a bar graph By executing the initial screen display request designated by S2 the characters in the still portion of the monitor screen with the exception of bar graphs and numerical data are displayed in the initial state of PID control monito...

Страница 98: ...d the value designated by S1 is automatically stored in S2 and then the PID control monitor function is executed If the device designated by S2 is a file register do not set the memory protect function for the file register ON If the memory protect function is ON the screen cannot display the monitor data correctly 8 The initial screen display request should only be executed once in response to th...

Страница 99: ... 10 11 12 13 14 15 16 17 18 19 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 6 5 4 3 2 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 7 6 5 4 3 2 1 0 Address where a character should be created Address where a character should be created Fig 9 1 Characters for PID Control Status Monitor OPERATION ERRORS ...

Страница 100: ... PID operation even if the PIDINIT instruction is executed b Retains the operation data during the stop 2 PIDRUN PIDRUNP a Starts the PID operation of the loop No specified by n This instruction is designed to re execute PID operation of the loop No that has stopped with the PIDSTOP instruction b This instruction will be ignored if the instruction is executed for the loop No that is currently runn...

Страница 101: ...Data Description Data Type n Loop number for which change is to be made S First number of devices in which PID control data to be changed is stored 16 bit binary FUNCTIONS 1 Changes the operation parameter for the loop number designated by n to the PID control data stored in the devices starting with the device number designated by S 2 The configuration of the data for PID control which starts fro...

Страница 102: ...hen n is outside the range 1 to 8 Basic model QCPU Error code 4100 When n is outside the range 1 to 32 High Performance model QCPU Redundant CPU Universal model QCPU QnACPU Error code 4100 When the PID control data is outside the setting range Error code 4100 When the device range assigned to the PID control data area by S exceeds the last device number of the applicable range Error code 4101 When...

Страница 103: ...grams that execute PID control 9 2 1 System configuration for program examples The following illustrates the system configuration for the program examples in Sections 9 2 2 and 9 2 3 CPU module PID operation Loop 1 Loop 2 PV MV MV PV Q62DA CH 1 CH 2 CH 1 CH 2 External device External device Q68AD PID operation Q64AD I O numbers X Y80 to X Y8F Q62DA I O numbers X YA0 to X YAF ...

Страница 104: ...oops 3 The sampling cycle is 1 second 4 The PID control data is set in the following devices 1 Common data D500 and D501 Loop 1 data D502 to D511 Loop 2 data D512 to D521 5 The I O data is set in the following devices 2 Common data D600 to D609 Loop 1 data D610 to D627 Loop 2 data D628 to D645 6 The following SV are set for loop 1 and loop 2 using a sequence program Loop 1 600 Loop 2 1000 7 The fo...

Страница 105: ...upper limit to 2000 Sets the PV change rate limit to 2000 Sets the operation expression to reverse operation Sets the sampling cycle to 1s Sets the proportional constant to 1 Sets the integral constant to 3000s Sets the derivative constant to 0s Sets the filter coefficient to 0 Sets the MV lower limit to 0 Sets the MV upper limit to 2000 Sets the MV change rate limit to 2000 Sets the PV change rat...

Страница 106: ...ta area for loop 1 Sets the SV to 1000 Sets the automatic mode Sets the PV from the Q64AD to the I O data area for loop 2 PID operation Turns ON the output enable of CH 1 of the Q62DA Turns ON the output enable of CH 2 of the Q62DA Writes the MV of loop 1 to CH 1 of the Q62DA PID operation stop Writes the MV of loop 2 to CH 2 of the Q62DA Setting of common data of I O data Setting of I O data for ...

Страница 107: ...n the following devices Common data D500 and D501 Loop 1 data D502 to D511 5 The I O data is set in the following devices Common data D600 to D609 Loop 1 data D610 to D627 6 The SV and MV in manual mode are set with external digital switches as follows SV X30 to X3F MV manual control mode X20 to X2F 7 The following devices are used to start and stop PID control and the automatic manual changeover ...

Страница 108: ...ode the SV must be rewritten to the one used in the automatic mode before switching to the manual mode SV value in manual mode SV value in automatic mode Manual to automatic mode change command 1 s 10 s 1 s 1 s 1 s The SV is rewritten using the operation method illustrated below Incremental value Remainder SV value in manual mode SV value in automatice mode 10 The incremental value obtained with t...

Страница 109: ...ange rate limit to 2000 Sets the PV change rate limit to 2000 Sets the number of loops to be executed per scan to 1 Sets the PID control data that are set in D500 to D511 Sets the initial processing flag to 0 Inputs the SV externally Saves the SV for manual to automatic mode change processing PID operation start command I O data setting Sets the PV from the Q64AD to the I O data area Sets the manu...

Страница 110: ...ing time taken into consideration 10 is calculated the quotient is stored in D215 and the remainder in D216 Command to execute processing at 1 second intervals Counts the number of times Subtracts the quotient from the SV Processing to return the SV to the value used in the automatic mode Subtracts the remainder from the SV only at the first time Executes the PIDCONT instruction in either the manu...

Страница 111: ...3 1 System configuration for program examples The following illustrates the system configuration for the program examples in Sections 9 3 2 and 9 3 3 CPU module PID operation Loop 1 Loop 2 PV MV MV PV A62DA CH 1 CH 2 CH 1 CH 2 External device External device PID control status monitor AD57 CRT A68AD PID operation A68AD I O numbers X Y80 to X Y9F A62DA I O numbers X YA0 to X YBF AD57 I O numbers X ...

Страница 112: ...nd 4 The PID control data is set in the following devices 1 Common data D500 and D501 Loop 1 data D502 to D511 Loop 2 data D512 to D521 5 The I O data is set in the following devices 2 Common data D600 to D609 Loop 1 data D610 to D627 Loop 2 data D628 to D645 6 The following SV are set for loop 1 and loop 2 using a sequence program Loop 1 600 Loop 2 1000 7 The following devices are used for PID co...

Страница 113: ...n expression to forward operation Sets the sampling cycle to 1 s Sets the proportional constant to 1 Sets the integral constant to 3000 s Sets the derivative constant to 0 s Sets the filter coefficient to 0 Sets the MV lower limit to 0 Sets the MV upper limit to 2000 Sets the MV change rate limit to 2000 Sets the PV change rate limit to 2000 Setting of common data of PID control data Setting of PI...

Страница 114: ...o 2000 Sets the PID control data that are set in D500 to D521 Sets the initial processing flag to 0 Sets the SV to 600 Sets the automatic mode Sets the SV to 1000 Sets the automatic mode PID operation start command Reading the PV from the A68AD Sets the PV in the I O data area for loop 1 Sets the PV in the I O data area for loop 2 PID operation Setting of PID control data for loop 2 Setting of com...

Страница 115: ...nal ON Writes the MV values of loop 1 and loop 2 to the A62DA Stops PID operation Sets the initial screen display request Monitors PID control status with the AD57 REMARK It is also possible to create a program by using special function module devices In this case the format in the ladder is as follows DMOV D110 U0A G0 ...

Страница 116: ...devices Common data D500 and D501 Loop 1 data D502 to D511 5 The I O data is set in the following devices Common data D600 to D609 Loop 1 data D610 to D627 6 The SV and MV in manual mode are set with external digital switches as follows SV X30 to X3F MV manual control mode X20 to X2F 7 The following devices are used to start and stop PID control and the automatic manual changeover command PID cont...

Страница 117: ...SV must be rewritten to the one used in the automatic mode The SV is rewritten step by step 10 times as illustrated below SV value in manual mode SV value in automatic mode Manual to automatic mode change command 1 s 10 s 1 s 1 s 1 s The SV is rewritten using the operation method illustrated below Incremental value Remainder SV value in manual mode SV value in automatice mode 10 The incremental va...

Страница 118: ...ets the MV lower limit to 0 Sets the MV upper limit to 2000 Sets the MV change rate limit to 2000 Sets the PV change rate limit to 2000 Sets the PID control data that are set in D500 to D511 Sets the initial processing flag to 0 Inputs the SV externally Saves the SV for manual to automatic mode change processing PID operation start command Sets the PV from the A68AD to the I O data area Sets the m...

Страница 119: ...on Command to execute processing in 1 second intervals Counts the number of times Minus the quotient from the remainder Executes PIDCONT instruction in either the manual mode or automatic mode Turns ON the output enable of the A62DA Outputs the MV to the A62DA Stops PID operation Present SV value SV value in automatic mode 10 is caluculated the quotient is stored in D215 and remainder in D216 End ...

Страница 120: ...9 28 MELSEC Q QnA 9 COMPLETE DERIVATIVE PID CONTROL INSTRUCTIONS AND PROGRAM EXAMPLES MEMO ...

Страница 121: ...st 4550 0 1950 0 1950 0 S PIDCONT 32 loops Others 4450 0 1850 0 1850 0 S PIDSTOP S PIDRUN 1 loop 79 5 66 0 61 0 25 0 11 0 11 0 S PIDPRMW 1 loop 120 0 99 5 89 5 60 0 26 0 26 0 Processing Time s Q02UCPU Q03UDCPU Q03UDECPU Q04UDHCPU Q06UDHCPU Q13UDHCPU Q26UDHCPU Q04UDEHCPU Q06UDEHCPU Q13UDEHCPU Q26UDEHCPU Instruction Name Conditions Min Max Min Max Min Max 1 loop 14 2 49 4 14 9 22 1 11 4 18 8 8 loops...

Страница 122: ...9 PIDCONT 32 loops Others 4894 3680 1840 2036 9 876 7 876 7 First 9629 7240 3620 1 loop Others 606 456 228 First 9669 7270 3635 PID57 8 loops Others 3719 2796 1398 PIDSTOP PIDRUN 1 loop 11 2 8 4 4 2 22 0 18 5 17 0 4 5 1 9 1 9 PIDPRMW 1 loop 36 26 13 53 0 45 0 41 0 14 6 6 3 6 3 Processing Time s Q02UCPU Q03UDCPU Q03UDECPU Q04UDHCPU Q06UDHCPU Q13UDHCPU Q26UDHCPU Q04UDEHCPU Q06UDEHCPU Q13UDEHCPU Q26U...

Страница 123: ...e inversion of the deviation Since the anti reset windup measure is taken in the PID operation instruction PIDCONT instruction and S PIDCONT instruction of the QCPU QnACPU it is unnecessary to stop the integral operation Deviation Upper limit value t t Without anti reset windup measure If deviation turns to decreasing direction response of MV delays Broken line With anti reset windup measure Integ...

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

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

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

Отзывы: