FC 82 - Segment Control

 

The segment control function code groups subsequent blocks into a scan cycle executed at a specified rate and priority.  Each module can support up to eight segment control blocks. Each segment control block provides five outputs. Block address 15 contains one permanently configured segment control block. The other seven are configurable.

 

NOTE: Online configuration allows changing the function block configuration during controller execution without interrupting the control process. For the HAC only, function code 82 can not be added or deleted via online configuration.

 

 

 

Outputs

Blk

Type

Description

N

R

Elapsed time of previous cycle in units set by S1

N+1

R

Elapsed time of current cycle in units set by S1

N+2

R

Processor utilization (%)

N+3

R

Checkpoint overrun count number (number of cycles over

that are specified in S4)

N+4

R

Cycle time overrun in units set by S1

 

 

 

Specifications:

Spec

Tune

Default

Type

Range

Description

S1

N

1

I

01, 02, 11,

12, 21, 22,

31 or 32

Segment attributes; tune and modify lock (1X, 2X and 3X can be unlocked with switch combinations via special operations)

 

Tune:

0X = tune and modify allowed 1X = tuning not allowed

2X = modify lock

3X = tune and modify lock

Target period time units:

X1 = seconds

X2 = minutes

 

S2

Y

0.250

R

Full

Target period (seconds or minutes as specified by S1)

S3

N

0

I

0 - 255

Segment priority (0 = lowest). Can not be modified through online configuration.

S4

N

1

I

0 - 32,767

Checkpoint period (number of cycles per checkpoint)

S5

N

0

I

0, 1, or 2

PID reset mode:

0 = normal reset

1 = auto selected external reset

2 = external reset

 

S6

N

10.000

R

Full

PID maximum derivative gain

S7

N

1.000

R

0.0 - 9.2E18

Minimum report time for all exception reports in this segment (seconds or minutes as specified by S1)

S8

N

60.000

R

0.0 - 9.2E18

Maximum report time for all exception reports in this segment (seconds or minutes as specified by S1)

S9

N

2.000

R

0.0 - 9.2E18

Significant change parameter for all control loop (i.e., station) exception reports in this segment (in % of span)

S10

N

1.000

R

0.0 - 9.2E18

Alarm deadband for all high and low alarm reports in this segment (in % of span)

S11

N

1.000

R

0.0 - 9.2E18

Alarm deadband for all deviation alarm reports in this segment (in % of span)

S12

N

0.000

R

0.0 - 9.2E18

Reserved

S13

N

1.000

R

0.0 - 9.2E18

Periodic I/O sampling period for this segment (in seconds). This is a multiple of the extended executive block (function code 90, block 20, S2)

S14

Y

9.2E18

R

0.0 - 9.2E18

Segment cycle time alarm limit (seconds or minutes as specified by S1)

S15

N

0

I

0 or 1

Auto sequencing:

0 = off

1 = on

 

 

82.1 Explanation

 

The segment control block divides the set of function blocks configured in a module into subsets (segments), and specifies the operating parameters for each segment individually. A segment starts with the block number of a segment control block and ends at the next higher numbered segment control block or last block. For example, if there is a segment control block configured in block 1000, the block numbers would be divided into two segments. The first segment would contain blocks 15 through 999, and the second segment would contain blocks 1000 through the last configurable block. Fixed block 15 contains one permanently configured segment control block, which also occupies blocks 16, 17, 18 and 19. Blocks 15 through 19 cannot be used for any other purpose nor can they be deleted. Up to seven additional segment control blocks can be placed at any configurable block number location greater than 30.

 

 

82.1.1 Specifications

 

S1 - TUNIT

(Segment attributes) Defines the tuning and modification option and execution cycle time units for the segment. If the tens digit is a zero, then all tunable parameters in the segment may be tuned or modified.

 

NOTE: When multiple segments are used, leave enough free time to run all of the segments.

 

 

If the tens digit is a one, change is not permitted to tunable parameters in the segment. This software lock insures that tunable parameters in a critical segment cannot be changed while the module is online to the process.

 

NOTE: The lock option does not affect adaptable functions. Outside segments adapt into segments that are locked.

 

If the tens digit is a two, modification of the block numbers within this segment is prohibited. This includes the addition of new functionality. Tuning can be performed while in this state. To access logic in this segment, it is necessary to initialize the NVRAM or perform the segment lock special operation.

 

If the tens digit is a three, tuning and modification to logic in this segment are prohibited. To gain access to logic in this segment, it is necessary to initialize NVRAM or perform the segment lock special operation.

 

The time units parameter defines the measurement of time units of the segment execution cycle. Specification S2 defines the desired length of the execution cycle.

 

S2 - CYCTIM

Sets the target segment execution cycle in time units selected with the ones digit of S1. In each segment, blocks execute in a predefined order, selected with S15. A cycle consists of one execution of the blocks plus any idle time (cycle time remaining after the cycle has been executed). Cycle time is the length of time from the start of one cycle to the start of the next cycle.

 

NOTE: S2 can be set less than 20 msec, but the checkpoint period (S4) must be adjusted upward such that the following condition is true:

 

S2 x S4 >= 20 msec

 

When S2 is less than the segment execution time (e.g., S2 is set to zero), the rule is:

segment execution time x S4 >= 20 msec

 

S3 - SPRI

(Segment priority) Assigns execution priorities to up to eight active segments. An active segment is one that is ready to run or is running. If two or more segments are active, the processor will run the highest priority segment. Segment priorities should be selected from zero to seven with zero being the lowest priority segment.

 

NOTE: The segment priority can not be modified through online configuration.

 

S4 - CHKPER

Applies to redundant module configurations. Checkpointing is the mechanism which keeps the backup module state current with that of the primary module. Checkpointing is the action of initially copying the configuration (once at startup) and after that all significant dynamic data (block outputs, partial results of chained calculations, integration counts, etc.) to the backup module as a block of data. This is essential for the bumpless takeover by the backup should the primary module fail.

 

The smooth transfer from primary to backup control is the result of the execution rate (time) of the segment, the frequency of the checkpointing operation, and the process dynamics. The actual failover from the primary to the backup occurs in ten milliseconds or less. The checkpointing operation governs the offset or data age between the primary and backup module. The frequency of checkpoint is a multiple of the segment execution time. The default setting for S4 is one. This specifies a checkpoint operation each segment cycle (250 milliseconds). With S4 set to four, the checkpoint operation occurs every fourth segment cycle (one second).

 

Large configurations have the potential of the backup being many cycles behind the primary when the transfer time exceeds the segment execution rate. This is especially true when using multiple segments.

 

To compute the time required to checkpoint the dynamic data of a given segment in an Harmony controller, divide the sum of the individual function blocks checkpoint utilization by 1,000,000 (IMMFP03 and BRC controllers) or 22,000 (IMMFP11/12 controllers) bytes per second. The resultant time is the minimum checkpoint time (in seconds). This time must be divided by the selected execution rate of the segment rounded upward to the nearest whole number and configured as the checkpoint period (S4).

 

NOTE: Refer to function code 140 for checkpoint utilization information.

 

For example, suppose a given configuration contains the function blocks shown in Table 82-4

 

 

With a segment cycle time of 0.25 second, calculate the checkpoint period (S4):

 

 

NOTES:

 

1. Programs such as C language or BASIC must be accounted for when calculating S4.

 

2. When S2 is set to less than 20 msec, then S4 must be adjusted upward such that the following condition is true:

S2 x S4 >= 20 msec

 

When S2 is less than the segment execution time (e.g., S2 is set to zero), the rule is:

segment execution time x S4>= 20 msec

 

S5 - XRES

(PID reset mode: 0 = normal reset, 1 = auto selected external reset, 2=external reset) Affects all function code 18 and 19 blocks in the segment. When S5 equals one, the internal memory of function code 18 and 19  blocks in the segment follows the track input, despite the status of the track/release flag. A change in input is modified by proportional and derivative action, and added to the track signal. This combined signal is the output. This prevents reset windup, which may occur in batch systems where controllers may be monitoring control variables but not performing any control action during the current step. In other words, the output of the PID block is not used in the current process step. The controller receives the signal, takes action to correct the error, sees no result, and takes action to correct the error again. As long as the controller receives no results from its control action, it continues to try to correct the error. When the controller goes into service on some other step of the process, it winds up so far beyond the value of the controlled variable that it cannot control it. The external reset option allows controller alignment while it is not being used for control functions.

 

Refer to Examples in the section describing function code 19 for a more detailed explanation of the effect of each value.

 

S6 - PID GAIN

(PID maximum derivative gain) Limits the derivative gain value in all PID blocks in the segment.

 

S7 - MINXTM

Defines the minimum report time for all exception reports in the segment. Minimum exception reporting time prevents loading on the communication highway. Exception reports will not be sent on the communication highway at each minimum exception report interval unless a value has changed by more than the operator defined significant change (S9) since the last exception report. The default value is one second.

 

S8 - MAXXTM

Defines the maximum interval between updates of information sent on the communication highway. If the value of a point has not exceeded the significant change (S9) over this time period, a report of its value will automatically be sent on the communication highway. The default value is 60 seconds.

 

S9 - SIGCHG

Significant change parameter for all communication highway exception reports in this segment except those with their own significant change parameters (i.e., function code 30), expressed as percent of span. It defines the percent of span a point value must change to cause an exception report to be generated.

 

S10 - HLALMDB

Alarm deadband for all high/low alarm reports in this segment, expressed as percent of span. Alarm deadbands prevent excessive alarm reports when values are hovering around the alarm limit.

 

S11 - DVALMDB

Alarm deadband for all deviation alarm reports in this segment expressed as a percent of span. Alarm deadbands prevent excessive alarm reports when values are hovering around the alarm limit. Deviation alarm deadbands are for stations only, since only stations have deviation alarms.

 

S12

Reserved

S13 - MBUS

(Periodic I/O sampling period for this segment: expressed in seconds) A multiple of the base periodic I/O sampling period, which the extended executive function code 90 (S2) defines. This specification defines the rate at which this segment samples/updates data across the peer-to-peer network or the Controlway/module bus.

 

S14 - CYCALM

Segment cycle time alarm limit, expressed in seconds. If segment cycle time exceeds this number, block N+4 will output the cycle time overrun in units set by S1.

 

S15 - SEQUEN

(Auto sequencing signal: 0 = off, 1 = on) If this specification equals one, the module finds and saves the most logical execution order of the function blocks and will execute them in that order, despite block numbers. Auto sequencing helps prevent loopbacks. Loopbacks occur when a block requires the output of a higher numbered block to complete its execution. The segment must then go through two or more execution cycles before the output of the first block is correct. If the auto sequencing function is off (zero), blocks are executed in ascending numerical order.

 

 

 

 

82.1.2 Outputs

 

N

Elapsed time of the previous execution cycle in S1 units. The elapsed time includes any segment idle time. If the time required to execute the blocks within the segment is less than the requested cycle time, the remainder is idle time spent waiting before starting the next cycle. Any idle time is available for lower priority segments. This output verifies that the cycle time specified by S2 is met.

 

N+1

Elapsed time of the current execution cycle in S1 units. This elapsed time does not include any segment idle time. It is a measure of the actual runtime of the blocks within the segment, plus the block runtime of all higher priority segments. This output verifies that the segment is running. A continual upward ramp indicates that the segment is not running. This occurs when higher priority segments consume all the processor time, or when a basic program is waiting for operator input, in an infinite loop, or aborted because of some error condition.

 

N+2

Processor utilization in percent. This output represents the proportional amount of total module utilization time (100 percent - system free time at block 12) that is used by this segment. This amount of time should be less than 100 percent by a nominal percentage (i.e., ten to 15 percent) dependent on the configuration.

 

N+3

Checkpoint overrun count number. The number of cycles executed over that are specified by S4. This output verifies that the checkpoint period is met. A continual upward ramp indicates that the segment is never getting the link for dynamic data transfer. A cyclic ramp indicates that dynamic data transfer is occurring, but not at the requested rate. Depending on the overrun, this may be an acceptable situation. If not, then the checkpoint period of the segment or the next highest priority segment must be increased until no overrun occurs.

 

N+4

Cycle time overrun in units specified by S1. If cycle time exceeds that set by S14, the overrun will be output from this block.  This output enables the program logic to take specific action based on a given cycle time alarm limit being exceeded. Two items must be considered when configuring multiple segments. First, each segment should run within the requested cycle time. Second, insure that the dynamic data of each segment is sent to the backup module within the requested checkpoint period. Achieving this usually involves fine tuning the segment, because the cycle time and checkpoint period of each segment are affected by all segments above it in priority.

 

To determine if a segment is running within its requested cycle time, observe outputs N and N+1. If output N+1 is continually ramping up, then the segment is not running. This occurs when higher priority segments consume all the processor time, or when a C or basic program is in an infinite loop, waiting for operator input, or aborted because of some error condition. If output N is greater than the requested cycle time set by S2 (when more than one segment exists), the segment is consuming more processor time than the requested period. In this case, cycle time must be increased until the segment output N is equal to the time it really takes to execute the segment.

 

To determine if a segment checkpoint period is occurring within the requested time period, observe output N+3. If N+3 is continually ramping up, then the checkpointing (refer to S4) of dynamic data is not occurring. This happens when higher priority segments demand all the link time, or if the segment is not running. If N+3 has a cyclic ramp, then the dynamic data is being sent to the backup module, but not at the requested rate. Depending on the amount of overrun, this may be an acceptable situation. If it is not acceptable, then the checkpoint period of this or the next highest priority segment must be increased until no overrun occurs.