Anda di halaman 1dari 35

CONFIGURATION GUIDE

CG39ARCAL-1
Rev: 1
January 1999

APACS+TM
Advanced Regulatory Control
Application Library
Version 4.00 or Higher
CG39ARCAL-1 CONTENTS

TABLE OF CONTENTS

SECTION AND TITLE PAGE

1.0 INTRODUCTION ...........................................................................................................................1-1


1.1 PRODUCT DESCRIPTION .......................................................................................................1-2
1.2 PRODUCT SUPPORT................................................................................................................1-2
1.3 RELATED LITERATURE .........................................................................................................1-4

2.0 SINGLE_LOOP_FF (Single Loop with Feedforward) ................................................................2-1


2.1 TUNING ......................................................................................................................................2-1

3.0 SINGLE_LOOP_AG (Single Loop with Adaptive Gain) ............................................................3-1


3.1 TUNING ......................................................................................................................................3-1

4.0 SINGL_LP_ONOFF (On/Off Single Loop) ..................................................................................4-1


4.1 TUNING .....................................................................................................................................4-1

5.0 SINGLE_LOOP_SR (Split-Range Single Loop) ..........................................................................5-1

6.0 SINGLE_LOOP_TP (Single Loop with Time-Proportioned Discrete Output).........................6-1

7.0 SINGLE_LOOP_FB (Single Loop with External Feedback)......................................................7-1


7.1 TUNING .....................................................................................................................................7-1

8.0 SINGLE_LOOP_OR (Single Loop with Override Selector) .......................................................8-1


8.1 TUNING .....................................................................................................................................8-1

9.0 SINGLE_LP_B_SW (Single Loop with Batch Switch) ................................................................9-1


9.1 TUNING .....................................................................................................................................9-1

10.0 SINGLE_LP_B_EXT (Single Loop with Batch Extension)......................................................10-1


10.1 TUNING ..................................................................................................................................10-2

11.0 SINGLE_LP_PRGSP (Single Loop with Programmed Setpoint)............................................11-1

12.0 SINGLE_LOOP_MD (Single Loop with Maximum Deviation) ..............................................12-1

13.0 SINGLE_LP_STPWT (Step and Wait Single Loop).................................................................13-1


13.1 TUNING ..................................................................................................................................13-2
13.2 ANALYSIS OF STEP AND WAIT CONTROLLER .............................................................13-2

14.0 SINGLE_LP_CMPFB (Complimentary Feedback Single Loop) ............................................14-1


14.1 TUNING ..................................................................................................................................14-2
14.2 ANALYSIS OF COMPLEMENTARY FEEDBACK CONTROLLER .................................14-2

January 1999 i
CONTENTS CG39ARCAL-1

15.0 SINGLE_LP_SM_PR (Smith Predictor Single Loop) ..............................................................15-1


15.1 TUNING ..................................................................................................................................15-2
15.2 ANALYSIS OF SMITH PREDICTOR CONTROLLER........................................................15-2

16.0 SINGLE_LP_CF_SR (Split-Range Coarse/Fine Single Loop).................................................16-1

17.0 SINGLE_LP_CF_FL (Floating Coarse/Fine Single Loop).......................................................17-1


17.1 TUNING ..................................................................................................................................17-1

18.0 SINGLE_LP_CF_CS (Center-Seeking Coarse/Fine Single Loop)...........................................18-1


18.1 TUNING ..................................................................................................................................18-2

19.0 BAL_2FE (Balance of Two Final Control Elements)................................................................19-1

20.0 BAL_3FE (Balance of Three Final Control Elements) .............................................................20-1

21.0 BIAS_FE (Bias of a Final Control Element) ..............................................................................21-1

22.0 INTERP_XY (Interpolation of X-Y Data) .................................................................................22-1

23.0 INTERP_XYZ (Interpolation of X-Y-Z Data)...........................................................................23-1

24.0 ST_TIME_SLICE_EX (Structured Text Time-Slice Example)...............................................24-1

LIST OF TABLES

FIGURE AND TITLE PAGE

1-1 TIC CONTACT INFORMATION................................................................................................1-3

Moore Products Co. assumes no liability for errors or omissions in this document or for the application and use of information
included in this document. The information herein is subject to change without notice.

The Moore logo, APACS+ and 4-mation are trademarks of Moore Products Co. All other trademarks are the property of the
respective owners.

Copyright 1999 Moore Products Co. All rights reserved

ii January 1999
CG39ARCAL-1 INTRODUCTION

1.0 INTRODUCTION
The Advanced Regulatory Control Application Library (Version 4.00 or higher) is a set of derived
function blocks (DFBs) that are pre-configured at the factory to perform advanced regulatory control
functions within the framework of the 4-mationTM configuration software. The library is in the form of a
stand-alone, off-line, advanced control module (ACM) configuration that is part of a system named
BATCH. The configuration is opened like any other off-line database. When open, the blocks can be
selectively copied from the library configuration and pasted into a user-developed configuration. The
library can be used directly from the floppy or from a hard disk after first copying the entire library floppy
contents (with all subdirectories intact) onto the hard disk.

This configuration guide presents support information for understanding and using the function blocks of
the Advanced Regulatory Control Application Library. This information includes a description of what
each block does, the inputs and outputs of the block, and how to tune the blocks where applicable.

The guide is organized with a separate section for each function block in the application library. The
sections are presented in the following order:

Section 2, SINGLE_LOOP_FF (Single Loop w/ Feedforward)

Section 3, SINGLE_LOOP_AG (Single Loop w/ Adaptive Gain)

Section 4, SINGL_LP_ONOFF (On/Off Single Loop)

Section 5, SINGLE_LOOP_SR (Split-Range Single Loop)

Section 6, SINGLE_LOOP_TP (Single Loop w/ Time-Proportioned Discrete Output)

Section 7, SINGLE_LOOP_FB (Single Loop w/ External Feedback)

Section 8, SINGLE_LOOP_OR (Single Loop w/ Override Selector)

Section 9, SINGLE_LP_B_SW (Single Loop w/ Batch Switch)

Section 10, SINGL_LP_B_EXT (Single Loop w/ Batch Extension)

Section 11, SINGL_LP_PRGSP (Single Loop w/ Programmed Setpoint)

Section 12, SINGLE_LOOP_MD (Single Loop w/ Maximum Deviation)

Section 13, SINGL_LP_STPWT (Step and Wait Single Loop)

Section 14, SINGL_LP_CMPFB (Complementary Feedback Single Loop)

Section 15, SINGL_LP_SM_PR (Smith Predictor Single Loop)

Section 16, SINGL_LP_CF_SR (Split-Range Coarse/Fine Single Loop)

January 1999 1-1


INTRODUCTION CG39ARCAL-1

Section 17, SINGL_LP_CF_FL (Floating Coarse/Fine Single Loop)

Section 18, SINGL_LP_CF_CS (Center-Seeking Coarse/Fine Single Loop)

Section 19, BAL_2FE (Balance of Two Final Control Elements)

Section 20, BAL_3FE (Balance of Three Final Control Elements)

Section 21, BIAS_FE (Bias of a Final Control Element)

Section 22, INTERP_XY (Interpolation of X-Y Data)

Section 23, INTERP_XYZ (Interpolation of X-Y-Z Data)

Section 24, ST_TIME_SLICE_EX (Structured Text Time-Slice Example)

1.1 PRODUCT DESCRIPTION

This application library consists of derived and standard function blocks that perform advanced regulatory
control functions such as Feedforward, Batch Switch, Coarse/Fine, and Smith Predictor. Additional
control features are provided by the balancing circuits for multiple final control elements and an
auto/manual biasing circuit for a final control element. The library also includes two data interpolation
blocks, one for Y vs. X data (an expandable linear characterizer) and one for Z vs. X and Y data (a table
lookup block), and a structured text block that demonstrates how a complex calculation can be time-sliced
(executed in parts) to minimize the impact on each individual controller scan.

1.2 PRODUCT SUPPORT

Product support can be obtained from a Technical Information Center (TIC). Each regional TIC is a
customer service center that provides direct telephone support on technical issues related to the
functionality, application, and integration of all products supplied by Moore. Regional TIC contact
information is provided in Table 1-1. Your regional TIC is the first place you should call when seeking
product support information. When calling, it is helpful to have the following information ready:

Caller ID number, or name and company name - When someone calls for support for the first time, a
personal caller number is assigned. Having the number available when calling for support will allow
the TIC representative taking the call to use the central customer database to quickly identify the
caller=s location and past support needs.

Product part number or model number and version

If there is a problem with the product=s operation:


- Whether or not the problem is intermittent
- The steps performed before the problem occurred
- Any error messages or LED indications displayed
- Installation environment

1-2 January 1999


CG39ARCAL-1 INTRODUCTION

Customers that have a service agreement (ServiceSuite or Field Service Agreement) are granted access to
the secure area of our Web site (www.mooreproducts.com/techservices). This area contains a variety of
product support information. To log on, you will be prompted to enter your username and password.

TIC North America also offers a free faxback service called FaxRequest. You can dial-in to this service to
access documents such as press releases, product information sheets, and training schedules. The service
is completely automated and available 24 hours a day. To access this service, call the FaxRequest
number listed in Table 1-1. The first document you should request is the directory (document number
9999). This document is constantly updated as new documents are added. Each document has a number
code assigned to it that you enter along with your fax number (area code entry is always required). Upon
completing your entry, the FaxRequest computer automatically calls your fax machine and sends the
requested documents.

TABLE 1-1 TIC CONTACT INFORMATION

Tel: +1 215 646 7400, extension 4842, option 1

Fax: +1 215 283 6343

TIC E-mail: natic@mpco.com


NORTH AMERICA
FaxRequest: +1 215 646 7400, extension 4842, option 2

Bulletin Board Service: +1 215 283 4968

Hours of Operation: 8 am to 6 pm eastern time

Secure Web Site: www.mooreproducts.com/techservices

Tel: +65 299 6454

Fax: +65 299 6053


TIC
ASIA-PACIFIC E-mail: aptic@mpco.com

Hours of Operation: 9 am to 6 pm Singapore time

Secure Web Site: www.mooreproducts.com/techservices

January 1999 1-3


INTRODUCTION CG39ARCAL-1

TABLE 1-1 Continued

Tel: +44 1935 470172

Fax: +44 1935 706969


TIC
EUROPE E-mail: eutic@mpco.com

Hours of Operation: 8:30 am to 5:15 pm GMT/BST

Secure Web Site: www.mooreproducts.com/techservices

1.3 RELATED LITERATURE

The following Moore literature is available for reference:

AGA Natural Gas Flow Calculations in the APACS Controller (AD39-3)

For 4-mation configuration software, versions 3.XX:

- 4-mation Users Manual, Installation and Operation (UM39-6)


- 4-mation Users Manual, Function Block Languages (UM39-7)

For 4-mation configuration software, versions 4.XX:

- 4-mation Installation and Operation (UM39-11)


- 4-mation Function Block Language (UM39-12)

The following vendor literature should be available as needed:

Microsoft MS-DOS Operating System Reference


Microsoft Windows 3.1 (or later) Operating System Reference

1-4 January 1999


CG39ARCAL-1 SINGLE_LOOP_FF

2.0 SINGLE_LOOP_FF (Single Loop with Feedforward)


The derived block SINGLE_LOOP_FF is a steady-state, feedforward, single loop controller. It is a
modified SINGLE_LOOP Basic block with a feedforward value added to the output of the controller
block. With this modification, the output changes immediately when the feedforward variable changes
and the controller block merely trims the feedforward value to ensure that the process variable equals the
setpoint.

The FF_LEADLAG block allows dynamics to be applied to the feedforward variable. The GAIN softlist
value of the FF_LEADLAG block scales the feedforward variable. The resulting value, FF, is added on
to the controller output by the FF_ADD block. For the controller to operate properly, the feedback signal
must be comprised of only the controllers contribution to the output, so the FF value is subtracted from
the [OUT] value at the FF_SUB block. Note that the output range of the CONTROLLER block is -100 to
100 (not 0 to 100) so that it can trim the feedforward variable over the entire range.

The inputs and outputs for the SINGLE_LOOP_FF block include:

Inputs Outputs

PV = process variable SP = setpoint


FF_PV = feedforward variable OUT = output
AUTO = auto/manual status
ALARM = alarm status

2.1 TUNING

The controller block should be tuned first. The feedforward variable should be held at a fixed value while
the controller is tuned using standard methods.

Next the feedforward variable is tuned. The appropriate gain and lead or lag times are determined to
minimize the change in controlled variable for a change in load (feedforward) variable (with the
controller in automatic mode).

For more information on feedforward control, see Feedforward Control Using The Model 352 Single-
Loop Controller, AD352-117.

January 1999 2-1


CG39ARCAL-1 SINGLE_LOOP_AG

3.0 SINGLE_LOOP_AG (Single Loop with Adaptive Gain)


The derived block SINGLE_LOOP_AG is a single loop controller with adaptive gain. It is a modified
SINGLE_LOOP Basic block with the controller gain automatically adapted based on the value of the
process variable. With this block, the base PG value is multiplied by either a 1.0 or a 0.5 before it is
written to the controller as the actual proportional gain.

The PG block holds the base value of the controller proportional gain value. Note that, when tuning, the
proportional gain changes must be made to the PG block (not the CONTROLLER block PG softlist
parameter). The AG_SEL block and the AG_MUL block adapt the base PG value according to the value
of the process variable, and the PG_SET_VAL block continuously writes the resulting value to the PG
softlist parameter of the CONTROLLER block.

The input and outputs of the SINGLE_LOOP_AG block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status

3.1 TUNING

The controller block should be tuned using standard methods. Again, note that the base proportional gain
value in the PG block is used for tuning, not the CONTROLLER block PG parameter.

January 1999 3-1


CG39ARCAL-1 SINGL_LP_ONOFF

4.0 SINGL_LP_ONOFF (On/Off Single Loop)


The derived block SINGL_LP_ONOFF is an on/off single loop controller. It is a modification of the
SINGLE_LOOP Basic block with the PID controller replaced by an on/off controller that determines the
value of a discrete output.

The CONTROLLER block is an ON_OFF block that evaluates the PV and SP inputs and determines if
the discrete output(s) should be energized. The ON_OFF block can be configured in a variety of ways;
in this example, the OUTL and OUTH outputs are used with the OUT_RS flipflop to determine the value
of one discrete output. The DEADBAND block holds the deadband value, which represents an
acceptable difference between PV and SP. When the PV is less than SP by more than the deadband
value, the output is energized and will remain energized until the PV has been raised above the SP by an
amount equal to the deadband. The AM_SEL block selects the calculated output in auto mode ([AUTO]
is TRUE), and allows it to be changed in manual mode ([AUTO]=FALSE) via a write to [OUT]. On a
transition from auto to manual mode, the output is de-energized (via the AUTO_F_TRIG and
OUT_MOVE blocks).

The inputs and outputs of the SINGLE_LP_ONOFF block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = discrete output
AUTO = auto/manual status
ALARM = alarm status

4.1 TUNING

In this example, the deadband is the only value to be tuned.

January 1999 4-1


CG39ARCAL-1 SINGLE_LOOP_SR

5.0 SINGLE_LOOP_SR (Split-Range Single Loop)


The derived block SINGLE_LOOP_SR is a split-range, single loop controller. It is a modification of the
SINGLE_LOOP Basic block with the controller output value converted into two output values. One
output value increases the process variable while the other output value decreases it, but only one output
variable is active at a time. A deadband value is used to create a gap around the 0 crossover point; inside
the gap neither output is active.

The CONTROLLER block output has the range -100 to 100, with 0 as the crossover point (the center of
the gap where neither output is active). The DEADBAND block holds the value that forms the gap. If
the difference between [OUT] and 0 is less than the deadband value, both of the outputs are calculated to
be no greater than 0. Calculations for each output, displayed in cells O5 and O7, result in an output of 0
at the edge of the gap and 100 at the end of the output range (100 or -100).

The inputs and outputs of the SINGLE_LOOP_SR block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = controller output
OUT_H = output that is active when OUT is high
OUT_L = output that is active when OUT is low
AUTO = auto/manual status
ALARM = alarm status

January 1999 5-1


CG39ARCAL-1 SINGLE_LOOP_TP

6.0 SINGLE_LOOP_TP (Single Loop with Time-Proportioned Discrete


Output)
The derived block SINGLE_LOOP_TP is a single loop controller with a time-proportioned discrete
output. It is a modification of the SINGLE_LOOP Basic block with the analog output replaced by a
discrete output. The discrete output acts as a modulating output by varying the percentage of a timed
cycle during which the output is energized.

The OUT_REPCYCL block converts the [OUT] controller output into the [D_OUT] discrete output
value. The ONTIME softlist parameter of the OUT_REPCYCL block is the duration of the cycle, and the
PCTON input (the [OUT] value) is the percentage of the cycle during which the output will be energized.
Be aware that the output cannot change more frequently than the controller scan rate, so the effective
resolution of the output will depend on both the scan rate and the cycle time.

The inputs and outputs of the SINGLE_LOOP_TP block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = controller output
D_OUT = discrete output
AUTO = auto/manual status
ALARM = alarm status

January 1999 6-1


CG39ARCAL-1 SINGLE_LOOP_FB

7.0 SINGLE_LOOP_FB (Single Loop with External Feedback)


The derived block SINGLE_LOOP_FB is a single loop controller with external feedback. This block can
serve as the override loop in an override control scheme (see the SINGLE_LOOP_OR block in Section
8.0). The blocks only modification of the SINGLE_LOOP Basic block is the source of the
CONTROLLER blocks FDBK feedback input. Instead of [OUT], it is the blocks [FDBK] external
feedback input that has the value of the selected output in an override scheme.

The inputs and outputs of the SINGLE_LOOP_FB include:

Inputs Outputs

PV = process variable SP = setpoint


FDBK = external feedback (the selected OUT = output
output in an override scheme) AUTO = auto/manual status
ALARM = alarm status

7.1 TUNING

The controller block should be tuned using standard methods. Be sure that the other loops in the override
scheme are never selected while tuning this loop; this can be accomplished by disabling the other
controllers outputs and holding them at a value that cannot be selected.

For more information on override control, see Override Control Using The Model 352 Single-Loop
Controller, AD352-112.

January 1999 7-1


CG39ARCAL-1 SINGLE_LOOP_OR

8.0 SINGLE_LOOP_OR (Single Loop with Override Selector)


The derived block SINGLE_LOOP_OR is a single loop controller with an override selector. It receives
override values from other sources, such as the SINGLE_LOOP_FB override loop (see Section 7.0). It is
a modification of the SINGLE_LOOP Basic block with a low selector placed downstream of the
controller block to enable an override input to be selected over the controller output.

The OVERRIDE_SEL block selects the minimum between the control loop output and the [OR_IN]
override input (probably from another control loop). The OS_NOT block determines the [OVRRD]
override status output. If the control loop output is not the selected output, [OVRRD] becomes TRUE.
Note that the OVERRIDE_SEL block is downstream of the AUTO_MANUAL block, enabling the
override input to be selected over the operators manual setting. If you want the operator to always be
able to set the output in manual mode, then the order of the AUTO_MANUAL and OVERRIDE_SEL
blocks should be reversed.

The inputs and outputs of the SINGLE_LOOP_OR block include:

Inputs Outputs

PV = process variable SP = setpoint


OR_IN = override input (probably from OUT = output
another control loop) AUTO = auto/manual status
OVRRD = override status
ALARM = alarm status

8.1 TUNING

The controller block should be tuned using standard methods. Be sure that the other loops in the override
scheme are never selected while tuning this loop. To de-select the loops, disable the outputs of other
controllers and hold them at a value that cannot be selected.

For more information on override control, see Override Control Using The Model 352 Single-Loop
Controller, AD352-112.

January 1999 8-1


CG39ARCAL-1 SINGLE_LP_B_SW

9.0 SINGLE_LP_B_SW (Single Loop with Batch Switch)


The derived block SINGLE_LP_B_SW is a single loop controller with a batch switch, a modified version
of the SINGLE_LOOP Basic block with the batch switch block placed in the feedback line of the
controller.

The batch switch is used to prevent reset windup, which can occur when a controller is unable to bring the
process variable to setpoint for an extended period of time (e.g. a temperature controller at the start of a
batch). Reset action will drive the controllers output and its reset component beyond the end of its range
(by a few percent). The controller output cannot change until the process variable crosses setpoint, at
which point the output is still at the end of its range and will be late in responding, causing an overshoot.
The batch switch, placed in the feedback line to the controller, will modify the feedback to the controller
when the output is driven to the end of its range. The result is that the controllers reset component will
not be able to wind up, and the controller will unwind much quicker when the process variable crosses
setpoint. Note that the batch switch has no effect when the controller output is within its range (not
wound up).

The inputs and outputs of the SINGLE_LP_B_SW block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status

9.1 TUNING

The controller block should be tuned using standard methods. When tuning for reset windup prevention,
the BPL (batch preload) softlist value of the batch switch can be changed. If the batch switch enables the
controller to respond too quickly from a wind up (i.e. if the controller overshoots when unwinding), then
the value can be moved away from the limit that the controller reached. If the controller responds too
slowly from a wind up, then the value can be moved toward the limit that the controller reached.

January 1999 9-1


CG39ARCAL-1 SINGLE_LP_B_EXT

10.0 SINGLE_LP_B_EXT (Single Loop with Batch Extension)


The derived block SINGL_LP_B_EXT is a single loop controller with batch extension algorithm. It is a
modification of the SINGLE_LOOP_SS Basic block with the controller output capable of being
overridden by the batch extension algorithm.

The batch extension algorithm is the fastest way for a controller to make the process variable equal the
setpoint. The algorithm assumes that there are no restrictions regarding the speed at which the process
variable changes or the difference between the process variable and the setpoint. It is a four step program
that runs in the following order:

1. It sets the output to the maximum value until the process variable is within a deadband value of the
setpoint.
2. It sets the output to the minimum value.
3. It holds the output at the minimum value for a set length of time (for the process variable to coast into
the setpoint).
4. It sets the output to a configured value and releases the output for the controller to manipulate
normally.

The BAT_EXT_PGRMR block performs the batch extension program. The program is initiated when the
block writes a TRUE to the BAT_EXT_EN variable while the controller is in auto mode. The steps of the
program occur as follows:

1. Output set to 100 This step runs until the process variable [PV] is within the deadband value of the
setpoint [SP], as determined by the SEG2_AND block. The deadband value is entered in the
BAT_EXT_DBAND block. The SEG2_R_TRIG block creates the pulse which forces the program
into the second step.
2. Ouput set to 0
3. Output held at 0 This step has a configured time length (the TIME_SEG_3 softlist parameter) for
allowing the PV to coast up to the SP.
4. Ouput set to a configured value The configured value is the ENDPNT_SEG_4 softlist parameter

When the program is complete, the DONE_R_TRIG and DONE_MOVE blocks reset the BAT_EXT_EN
variable, allowing the controller to manipulate the output normally. The MAN_MOVE block ensures that
the batch extension program cannot run in manual mode.

NOTE

An active batch extension program can be canceled by writing a FALSE to the


BAT_EXT_EN variable.

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status

January 1999 10-1


SINGLE_LP_B_EXT CG39ARCAL-1

10.1 TUNING

The controller block should be tuned using standard methods. When tuning the batch extension
algorithm, the values to be determined (probably by experimentation) are the:

Deadband used to determine when to zero the output (the BAT_EXT_DBAND blocks VALUE
softlist parameter)
Coast time while the output is zero (the BAT_EXT_PGRMR blocks TIME_SEG_3 softlist
parameter)
Initial output value for the return to auto mode (the BAT_EXT_PGRMR blocks ENDPNT_SEG_4
softlist parameter).

10-2 January 1999


CG39ARCAL-1 SINGLE_LP_PRGSP

11.0 SINGLE_LP_PRGSP (Single Loop with Programmed Setpoint)


The derived block SINGL_LP_PRGSP is a single loop controller with a programmed setpoint. It is a
modification of the SINGLE_LOOP Basic block with the setpoint that can optionally follow a program
(e.g. a batch temperature profile).

The PROGRAMMER block performs the setpoint program. Writing a TRUE to the [EXT] variable
(while the controller is in auto mode) initiates the program. The PGRMR block accommodates up to 20
steps, and multiple PGRMR blocks can be cascaded if needed. To cancel a program, the [EXT] variable
should be reset. Writing a TRUE to the [HOLD] variable will hold the sequence; the setpoint can then be
changed (via the SETPOINT block) while the program is held and the program will resume at the new
setpoint value. The DONE_R_TRIG, DONE_MOVE, EXT_MOVE, and HOLD_MOVE blocks reset the
program variables when the program is complete or the mode is inappropriate (i.e. manual mode or
internal mode).

The inputs and outputs of the SINGL_LP_PRGSP block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status
EXT = external (program) status
HOLD = program hold status
ALARM = alarm status

January 1999 11-1


CG39ARCAL-1 SINGLE_LOOP_MD

12.0 SINGLE_LOOP_MD (Single Loop with Maximum Deviation)


The derived block SINGLE_LOOP_MD is a single loop controller with a limit placed on the deviation
between process variable and setpoint. It is a modification of the SINGLE_LOOP Basic block with extra
limiting placed on the setpoint. This limiting acts to slow down a controller while a large error exists,
such as at the start of a batch reaction.

The MAX_DEV block holds the maximum PV-SP deviation. The SP_DEV_LIMIT block applies
limiting to the setpoint which cannot differ from the process variable by more than the maximum
deviation value.

The inputs and outputs of the SINGL_LOOP_MD block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status

January 1999 12-1


CG39ARCAL-1 SINGLE_LP_STPWT

13.0 SINGLE_LP_STPWT (Step and Wait Single Loop)


The derived block SINGL_LP_STPWT is a step and wait single loop controller, which is used for
processes dominated by dead time. It is a modification of the SINGLE_LOOP Basic block with timing
and tracking blocks added to perform the step and wait function.

Dead time is the period of time during which the process variable does not respond to a change in output.
This delay can cause poor control performance. For example, a PI controller makes immediate output
changes through proportional action, which may be the exact change required, but the dead time delay
prohibits the integral action from recognizing that the error is gone. The integral action then changes the
output inappropriately. In the case where dead time is the dominant dynamic element in the control loop,
some type of dead time compensation is required to improve control loop performance.

Although dead time is present to some degree in nearly all process control loops, the dynamic behavior of
most loops is dominated by one or more capacity lags in series with the dead time. As an approximation
for the case where there are multiple lags, the process can be characterized by an effective dead time (),
an effective lag time constant (), and a steady-state gain (KP). Dead time compensation should be
considered whenever the ratio of dead time to lag time constant (/) exceeds 0.5.

The step and wait controller mimics the actions of an experienced control room operator who is manually
controlling a process dominated by dead time. Whenever it is necessary to move the valve, the operator
makes a valve change (the step) and waits for the process to respond completely to that valve change
before making another step.

The tuning of the step and wait controller is based on the process characteristics (, , and KP). The
effective lag time constant (), in min, is entered into the LAG_TIME block. The effective dead time (),
in min, is entered in the DEAD_TIME block. The inverse of the normalized steady-state gain (1/KP) is
entered in the CONTROLLER block as the PG softlist parameter (note that KP is dimensionless since it is
based on normalized process variable and output values). As an approximation, a lag response can be
assumed to be complete (returned to steady-state) after four time constants (4). The LAG_MUL,
DT_MUL, and DT_ADD blocks calculate the 4 and 4+ values and the TIME_CONVERT block
converts the values to the TIME data type.

A threshold value is entered in the THRESHOLD block. If the error between PV and SP exceeds the
threshold value, the control circuit is enabled (by the ERR_ABS, ERR_GT, and ON_DELAY blocks).
The ON_DELAY block, with the delay time set at 4, ensures that the full magnitude of the control error
can develop before the first step occurs. If the error persists, subsequent steps will be determined by the
REPEAT_CYCLE block. The REPEAT_CYCLE block has a minimal ONTIME softlist setting and the
OFFTIME is set, via the OFFTIME_SET_VAL block, equal to 4+. This ensures that the process has
responded completely to the last step before performing the next step. The REPEAT_CYCLE output is
converted into a pulse, via the R_TRIG block, which becomes the momentary track command for the
OUT_TRK_HLD block, thereby passing the controller output to the AUTO_MANUAL block to perform
a step. The TRK_OR block ensures proper tracking in manual mode.

January 1999 13-1


SINGLE_LP_STPWT CG39ARCAL-1

The inputs and outputs of the SINGL_LP_STPWT block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status

13.1 TUNING

First the lag time () and dead time () values are set (in minutes), then the optimum controller gain (PG)
is set. The integral and derivative parameters are set at their minimum values. A step response test will
produce the lag time and dead time values as well as the steady-state gain of the process. The optimum
PG setting is the inverse of the normalized steady-state gain of the process (1/KP).

NOTE

KP is dimensionless since it is based on normalized process variable and output values.

If the PG is correct, it is possible to correct for a disturbance in one complete step and wait cycle. If the
gain is too low, more than one step cycle is required. If the gain is too high, the PV will cycle about
the SP.

13.2 ANALYSIS OF STEP AND WAIT CONTROLLER

The step and wait controller provides a very robust method of dead time compensation. It is relatively
easy to identify the process parameters required. Once the time parameters are set, tuning is reduced to a
one knob (PG) tuning problem. The other dead time compensation methods presented in this library,
Complementary Feedback (see Section 14.0) and Smith Predictor (see Section 15.0), are less robust but
have the potential to perform better than the step and wait controller.

For more information on step and wait control, see Dead Time Compensation Using The Model 352
Single-Loop Controller, AD352-116.

13-2 January 1999


CG39ARCAL-1 SINGLE_LP_CMPFB

14.0 SINGLE_LP_CMPFB (Complementary Feedback Single Loop)


The derived block SINGL_LP_CMPFB is a complementary feedback single loop controller, which is
used for processes dominated by dead time. It is a modification of the SINGLE_LOOP Basic block with
the controller feedback delayed by a dead time block.

Dead time is the period of time during which the process variable does not respond to a change in output.
This delay can cause poor control performance. For example, a PI controller makes immediate output
changes through proportional action, which may be the exact change required, but the dead time delay
prohibits the integral action from recognizing that the error is gone. The integral action then changes the
output inappropriately. In the case where dead time is the dominant dynamic element in the control loop,
some type of dead time compensation is required to improve control loop performance.

Although dead time is present to some degree in nearly all process control loops, the dynamic behavior of
most loops is dominated by one or more capacity lags in series with the dead time. As an approximation
for the case where there are multiple lags, the process can be characterized by an effective dead time (),
an effective lag time constant (), and a steady-state gain (KP). Dead time compensation should be
considered whenever the ratio of dead time to lag time constant (/) exceeds 0.5.

The complementary feedback controller modifies the reset feedback signal to a conventional PI controller.
A dead time element is inserted in the reset feedback path to delay the integral action while the effect of
the proportional action is delayed by the process dead time.

The tuning of the complementary feedback controller is based on the process characteristics (, , and
KP). The effective dead time (), in min, is entered in the FDBK_DELAY blocks DT softlist parameter.
The effective lag time constant (), in min, is entered into the CONTROLLER block as the TI softlist
parameter. One half of the inverse of the normalized steady-state gain (0.5/KP) is entered in the
CONTROLLER block as the PG softlist parameter (note that KP is dimensionless since it is based on
normalized process variable and output values).

The inputs and outputs of the SINGL_LP_CMPFB block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status

January 1999 14-1


SINGLE_LP_CMPFB CG39ARCAL-1

14.1 TUNING

Tuning involves first entering the dead time value () in the FDBK_DELAY block. Next, the lag time
constant (in min) is entered as the controller integral time (TI) and then the optimum controller gain
(PG) is set. The derivative parameter is set at its minimum value (0). A step response test will produce
the lag time and dead time values as well as the steady-state gain of the process. The optimum PG setting
is one half the inverse of the normalized steady-state gain of the process (0.5/KP).

NOTE

KP is dimensionless since it is based on normalized process variable and output


values.

For more damping, the PG should be decreased from the optimum setting.

14.2 ANALYSIS OF COMPLEMENTARY FEEDBACK CONTROLLER

The complementary feedback controller depends on an accurate estimate of the process parameters, but it
is still fairly easy to tune. It is less robust than the step and wait controller (see Section 13.0), but more
robust than the Smith Predictor (see Section 15.0). It has the potential to perform better than the step and
wait controller, but the Smith Predictor has the potential to surpass its performance.

For more information on complementary feedback control, see Dead Time Compensation Using The
Model 352 Single-Loop Controller, AD352-116.

14-2 January 1999


CG39ARCAL-1 SINGLE_LP_SM_PR

15.0 SINGLE_LP_SM_PR (Smith Predictor Single Loop)


The derived block SINGL_LP_SM_PR is a Smith Predictor single loop controller which is used for
processes dominated by dead time. It is a modification of the SINGLE_LOOP Basic block where the
process variable seen by the controller is modified by a model of the process to remove the effects of the
dead time.

Dead time is the period of time during which the process variable does not respond to a change in output.
This delay can cause poor control performance. For example, a PI controller makes immediate output
changes through proportional action, which may be the exact change required, but the dead time delay
prohibits the integral action from recognizing that the error is gone. The integral action then changes the
output inappropriately. In the case where dead time is the dominant dynamic element in the control loop,
some type of dead time compensation is required to improve control loop performance.

Although dead time is present to some degree in nearly all process control loops, the dynamic behavior of
most loops is dominated by one or more capacity lags in series with the dead time. As an approximation
for the case where there are multiple lags, the process can be characterized by an effective dead time (),
an effective lag time constant (), and a steady-state gain (KP). Dead time compensation should be
considered whenever the ratio of dead time to lag time constant (/) exceeds 0.5.

The Smith Predictor controller modifies the process variable signal to a conventional PID controller. The
controller output provides the input to the process model as well as the actual process. The process model
has two components, one with dead time and one without dead time. If there is a good match between the
dynamics of the model and the process, the output of the model with dead time will cancel the output of
the process. The process variable signal that remains for the controller will be the output of the model
without dead time. This has the effect of mathematically eliminating the dead time from the control loop.
The controller can then be tuned and the loop should perform as if the process had no dead time.

The tuning of the Smith Predictor is based on the process characteristics (, , and KP). The effective lag
time constant (), in minutes, is entered into the PROCESS_LAG block as the TLAG softlist parameter.
The effective dead time () is entered in the PROCESS_DT blocks DT softlist parameter. The steady-
state gain (KP), in PV units per OUT units, is entered in the KP block. The PROCESS_SUB block
calculates the difference between the process model without the dead time and the model with the dead
time. The PROCESS_MUL block adds the scaling necessary to complete the model and then the
PV_ADD block adds the PV to the output of model.

The inputs and outputs of the SINGL_LP_SM_PR block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output
AUTO = auto/manual status
ALARM = alarm status

January 1999 15-1


SINGL_LP_SM_PR CG39ARCAL-1

15.1 TUNING

Tuning involves first entering the lag time constant (), in minutes, in the PROCESS_LAG blocks TLAG
softlist parameter. Then the dead time value () is entered in the PROCESS_DT blocks DT softlist
parameter, and then the steady-state gain (KP), in PV units per OUT units, is entered in the KP block. The
controller is then tuned using conventional tuning methods.

15.2 ANALYSIS OF SMITH PREDICTOR CONTROLLER

The Smith Predictor has the potential to provide perfect dead time compensation. However, its
performance depends entirely on the accuracy of the model. Therefore, it is less robust than either the
step and wait controller (see Section 13.0) or the complementary feedback controller (see Section 14.0).

It should also be noted that the Smith Predictor provides better performance for setpoint changes than it
does for load changes. On setpoint changes, the transient response of the internal model is in sync with
that of the process since the source of the disturbance is the controller output. On load changes, the
disturbance may be affecting the process up to one full dead time before the controller sees it. If the
model response is out of sync with the process, it cannot do as effective a job of dead time compensation.

For more information on the Smith Predictor, see Dead Time Compensation Using The Model 352 Single-
Loop Controller, AD352-116.

15-2 January 1999


CG39ARCAL-1 SINGLE_LP_CF_SR

16.0 SINGLE_LP_CF_SR (Split-Range Coarse/Fine Single Loop)


The derived block SINGL_LP_CF_SR is a split-range coarse/fine single loop controller. It is a
modification of the SINGLE_LOOP Basic block with the controller output value converted into two
output values, one output manipulating a coarse valve and the other manipulating a fine valve.

A coarse/fine control strategy uses two final control elements (FCEs), one large and one small, connected
for an additive effect on the process. The large FCE supports large changes in the manipulated variable
but often lacks resolution. To improve resolution and increase turndown, a small FCE, which has better
resolution, is used to trim the large FCE. Coarse/fine control is sometimes called big valve/little valve
control.

The split-range control strategy involves closing the coarse valve and manipulating only the fine valve
when the flow demand is low. As flow demand increases, the fine valve is opened fully and remains open
as the coarse valve is manipulated. This scheme features immediate response to demand changes and fine
resolution for low flow demands. However, the resolution becomes coarse when the demand exceeds the
capacity of the fine valve. This is a simple way to provide high turndown.

The X_HOLD block holds the value of X, where:

X= Max.Fine Flow
Max. Fine Flow + Max. Coarse Flow

The equations in cells N3 and N4 calculate the fine and coarse output values.

The inputs and outputs of the SINGL_LP_CF_SR block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = controller output
OUT_F = output to the fine FCE
OUT_C = output to the coarse FCE
AUTO = auto/manual status
ALARM = alarm status

For more information on split-range coarse/fine control, see Coarse/Fine Control Strategies Using The
Model 352 Single-Loop Controller, AD352-106.

January 1999 16-1


CG39ARCAL-1 SINGLE_LP_CF_FL

17.0 SINGLE_LP_CF_FL (Floating Coarse/Fine Single Loop)


The derived block SINGL_LP_CF_FL is a floating coarse/fine single loop controller. It is a modification
of the SINGLE_LOOP Basic block with the controller output value converted into two output values,
one output that manipulates a coarse valve and one that manipulates a fine valve.

A coarse/fine control strategy uses two final control elements (FCEs), one large and one small, that are
connected for an additive effect on the process. The large FCE supports large changes in the manipulated
variable, but often lacks resolution. To improve resolution and increase turndown, a small FCE, which
has better resolution, is used to trim the large FCE. Coarse/fine control is sometimes called big
valve/little valve control.

The floating control strategy only adjusts the fine valve while its position is within fixed limits (e.g.
between 25% and 75%) and adjusts the coarse valve only when required to keep the fine valve near
midstroke. In this strategy, a controller block manipulates the fine valve. When the controller output
exceeds the limits on the fine valve, a separate integral-only controller moves the coarse valve. The rate
at which the coarse valve moves is relatively slow and is proportional to the difference between the fine
valve signal and its exceeded limit. As the coarse valve moves, the fine flow controller responds by
returning the fine valve to within its limits, at which time the coarse valve holds at its new position. The
coarse flow controller must be tuned for slow response to ensure that the fine flow loop remains stable.
This strategy responds quickly to small flow demand changes over the entire demand range by directly
adjusting the fine valve. However, it responds slowly to a large demand change that saturates the fine
valve. This is an easy way to get accurate flow control over a large flow range.

The CONTROLLER block output manipulates the fine valve. The OUT_LIMIT block determines if the
output to the fine valve has exceeded its limits. The FLOAT_CONTROLLER block (an ID controller)
will change its output (the coarse valve signal) whenever the fine valve output is limited.

The inputs and outputs of the SINGL_LP_CF_FL block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output to the fine FCE
OUT_C = output to the coarse FCE
AUTO = auto/manual status
ALARM = alarm status

17.1 TUNING

The controller is tuned using conventional tuning methods. Be aware that the FLOAT_CONTROLLER
must be given a large value of TI to ensure that the control loop remains stable.

For more information on floating coarse/fine control, see Coarse/Fine Control Strategies Using The
Model 352 Single-Loop Controller, AD352-106.
#

January 1999 17-1


CG39ARCAL-1 SINGLE_LP_CF_CS

18.0 SINGLE_LP_CF_CS (Center-Seeking Coarse/Fine Single Loop)


The derived block SINGL_LP_CF_CS is a center-seeking coarse/fine single loop controller. It is a
modification of the SINGLE_LOOP Basic block with the controller output value converted into two
output values, one output that manipulates a coarse valve and one that manipulates a fine valve.

A coarse/fine control strategy uses two final control elements (FCEs), one large and one small, that are
connected for an additive effect on the process. The large FCE supports large changes in the manipulated
variable, but often lacks resolution. To improve resolution and increase turndown, a small FCE with
better resolution is used to trim the large FCE. Coarse/fine control is sometimes called big valve/little
valve control.

The center-seeking control strategy involves manipulating only the fine valve while its position is within
a certain trip point. When the trip point is reached, the coarse valve is adjusted until the fine valve is
returned to 50%. In this strategy, a controller block manipulates the fine valve. A separate integral-only
controller moves the coarse valve when the controller output exceeds the limits on the fine valve.

The rate at which the coarse valve moves is relatively slow and is proportional to the difference between
the fine valve signal and 50%. As the coarse valve moves, the fine flow controller responds by returning
the fine valve to 50%, at which time the coarse valve holds at its new position. The coarse flow controller
must be tuned for slow response to ensure that the fine flow loop remains stable. This strategy responds
quickly to small flow demand changes over the entire demand range by directly adjusting the fine valve.
However, it responds slowly to a large demand change that saturates the fine valve. The advantage of
center-seeking control is that it returns the fine valve to where it can respond alone to large changes in
either direction.

The CONTROLLER block output manipulates the fine valve. The OUT_COMPARATOR block
determines if the output to the fine valve has reached a trip point (e.g. 25% or 75%, which is represented
by a 25% deviation from 50%) and if the fine valve has returned to 50% via the DBAND softlist setting
of 25%. The FLOAT_CONTROLLER block (an ID controller) will change its output (the coarse valve
signal) whenever the fine valve output has reached a trip point and has yet to return to 50%.

The inputs and outputs of the SINGL_LP_CF_CS block include:

Inputs Outputs

PV = process variable SP = setpoint


OUT = output to the fine FCE
OUT_C = output to the coarse FCE
AUTO = auto/manual status
ALARM = alarm status

January 1999 18-1


SINGL_LP_CF_CS CG39ARCAL-1

18.1 TUNING

The controller is tuned using conventional tuning methods. Be aware that the FLOAT_CONTROLLER
must be given a large value of TI to ensure that the control loop remains stable.

For more information on center-seeking coarse/fine control, see Coarse/Fine Control Strategies Using
The Model 352 Single-Loop Controller, AD352-106.

18-2 January 1999


CG39ARCAL-1 BAL_2FE

19.0 BAL_2FE (Balance of Two Final Control Elements)


The derived block BAL_2FE balances a load between two parallel final control elements, each of which
has an adjustable bias value and the ability to switch to a manual output. The block uses an integral-only
controller to adjust the load to each BIAS_FE block (see Section 21.0) so that the desired total output is
achieved.

The POSITION_CNTRLR block is the integral-only position controller (ID without derivative). The
integral time of the controller can be set at a very small value (0.01 min) without instability since there is
no process dynamics in the position loop. The PV [T_OUT] output is calculated each scan from the
BIAS_FE block outputs of that scan.

The BIAS_FE block outputs are first scaled to the correct percentage of the overall capacity then the
correct feedback for the position controller is calculated based on the number of final control elements
that are running and in auto mode. If the final control elements are not of equal capacity, the SCALER
block Soft List values should be changed to reflect the correct proportion of the total output that each
element contributes. The T_OUT output (total output) is provided for the feedback of an upstream
controller (e.g. the PRIMARY Basic block). The AUTO output is provided to indicate that at least one of
the final control elements is in auto mode. If this condition is not met, the upstream controller should
track.

The inputs and outputs of the BAL_2FE block include:

Inputs Outputs

SP = setpoint (desired total output) OUT1 = output to final control element 1


PROOF1 = running status of final control OUT2 = output to final control element 2
element 1 T_OUT = scaled total of the individual
PROOF2 = running status of final control outputs (for feedback of an
element 2 upstream controller)
AUTO = auto status (indicates one of the
final control elements is in auto)

January 1999 19-1


CG39ARCAL-1 BAL_3FE

20.0 BAL_3FE (Balance of Three Final Control Elements)


The derived block BAL_3FE balances a load between three parallel final control elements, each of which
has an adjustable bias value and the ability to switch to a manual output. The block uses an integral-only
controller to adjust the load to each BIAS_FE block (see Section 21.0) so that the desired total output is
achieved.

The POSITION_CNTRLR block is the integral-only position controller (ID without derivative). The
integral time can be set at a very small value (0.01 min) without instability since there is no process
dynamics in the position loop. The PV [T_OUT] output is calculated each scan from the BIAS_FE block
outputs of that scan.

The BIAS_FE block outputs are first scaled to the correct percentage of the overall capacity then the
correct feedback for the position controller is calculated based on the number of final control elements
that are running and in auto mode. If the final control elements are not of equal capacity, the SCALER
block Soft List values should be changed to reflect the correct proportion of the total output that each
element contributes. The T_OUT output (total output) is provided for the feedback of an upstream
controller (e.g. the PRIMARY Basic block). The AUTO output is provided to indicate that at least one of
the final control elements is in auto mode. If this condition is not met, the upstream controller should
track.

The inputs and outputs of the BAL_3FE block include:

Inputs Outputs

SP = setpoint (desired total output) OUT1 = output to final control element 1


PROOF1 = running status of final control OUT2 = output to final control element 2
element 1 OUT3 = output to final control element 3
PROOF2 = running status of final control T_OUT = scaled total of the individual
element 2 outputs (for feedback of an
PROOF3 = running status of final control upstream controller)
element 3 AUTO = auto status (indicates one of the
final control elements is in auto)

January 1999 20-1


CG39ARCAL-1 BIAS_FE

21.0 BIAS_FE (Bias of a Final Control Element)


The derived block BIAS_FE performs the function of a final control element auto/manual biasing station.
It works in conjunction with other BIAS_FE blocks inside a BAL_2FE block (see Section 19.0) or
BAL_3FE block (see Section 20.0). The input load signal can be biased to become the output, or a
manual output can be selected.

The bias value is comprised of two parts, the absolute value of the bias and the action (positive or
negative) of the bias. This configuration prevents a large bias change from being entered if the sign is
accidentally left out. The POSITIVE_BIAS block holds the action of the bias: TRUE is positive and
FALSE is negative. The SETPOINT block holds the absolute value of the bias. Upon a change in bias
action, the setpoint (bias value) is set to 0% via the TRIG blocks and the EXTRNL input to the
SETPOINT block. The bias is calculated and added to the load input (PV) at the BIAS_ADD block. The
M2A_BALANCE block (a PD block) is used to prevent a bump in the output when switching from
manual mode to auto mode. The PD block has a lag built in that is enabled on the switch to auto mode.
The time constant of this lag is the MR_TLAG Soft List parameter. If the final control element is not
running (PROOF input is FALSE), the circuit rejects to manual mode and the output is set to 0%.

The inputs and outputs of the BIAS_FE block include:

Inputs Outputs

PV = process variable (unbiased load OUT = output to final control element


signal) BIAS = bias value including the sign
PROOF = running status of final control (positive or negative)
element AUTO = auto/manual status

January 1999 21-1


CG39ARCAL-1 INTERP_XY

22.0 INTERP_XY (Interpolation of X-Y Data)


The derived function block INTERP_XY performs a linear interpolation of X-Y data where Y is a
function of X. The X value is an input (IN_X), and the interpolated Y value is an output (OUT_Y). This
block is very similar to the LINCHR linear characterizer standard block, except this block can exceed the
20-segment limit of the LINCHR block and its data points are entered into arrays.

The number of segments, which represents the number of data points minus one, is an input (Nsegs). The
X and Y data for the points which form the Y vs. X curve are entered in two separate input arrays,
X[0..Nsegs] and Y[0..Nsegs]. Also, the X array values must be entered in ascending order. For example,
X[0] and Y[0] form the lower endpoint of the curve, X[1] and Y[1] form the next point, and X[Nsegs]
and Y[Nsegs] form the upper endpoint of the curve. The IN_X input value is limited to the range of the X
values. When IN_X is out of range, the block indicates an error through the error status output.

The inputs and outputs of the INTERP_XY block include:

Inputs Outputs

IN_X = actual X value for which the Y OUT_Y = Y value corresponding to the
value is desired inputted IN_X value
Nsegs = number of segments ERROR = error status
X = X values of the curve points as an
array [0..Nsegs]
Y = Y values of the curve points as an
array [0..Nsegs]

January 1999 22-1


CG39ARCAL-1 INTERP_XYZ

23.0 INTERP_XYZ (Interpolation of X-Y-Z Data)


The user defined function block INTERP_XYZ performs a two-dimensional interpolation of X-Y-Z
tabular data, where Z is a function of both X and Y.

The X and Y values are inputs and the calculated/interpolated Z value is an output. The value X
represents the row label values of a table, and Y represents the column label values. The X and Y label
values must be entered in ascending order in separate one-dimensional arrays: [Xlabel][I] and [Ylabel][J].
The value I is used as the row index with a range of 1 to [Nrows], and J is used as the column index with
a range of 1 to [Ncols]. The Z data is entered in the input table array as [Ztable][I,J]. Every element of
the table/array must have a value. For example, [Xlabel][1] is the X value for the first row of the Z table,
[Ylabel][2] is the Y value for the second column of the Z table, and [Ztable][1,2] is the Z value in the first
row of the second column of the table.

The interpolation technique uses the four Z table values that surround the desired Z value, and weights
each according to its proximity to the X and Y input values. This is accomplished in four steps:

1. Find the lines that connect the Z values at the two Y table values.
2. Find the Z values along those lines which correspond to the X input value.
3. Find the line between those Z values.
4. Find the Z value along that line which corresponds to the Y input value.

An identical answer results if this approach is applied in the opposite order with respect to X and Y.

Any Z values on the edge of the table that should never be used are entered in the table array as -1.0. The
block has an error status output that indicates an error when the X or Y inputs are out of the range of the
table (the nearest Z table value will be the Z output) or when a Z table value of -1.0 is being used in the
calculation (the Z output will not update).

The inputs and outputs of the INTERP_XYZ block include:

Inputs Outputs

X = actual X value for which the Z Z = Z value corresponding to the


value is desired inputted X and Y values
Y = actual Y value for which the Z ERROR = error status
value is desired
Nrows = number of rows
Ncols = number of columns
Xlabel = row label values as an array
[1..Nrows]
Ylabel = column label values as an array
[1..Ncols]
Ztable = Z vs. X-Y table values as an array
[1..Nrows,1..Ncols]

January 1999 23-1


CG39ARCAL-1 ST_TIME_SLICE_EX

24.0 ST_TIME_SLICE_EX (Structured Text Time-Slice Example)


The derived block ST_TIME_SLICE_EX is an example of time-slicing a complex calculation using the
structured text language.

Time-slicing enables complex calculations to be performed over several controller scans to minimize the
impact of the calculation on each scan. A snapshot of the inputs is taken, and IF...THEN and CASE
statements are used to perform one segment of the calculation each scan.

The inputs and outputs of the ST_TIME_SLICE_EX block include:

Inputs Outputs

IN1 = input #1 OUT = output


IN2 = input #2 I = CASE statement variable, an
RECALC = recalculation trigger indication of the progress of the
calculation
DONE = done status

January 1999 24-1

Anda mungkin juga menyukai