Unitary

Pre-APOGEE

APOGEE

BACnet

PXC.A

Syntax

LOOP(type,pv,cv,sp,pg,ig,dg,st,bias,lo,hi,0)

type

Designates the type of control action.

- Valid values are 0 and 128.

0 = direct acting.

128 = reverse acting.

pv

Point name of the process variable which is being controlled or regulated.

- This parameter is usually an LAI point, but it can be an LAO point, which represents a temperature, flow rate, air velocity, etc.

cv

Point name of the loop output (control variable).

- This parameter is usually an LAO point that represents an actuator signal such as pressure, current, or voltage.

- This value can be entered as a local variable.

sp

Setpoint for the loop against which the process variable is compared. The value of the setpoint should represent the same engineering units as the process variable.

- This parameter can be entered as a point name or a decimal number.

- This value can be entered as a local variable.

pg

Proportional gain determines the part of a PID control action that is directly proportional to the error between the setpoint (sp) and the process variable (pv).

- This parameter can be entered as a point name, local variable, integer, or decimal.

Proportional gain is calculated using the following formula:

pg=

Full range of controlled device

× 1000

 

Throttling range to change the output device from full open to full close.

 

ig

Integral gain. The contribution of integral control action to the total control action of the loop. Integral action minimizes offset (the difference between the process variable and the setpoint). Adding integral gain can increase the time required to tune the loop.

When using integral gain, be sure to reduce the proportional gain so that the total gain of the loop is not high enough to cause instability and cycling. Begin with a low integral gain and increase it slowly, if required.  A recommended starting point is 2% of the proportional gain.

- This parameter can be a point name, integer, decimal, or local variable.

- If using an integral gain, use the following calculation:  ig = pg × .02.

- If not using an integral gain, set ig to 0.

dg

Derivative gain. The time rate of response of the control system. Derivative gain is usually applied to fast responding systems. Adding derivative gain can increase the time required to tune the loop.

- This parameter is entered as an integer, decimal, point name, or local variable.

- When derivative gain is not used, enter a zero.

st

Sample time. How frequently (in seconds) the process variable (pv) is sampled.

- The minimum sampling time allowed is 1 second.

- This parameter is entered as an integer, decimal, point name, or local variable.

bias

Bias is the value (in engineering units) of the control output (cv), in a proportional only loop, when the measured variable (pv) equals the setpoint (sp).

- This parameter entered as a decimal number, integer, point name, or logical point.

- The bias value should always be between the high and low value.

Bias is calculated by adding 50% of the output control span to the low limit.  For example, you would do the following to calculate the bias for a valve with a 3 to 8 psi spring range:

- Find one-half of the spring range. (5 psi spring range ÷ 2 = 2.5)

- Add that value to the low limit of the valve (3 psi).

- The bias for this device is 5.5 psi.

lo

Low limit of the loop output. The low limit should be set to match the low end range of the controlled device.

- This parameter is entered as a decimal, integer, point name, or local variable

hi

High limit of the loop output. The high limit should be set to match the high end range of the controlled device.

- This parameter is entered as a decimal, integer, point name, or local variable.

0

Not used. Enter zero.

Use

This command performs closed loop control by using any combination of proportional, integral, and derivative control actions in either direct or reverse acting modes.

LOOP monitors an input point (process variable), compares it with a desired value (the setpoint), and adjusts an output (control variable) to bring the input closer to the setpoint.

  • The LOOP command is the software counterpart to a pneumatic receiver controller.
  • Anti-windup is automatically prevented for the integral action once the high or low limit is reached.

Regardless of PPCL program execution rate property setting, the LOOP statement will execute at user defined second intervals. The system will ensure the user defined Sample time (st) is achieved.

Example

2000  C  CONTROL LOOP STATISTICS

2002  C  DIRECT CONTROL LOOP

2004  C  INPUT = RM100  OUTPUT = HVALVE

2006  C  SETPOINT = HSETPT

2008  C  PROPORTIONAL GAIN = PGAIN-NO I OR D GAINS

2010  C  SAMPLE TIME = 1 SECOND

2012  C  BIAS = 5.5

2014  C  LOW = 3.0

2016  C  HIGH = 9.0

2018  LOOP(0,RM100,HVALVE,HSETPT,PGAIN,0,0,1,5.5,3.0, 9.0,0)

See also the ADAPTM and ADAPTS topics.