{"id":3427,"date":"2026-11-17T21:35:04","date_gmt":"2026-11-17T13:35:04","guid":{"rendered":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/fbs-hw-en-022\/"},"modified":"2026-11-17T21:35:04","modified_gmt":"2026-11-17T13:35:04","slug":"fbs-hw-en-022","status":"publish","type":"post","link":"https:\/\/resource.fatek.com\/index.php\/2026\/11\/17\/fbs-hw-en-022\/","title":{"rendered":"Chapter 22 General Purpose PID Control"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-001.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-002.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-003.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-004.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-005.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-006.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-007.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-008.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-009.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-010.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-011.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-012.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-013.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> 22.1Introduction of PID Control <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>As the general application of process control, the open loop methodology may be good enough for most situations, because the key control elements or components are more sophisticated, and the performances of which are getting better, there is no doubt, the stability and reliability may meet the desired requirement. It is the way to get not bad C\/P value with great economic consideration. But the characteristics of the elements or components may change following the time eclipse and the controlling process may be affected by the change of loading or external disturbances, the performance of open loop becomes looser; it is the weakness of such solution. Thus, closed loop (with the sensors to feedback the real conditions of controlling process for loop calculation) PID control is one of the best choices for manufacturing process to make perfect quantity and best products. <\/p>\n<p>FBs-PLC provides digitized PID mathematical algorithm for general purpose application, it is enough for most of applications, but the response time of loop calculation will have the limitation by the scan time of PLC, thus it must be taken into consideration while in very fast closed loop control. <\/p>\n<p>\t For an introduction to key parts of a control loop, refer to the block diagram shown below. The closed path around the diagram is the &quot;loop&quot; referred to in &quot;closed loop control&quot;. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-014.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-015.png\" \/>\t<img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-016.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-017.png\" \/><\/p>\n<p> Typical Analog Loop Control System <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> 22.2How to Select the Controller <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>Depends on the requirement, the users may apply the suitable controller for different applications; it is much better of the thinking that the control algorithm is so simple and easy to operate and the final result will be good enough, that&#8217;s all. Therefore comes the answers, there are three types of controller could be activated from the PID mathematical expression, these are so called &quot;Proportional Controller\u201d, &quot;Proportional + Integral Controller&quot; and &quot;Proportional + Integral + Derivative Controller&quot;. The digitized mathematical expression of each controller shown bellows. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> 22.2.1Proportional Controller <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The digitized mathematical expression as follows:<\/p>\n<p>Mn = (D4005\/Pb) \u00d7 (En) + Bias <\/p>\n<p>Where, <\/p>\n<p>Mn \uff1aOutput at time \u201cn\u201d. <\/p>\n<p>D4005\uff1aThe gain constant, the default is 1000, it&#8217;s range is 1\uff5e5000. <\/p>\n<p>Pb \uff1aProportional band <br \/>&#8211; the expression stating the percent change in error required to change the output full scale. <\/p>\n<p>\t\uff3bRange\uff1a1\uff5e5000, unit in 0.1%\uff1bKc(gain)=D4005\/Pb\uff3d<br \/>En \uff1aThe difference between the set point (SP) and the process variable (PV) at time &quot;n&quot;; \t En = SP &#8211; PVn <br \/>Ts \uff1aSolution interval between calculations\uff08Range\uff1a1\uff5e3000, unit in 0.01S\uff09<br \/>Bias \uff1aOffset to the output\uff08Range\uff1a0\uff5e16383\uff09<\/p>\n<p> The algorithm of &quot;Proportional Controller&quot; is very simple and easy to implement, and it takes less time for loop calculation. Most of the general applications, this kind of controller is good enough, but it needs to adjust the offset \uff08Bias\uff09to the output to eliminate the steady state error due to the change of set point.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> 22.2.2Proportional + Integral Controller <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The digitized mathematical expression as follows: <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>\tn Mn =(D4005\/Pb) \u00d7 (En) +\u2211<\/p>\n<\/td>\n<td>\n<p> [(D4005\/Pb)\u00d7Ki\u00d7Ts\u00d7En]  + Bias <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>0<\/p>\n<p>Where, <br \/>\tMn \t\uff1a Output at time \u201cn\u201d. <\/p>\n<p>D4005\uff1aThe gain constant, the default is 1000, it&#8217;s range is 1\uff5e5000. <\/p>\n<p>Pb \t\uff1a Proportional band \uff3bRange\uff1a1\uff5e5000\uff0cunit in 0.1%\uff1bKc(gain)=D4005\/Pb\uff3dEn \t\uff1a The difference between the set point (SP) and the process variable (PV) at time &quot;n&quot;; \t\t En = SP &#8211; PVn <br \/>Ki \t\uff1a Integral tuning constant\uff08Range\uff1a0\uff5e9999\uff0cit means 0.00\uff5e99.99 Repeats\/Minute\uff09Ts <br \/>\t\uff1a Solution interval between calculations\uff08Range\uff1a1\uff5e3000, unit in 0.01S\uff09Bias \uff1a Offset to the output\uff08Range\uff1a0\uff5e16383\uff09<\/p>\n<p> The most benefit of the controller with integral item is to overcome the shortage of the &quot;Proportional Controller&quot; mentioned above; via the integral contribution, the steady state error may disappear, thus it is not necessary to adjust the offset manually while changing the set point. Almost, the offset\uff08Bias\uff09to the output will be 0. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> 22.2.3Proportional + Integral + Derivative Controller <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>The digitized mathematical expression as follows: <\/p>\n<p>n<\/p>\n<p>Mn = (D4005\/Pb) \u00d7 (En) +\u2211 [(D4005\/Pb)\u00d7Ki\u00d7Ts\u00d7En]  \u2212 [(D4005\/Pb)\u00d7Td\u00d7(PVn\u2212PVn-1)\/Ts] + Bias <\/p>\n<p>0<\/p>\n<p>Where, <\/p>\n<p>Mn \t\uff1aOutput at time \u201cn\u201d. <\/p>\n<p>D4005\uff1aThe gain constant, the default is 1000, it&#8217;s range is 1\uff5e5000. <\/p>\n<p>Pb \t\uff1aProportional band \uff3bRange\uff1a1\uff5e5000\uff0cunit in 0.1%\uff1bKc(gain)=D4005\/Pb\uff3d<\/p>\n<p>En \t\uff1a The difference between the set point (SP) and the process variable (PV) at time &quot;n&quot;; <\/p>\n<p> En = SP &#8211; PVn <\/p>\n<p>Ki \t\uff1a Integral tuning constant\uff08Range\uff1a0\uff5e9999\uff0cit means 0.00\uff5e99.99 Repeats\/Minute\uff09<\/p>\n<p>Td \t\uff1aDerivative tuning constant \uff08Range\uff1a0\uff5e9999\uff0cit means 0.00\uff5e99.99 Minute\uff09<\/p>\n<p>PVn \t\uff1a Process variable at time \u201cn\u201d <\/p>\n<p>PVn-1\uff1a Process variable when loop was last solved <\/p>\n<p>Ts \t\uff1aSolution interval between calculations\uff08Range\uff1a1\uff5e3000, unit in 0.01S\uff09<\/p>\n<p>Bias \t\uff1aOffset to the output\uff08Range\uff1a0\uff5e16383\uff09<\/p>\n<p> Derivative item of the controller may have the contribution to make the response of controlling process smoother <\/p>\n<p>and not too over shoot.  But because it is very sensitive of the derivative contribution to the process reaction, most of <\/p>\n<p>applications, it is not necessary of this item and let the tuning constant (Td) be equal to 0.<\/p>\n<p> 22.3Explanation of the PID Instruction and Example Program Follows <\/p>\n<p>The followings are the instruction explanation and program example for PID (FUN30) loop control of FBs-PLC. <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-018.png\" \/><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-019.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN 30 PID <\/p>\n<\/td>\n<td>\n<p>Convenient Instruction of PID Loop Operation <\/p>\n<\/td>\n<td>\n<p>FUN 30 PID <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"3\">\n<p>Mode<\/p>\n<\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\">\n<p>A\/M<\/p>\n<\/td>\n<td>\n<p>Ladder symbol <\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>ERR<\/p>\n<\/td>\n<td rowspan=\"3\"><\/td>\n<td rowspan=\"3\">\n<p>Setting error<\/p>\n<\/td>\n<td>\n<p>Ts \uff1aSolution interval between calculations <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>30.PID<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\uff081\uff5e3000 ; unit in 0.01S\uff09<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Ts   :<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td rowspan=\"4\"><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td rowspan=\"4\"><\/td>\n<td><\/td>\n<td rowspan=\"2\">\n<p>SR \uff1aStarting register of loop settings ; <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>Bumpless<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>BUM<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>SR  :<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>HAL<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>High alarm<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>it takes 8 registers in total. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>OR  :<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td rowspan=\"4\"><\/td>\n<td><\/td>\n<td rowspan=\"2\"><\/td>\n<td><\/td>\n<td rowspan=\"4\"><\/td>\n<td><\/td>\n<td rowspan=\"4\">\n<p>OR \uff1aOutput register of PID loop operation. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>Direction<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>D\/R<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>LAL<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>Low alarm<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>PR  :<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WR :<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td><\/td>\n<td>\n<p>PR \uff1aStarting register of loop parameters; <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>it takes 7registers. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>Range <\/p>\n<\/td>\n<td>\n<p>HR <\/p>\n<\/td>\n<td>\n<p>ROR <\/p>\n<\/td>\n<td>\n<p>DR <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>K <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>WR \uff1aStaring register of working registers <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>R0 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>R5000 <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>D0 <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>Ope- <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u2223<\/p>\n<\/td>\n<td>\n<p>\u2223<\/p>\n<\/td>\n<td>\n<p>\u2223<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>rand <\/p>\n<\/td>\n<td>\n<p>R3839 <\/p>\n<\/td>\n<td>\n<p>R8071 <\/p>\n<\/td>\n<td>\n<p>D3999 <\/p>\n<\/td>\n<td rowspan=\"7\">\n<p>1\uff5e3000<\/p>\n<\/td>\n<td>\n<p>for this instruction ; <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Ts <\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>it takes 5 registers and can&#8217;t be <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>SR <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb* <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p>repeated in using. <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>OR <\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb* <\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>PR <\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb* <\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>WR <\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<td>\n<p>\u25cb* <\/p>\n<\/td>\n<td>\n<p>\u25cb<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>\u25cf\tThe FBs-PLC software algorithm uses mathematical functions to simulate a three-mode (PID) analog <\/p>\n<p>controlling technique to provide direct digital control. The control technique responds to an error with an <\/p>\n<p>output signal. The output is proportional to the error, the error&#8217;s integral and the rate of change of the process <\/p>\n<p>variable. Control algorithms include, P, PI, PD and PID which all include the features of auto\/manual <\/p>\n<p>operation, bumpless\/balanceless transfers, reset wind-up protection, and adaptive tuning of gain, integral, <\/p>\n<p>and derivative terms. <\/p>\n<p>\u25cf\tThe digitized mathematical expression of FBs-PLC PID instruction as bellows: <\/p>\n<p>n<\/p>\n<p>Mn = (D4005\/Pb) \u00d7 (En) +\u2211 [(D4005\/Pb)\u00d7Ki\u00d7Ts\u00d7En]  \u2212 [(D4005\/Pb)\u00d7Td\u00d7(PVn\u2212PVn-1)\/Ts] + Bias <\/p>\n<p>0<\/p>\n<p> Where, <\/p>\n<p>Mn \t\uff1a Output at time \u201cn\u201d <\/p>\n<p>D4005  \uff1a The gain constant, the default is 1000, which can be set between 1\uff5e5000. <\/p>\n<p>Pb \t\uff1a Proportional band <\/p>\n<p>&#8211; the expression stating the percent change in error required to change the output full scale. <\/p>\n<p>\uff3bRange\uff1a1\uff5e5000\uff0cunit in 0.1%\uff1bKc(gain)=D4005\/Pb\uff3d<\/p>\n<p>Ki \t\uff1a Integral tuning constant \uff08Range\uff1a0\uff5e9999\uff0cit means 0.00\uff5e99.99 Repeats\/Minute\uff09<\/p>\n<p>Td \t\uff1a Derivative tuning constant \uff08Range\uff1a0\uff5e9999\uff0cit means 0.00\uff5e99.99 Minute\uff09<\/p>\n<p>PVn\t\uff1a Process variable at time \u201cn\u201d <\/p>\n<p>PVn-1\t\uff1a Process variable when loop was last solved <\/p>\n<p>En\t\uff1a The difference between the set point (SP) and the process variable (PV) at time &quot;n&quot;; <\/p>\n<p> En = SP &#8211; PVn <\/p>\n<p>Ts\t\uff1a Solution interval between calculations\uff08Range\uff1a1\uff5e3000, unit in 0.01S\uff09<\/p>\n<p>Bias \t\uff1a Offset to the output\uff08Range\uff1a0\uff5e16383\uff09<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN30 PID <\/p>\n<\/td>\n<td>\n<p>Convenient Instruction of PID Loop Operation <\/p>\n<\/td>\n<td>\n<p>FUN30 PID <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>Principle of PID parameter adjustment <\/p>\n<p>zAs the proportional band (Pb) adjustment getting smaller, the larger the proportional contribution to the output.  This can obtain a sensitive and rapid control reaction.  However, when the proportional band is too small, it may cause oscillation.  Do the best to adjust \u201cPb\u201d smaller (but not to the extent of making oscillation), which could increase the process reaction and reduce the steady state error.<\/p>\n<p>zIntegral item may be used to eliminate the steady state error.  The larger the number (Ki, integral tuning constant), the larger the integral contribution to the output.  When there is steady state error, adjust the \u201cKi\u201d larger to decrease the error. <\/p>\n<p>When the \u201cKi\u201d = 0, the integral item makes no contribution to the output.<\/p>\n<p>For ex, if the reset time is 6 minutes, Ki=100\/6=17\uff1bif the integral time is 5 minutes, Ki=100\/5=20.<\/p>\n<p>zDerivative item may be used to make the process smoother and not too over shoot.  The larger the number (Td, derivative tuning constant), the larger the derivative contribution to the output.  When there is too over shoot, adjust the \u201cTd\u201d larger to decrease the amount of over shoot. <\/p>\n<p>When the \u201cTd\u201d = 0, the derivative item makes no contribution to the output. <\/p>\n<p>For ex, if the rate time is 1 minute, then the Td = 100; if the rate time is 2 minutes, then the Td = 200.<\/p>\n<p>zProperly adjust the PID parameters can obtain an excellent result for loop control.<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> Instruction description <\/p>\n<\/td>\n<td><\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>z When control input &quot;A\/M&quot;=0, it performs manual control and will not execute the PID calculation. Directly \tfill the output value into the output register (OR) to control the loop operation. <\/p>\n<p>z When control input &quot;A\/M&quot;=1, it defines the auto mode of loop control; the output of the loop operation is  loaded by the PID instruction every time it is solved. It is equal to Mn (control loop output) in the digital \t\tapproximation equation. <\/p>\n<p>z When control input &quot;BUM&quot;=1, it defines bumpless transfer while the loop operation changing from manual \tinto auto mode. <\/p>\n<p>z When control input &quot;A\/M&quot;=1, and direction input &quot;D\/R&quot;=1, it defines the direct control for loop operation; \tit means the output increases as error increases <\/p>\n<p>z When control input &quot;A\/M&quot;=1, and direction input &quot;D\/R&quot;=0, it defines the reverse control for loop operation; \tit means the output decreases as error increases <\/p>\n<p>z When comes the error setting of loop setting points or loop parameters, the PID operation will not be \tperformed and the output indication &quot;ERR&quot; will be ON <\/p>\n<p>z While the engineering value of the controlling process is greater than or equal to the user set High Limit, \tthe output indication &quot;HAL&quot; will be ON regardless of &quot;A\/M&quot; state. <\/p>\n<p>z While the engineering value of the controlling process is less than or equal to the user set Low Limit, the \toutput indication &quot;LAL&quot; will be ON regardless of &quot;A\/M&quot; state.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN30 PID <\/p>\n<\/td>\n<td>\n<p>Convenient Instruction of PID Loop Operation <\/p>\n<\/td>\n<td>\n<p>FUN30 PID <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>\u25cf\t<strong>Description of operand Ts<\/strong>\uff1a<\/p>\n<p>zTs\uff1aIt defines the solution interval between PID calculations, the unit is in 0.01 sec; this term may be \tconstant or variable data. <\/p>\n<p>\u25cf\t<strong>Description of operand SR (Loop setting registers)<\/strong>\uff1a<\/p>\n<p>zSR+0 = Scaled Process Variable\uff1aThis register is loaded by the PID instruction every time it gets solved. A linear scaling is done on SR+6 using the high  and low engineering range found in SR+4 and SR+5. <\/p>\n<p>zSR+1 = Setpoint (SP) \uff1aThe user must load this register with the desired setpoint the loop should control \tat. The setpoint is entered in engineering units, it must be the range\uff1aLER \u2266 SP \u2266 HER <\/p>\n<p>zSR+2 = High Alarm Limit (HAL)\uff1a The user must load this register with the value at which the process variable should be alarmed as a high alarm (above the setpoint). This value is entered as the actual alarm point in engineering units and it must be the range\uff1aLER \u2266 LAL &lt; HAL \u2266 HER <\/p>\n<p>zSR+3 = Low Alarm Limit (LAL)\uff1a The user must load this register with the value at which the process variable should be alarmed as a low alarm (below the setpoint). This value is entered as the actual alarm point in engineering units and it must be the range\uff1aLER \u2266 LAL &lt; HAL \u2266 HER <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>zSR+4 = High Engineering Range (HER)\uff1a The user must load this register with the highest <\/p>\n<\/td>\n<td>\n<p>value <\/p>\n<\/td>\n<td>\n<p>for <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>which the measurement device is spanned. (For example a thermocouple might be spanned for 0 to 500 degrees centigrade, resulting in a 0 to 10V analog input to the FBs-PLC (0V=0\u2103, 10V=500\u2103); the high engineering range is 500, this is the value entered into SR+4.) <br \/> The high engineering range must be\uff1a\u22129999 &lt; HER \u2266 19999 <\/p>\n<p>zSR+5 = Low Engineering Range (LER)\uff1aThe user must load this register with the lowest value for which \tthe measurement device is spanned. <\/p>\n<p>The low engineering range must be\uff1a\u22129999 \u2266 LER \u2266 LAL &lt; HAL \u2266 HER <\/p>\n<p>zSR+6 = Raw Analog Measurement (RAM)\uff1aThe user&#8217;s program must load this register with the process variable (measurement). It is the value that the  content of analog input register\uff08R3840\uff5eR3903\uff09is added by the offset if necessary. It must be the range\uff1a0 \u2266 RAM \u2266 16380 if the analog input is 14-bit format but valid 12-bit resolution, and 0 \u2266 RAM \u2266 16383 if the analog input is 14-bit format and valid 14-bit resolution. <\/p>\n<p>The resolution of analog input can be defined by register D4004, <br \/>D4004=0, it means 14-bit format but valid 12-bit resolution ; D4004=1, it means 14-bit format and valid 14-bit resolution. <\/p>\n<p>zSR+7 = Offset of Process Variable (OPV)\uff1aThe user must load this register with the  value as described follows: OPV must be 0 if the raw analog signal and the measurement span of the analog input module are all 0\uff5e20mA, there is no loss of the measurement resolution; OPV must be 3276 if the raw analog signal is 4\uff5e20mA but the measurement span of the analog input module is 0\uff5e20mA, there will have few loss of the measurement resolution\uff0816383\u00d74 \/ 20 = 3276\uff09. <\/p>\n<p> It must be the range\uff1a 0 \u2266 OPV &lt; 16383 <\/p>\n<p>z When the setting mentioned above comes error, it will not perform PID operation and the output indication \t&quot;ERR&quot; will be ON. <\/p>\n<p>\u25cf\t<strong>Description of operand OR<\/strong>\uff1a<\/p>\n<p>zOR\uff1aOutput register, this register is loaded directly by the user while the loop in manual operation mode. While the loop in auto operation mode, this register is loaded by the PID instruction every time it is solved. It is equal to Mn (control loop output) in the digital approximation equation. It must be the range\uff1a0 \u2266 OR \u2266 16383 <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN 30 PID <\/p>\n<\/td>\n<td>\n<p>Convenient Instruction of PID Loop Operation <\/p>\n<\/td>\n<td>\n<p>FUN 30 PID <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<p>\u25cf\t<strong>Description of operand PR (Loop parameters)<\/strong>\uff1a<\/p>\n<p>zPR+0 =  Proportional Band (Pb)\uff1aThe user must load this register with the desired proportional constant. The proportion constant is entered as a value  between 1 and 5000 where the smaller the number, the larger the proportional contribution. <\/p>\n<p>(This is because the equation uses D4005 divided  by Pb.) <br \/> It must be the range\uff1a1 \u2266 Pb \u22665000, unit is in 0.1% <br \/> Kc(gain)=D4005\/ Pb; the default of D4005 is 1000, and it&#8217;s range is 1 \u2266 D4005 \u22665000. <\/p>\n<p>zPR+1 = Integral tuning Constant (Ki)\uff1aThe user may load this register to add integral action to the calculation. The value entered is &quot;Repeats\/Minute&quot; and is entered as a number between 0 and 9999.  (The actual range is 00.00 to 99.99 Repeats\/Minute.) The larger the number, the larger the integral contribution to the output. <\/p>\n<p> It must be the range\uff1a0 \u2266 Ki \u2266 9999 (0.00\uff5e99.99 Repeats\/Minute) <\/p>\n<p>zPR+2 = Rate Time Constant (Td)\uff1aThe user may load this register to add derivative action to the calculation. The value is entered as minutes and entered as a number between 0 and 9999. (The actual range is 0.00 to 99.99 minutes.) The larger the number, the larger the derivative contribution to the output. <\/p>\n<p> It must be the range\uff1a0 \u2266 Td \u2266 9999 (0.00\uff5e99.99 Minutes) <\/p>\n<p>zPR+3 = Bias\uff1aThe user may load this register if a bias is desired to be added to the output when using PI or PID control. A bias must be used when running proportional only control. The bias is entered as a value between 0 and 16383 and is added directly to the calculated output. Bias is  not required for most applications and may be left at 0. <\/p>\n<p> It must be the range\uff1a0 \u2266 Bias \u2266 16383 <\/p>\n<p>zPR+4 = High Integral Wind_up Limit (HIWL)\uff1aThe user must load this register with  the output value, (1 to 16383), at which the loop shoud go into &quot;anti-reset wind-up&quot; mode. Anti-reset wind-up consists of solving the digital approximation for the integral value. For most applications this should be set to 16383. <\/p>\n<p> It must be the range\uff1a1 \u2266 HIWL \u2266 16383 <\/p>\n<p>zPR+5 = Low Integral Wind_up Limit (LIWL)\uff1aThe user must load this register with  the output value, (0 to 16383), at which the loop shoud go into &quot;anti-reset wind-up&quot; mode. It functions in the same manner as PR+4. For most applications this should be set to 0. <\/p>\n<p> It must be the range\uff1a0 \u2266 LIWL \u2266 16383 <\/p>\n<p>zPR+6 = PID Method\uff1a<br \/>=0 , Standard PID method; <br \/>=1 , Minimum Overshoot Method; <br \/>Method 0 is prefer because most applications using PI control (Td=0). <\/p>\n<p>The user may try method 1 when using PID control and the result is not stable. <\/p>\n<p>zWhen the setting mentioned above comes error, it will not perform PID operation and the output indication \t&quot;ERR&quot; will be ON. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/resource.fatek.com\/wp-content\/uploads\/fatek\/fbs-hw-en-022\/fbs-hw-en-022-020.png\" \/><\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td colspan=\"2\">\n<p>FUN 30 <br \/>PID <\/p>\n<\/td>\n<td>\n<p>Convenient Instruction of PID Loop Operation <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>FUN 30 <br \/>PID <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>\u25cf<\/p>\n<\/td>\n<td colspan=\"2\">\n<p><strong>Description of operand WR (Working registers)<\/strong>\uff1a<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>zWR+0 = Loop status register\uff1a<br \/>\tBit0 =0 , Manual operation mode <br \/>\t\t =1 , Auto mode <br \/>\tBit1 : This bit will be a 1 during the scan the solution is being solved, \t\t\t and it is ON for a scan time.  <\/p>\n<p>Bit2=1 , Bumpless transfer <br \/>Bit4 : The status of &quot;ERR&quot; indication <br \/>Bit5 : The status of &quot;HAL&quot; indication <br \/>Bit6 : The status of &quot;LAL&quot; indication <\/p>\n<p>z WR+1 = Loop timer register\uff1aThis register stores the cyclic timer reading from the system&#8217;s 1ms cyclic timer each time the loop is solved. The elapsed time is calculated by calculating the difference between the current reading of the system&#8217;s 1ms cyclic timer and the value stored in this register. This difference is compared to 10\u00d7 the solution interval. If the difference is greater than or equal to the solution interval, the loop should be solved this scan. <\/p>\n<p>z WR+2 = Low order integral summation\uff1aThis register stores the low order 16 bits of the 32-bit sum \t created by the integral term.  <\/p>\n<p>z WR+3 = High order integral summation\uff1aThis register stores the high order 16 bits of the 32-bit sum \t created by the integral term. <\/p>\n<p>z WR+4 = Process variable &#8211; previous solution\uff1aThe raw analog input (Register SR+6) at the time the loop \t was last sovled. This is used for the derivative control  \t\t mode.  <\/p>\n<p> Program example <\/p>\n<p>z Adding the content of analog input register with the offset<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p> R2000 and stores it into R1006 being as the raw analog <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>EN<\/p>\n<\/td>\n<td colspan=\"3\">\n<p>11.(+)<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>D=0<\/p>\n<\/td>\n<td rowspan=\"8\">\n<p>Y0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> input of PID instruction.<\/p>\n<\/td>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>:  R3840<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>z When the value of R3840 is -8192\uff5e8191, the value of <\/p>\n<\/td>\n<td rowspan=\"6\">\n<p>U\/S<\/p>\n<\/td>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>:  R2000<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>CY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>D<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"3\">\n<p>:  R1006<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> R2000 must be 8192 ; the value of R3840 is 0\uff5e16383, <\/p>\n<\/td>\n<td rowspan=\"4\">\n<p>BR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p> then the value of R2000 must be 0.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\" rowspan=\"2\">\n<p>30.PID<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>M0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>z X0=0\uff0cManual operation <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>A\/M<\/p>\n<\/td>\n<td>\n<p>Ts<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>:  R999<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>ERR<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>Y1<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>SR<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>:  R1000<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">\n<p> =1\uff0cAuto operation <\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>BUM<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>OR<\/p>\n<\/td>\n<td colspan=\"2\" rowspan=\"2\">\n<p>:  R1010<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>HAL<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"3\">\n<p>Y2<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Pr<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>:  R1020<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>D\/R<\/p>\n<\/td>\n<td colspan=\"2\">\n<p>WR<\/p>\n<\/td>\n<td>\n<p>:  R1030<\/p>\n<\/td>\n<td>\n<p>LAL<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>12.(-)<\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td rowspan=\"2\">\n<p>z R1010 is the output of PID instruction. <\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>EN<\/p>\n<\/td>\n<td>\n<p>Sa<\/p>\n<\/td>\n<td>\n<p>:  R1010<\/p>\n<\/td>\n<td>\n<p>D=0<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p>Sb<\/p>\n<\/td>\n<td>\n<p>:  R2001<\/p>\n<\/td>\n<td rowspan=\"2\">\n<p>CY<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>z Deducting the offset R2001 from the output value <\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>U\/S<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>D<\/p>\n<\/td>\n<td rowspan=\"3\">\n<p>:  R3904<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">\n<p>BR<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p> and stores it into the analog output register for analog <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p> output. <\/p>\n<p>z If the output value of R3904 is 0\uff5e16383,  the value of <br \/>\t R2001 must be 0 ; If the value of  R3904 is -8192\uff5e8191, <br \/>\t\tthe value of R2001 must be 8192. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>FUN 30 PID <\/p>\n<\/td>\n<td>\n<p>Convenient Instruction of PID Loop Operation <\/p>\n<\/td>\n<td>\n<p>FUN 30 PID <\/p>\n<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>R999 \uff1aThe setting of solution interval between <br \/>calculations; for example the content of R999 is 200, it means it will perform this PID operation every 2 seconds. <\/p>\n<p>R1000 \uff1aScaled process variable, which is the engineering unit loaded by the PID instruction every time it gets solved. A linear scaling is done on R1006 using the high and low engineering range found in R1004 and R1005. <\/p>\n<p>R1001 \uff1aSetpoint, it is the desired value the loop should control at; which is entered in engineering unit. For example the span of controlling process is 0\u00b0C\uff5e500\u00b0C, the setting of R1001 is equal to 100, it means the desired result is at 100\u00b0C. <\/p>\n<p>R1002 \uff1aThe setting of high alarm limit; which is entered in \tengineering unit. <\/p>\n<p>The example mentioned above, if the setting of R1002 is equal to 105, it means there will have the high alarm while the loop is greater than or equal to 105\u00b0C. <\/p>\n<\/td>\n<td>\n<p>R1020 \uff1aThe setting of proportional band; for example the content of R1020 is 20, it means the proportional band is 2.0% and the gain is 50. <\/p>\n<p>R1021 \uff1aThe setting of integral tuning constant; for example the content of R1021 is 17, it means the reset time is 6 minutes (100\/6\u225217). <\/p>\n<p>R1022 \uff1aThe setting of derivative tuning constant; for example the content of R1022 is 0, it means PI control. <\/p>\n<p>R1023 \uff1aThe setting of the bias to the output; most applications let it be 0. <\/p>\n<p>R1024 \uff1aThe setting of high integral wind-up; most applications let it be 16383. <\/p>\n<p>R1025 \uff1aThe setting of low integral wind-up; most applications let it be 0. <\/p>\n<p>R1026 \uff1aThe setting of PID method; most applications let it be 0. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>R1003 \uff1aThe setting of low alarm limit; which is entered in <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>engineering unit.  The example mentioned, if the setting of R1003 is equal to 95, it means there will have the low alarm while the loop is less than or equal to 95\u00b0C. <\/p>\n<p>R1004 \uff1aThe setting of high engineering range.  The example mentioned, if the setting of R1004 is equal to 500, it means the highest value of this loop is 500\u00b0C. <\/p>\n<p>R1005 \uff1aThe setting of low engineering range.  The example mentioned, if the setting of R1005 is equal to 0, it means the lowest value of this loop <\/p>\n<\/td>\n<td>\n<p>R1030 = Loop status register <br \/>Bit0 =0, Manual operation mode <br \/>\t\t\t=1, Auto operation mode <br \/>\tBit1 : This bit will be a 1 during the scan the \t\t\tsolution is being solved, and it is ON for \t\t\ta scan time. <\/p>\n<p>Bit2=1 , Bumpless transfer <br \/>Bit4 : The status of &quot;ERR&quot; indication Bit5 : The status of &quot;HAL&quot; indication Bit6 : The status of &quot;LAL&quot; indication <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>is 0\u00b0C. <\/p>\n<div class=\"fatek-tw\">\n<table>\n<tr>\n<td>\n<p>R1006 \uff1aRaw analog measurement; it is the value that the content of analog input register (R3840\uff5eR3903) is added by the offset of 2048. <\/p>\n<\/td>\n<td>\n<p>R1031\uff5eR1034: They are the working registers, please refer to the description of operand WR. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n<p>R1007 \uff1aOffset of process variable; let it be 0 if the raw <br \/>analog signal and the span of the analog input <br \/>module are all 0\uff5e10V. <\/p>\n<\/td>\n<\/tr>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>22.1Introduction of PID Control As the general applicat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[],"class_list":["post-3427","post","type-post","status-publish","format-standard","hentry","category-en-fbs-hw"],"_links":{"self":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/comments?post=3427"}],"version-history":[{"count":0,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/posts\/3427\/revisions"}],"wp:attachment":[{"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/media?parent=3427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/categories?post=3427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/resource.fatek.com\/index.php\/wp-json\/wp\/v2\/tags?post=3427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}