FC 164 - Segment Control (IMCOM04)

The segment control function code groups subsequent blocks into a scan cycle executed at a specified rate and priority.  Each IMCOM04 Controller Module can support up to seven segment control blocks. Each segment control block provides two outputs: the elapsed time of the previous cycle and the elapsed time of the current cycle. Additional IMCOM04 Controller Module segments do not permit function blocks for input and output operations.

 

 

 

Outputs:

Blk

Type

Description

N

R

Segment period measured from the start of the previous cycle to the start of the current cycle in the units specified by S2

N+1

R

Execution time of the current segment cycle in the units specified by S2

 

 

Specifications:

Spec

Tune

Default

Type

Range

Description

S1

N

1

I

1 - 255

Unique segment priority, 1 through 255 with 1 being the highest priority

S2

N

0

I

0 or 1

Time units of cycle time:

0 = seconds

1 = minutes

S3

Y

1.000

R

0.0 - 9.2E18

Minimum cycle period of segment in the units specified by S2

S4

Y

1.000

R

0.0 - 9.2E18

Cycle period alarm limit in the units specified by S2.  Segment alarm is reflected by module status

S5

N

0

I

0 or 1

PID external reset option:

0 = normal

1 = external

S6

N

0

I

Full

Spare

S7

N

0.000

R

Full

Spare

 

 

 

164.1   Explanation

 

The segment control block divides the set of function blocks into subsets (segments), and specifies the operating parameters for each segment individually. A segment starts with a segment control block and ends at the next higher segment control block or last block. Function blocks for inputs and outputs are only permitted within the first segment.

 

Table 164-1 lists these permitted blocks.

 

NOTE: Fixed I/O blocks (201 through 252) are considered to be in the first segment.

 

 

If a segment is in alarm, bit three of the module's second status byte (bit seven is the most significant bit) indicates the alarm. A value of 0.0 overrides the tuning or adapting cycle period (S3) or alarm limit (S4) to a negative value.

 

 

164.1.1  Specifications

 

S1 - SPRI

(Segment priority) Specification S1 assigns execution priorities to up to seven active segments. An active segment is one that is ready to run or is in the process of being run. If two or more segments are active, the processor will run the highest priority segment. Assign segment priority from one to seven.  The segments execute in ascending numerical order.

 

S2 - TUNIT

Time units of execution cycle.

0 = seconds

1 = minutes

 

S3 - CYCTIM

(Target segment execution time in seconds) In each segment, blocks execute in ascending numerical order. A cycle consists of one  execution of the blocks plus any idle time (cycle time remaining after the blocks have been executed).

 

Cycle time is defined as the length of time from the start of one cycle to the start of the next cycle. Cycle time should be set for the length of time it takes to run all the segments. If the cycle time is set to the time it takes to run the highest priority segment only, none of the other segments will run.

 

NOTE: The minimum cycle time resolution is ten milliseconds (0.01 second). Therefore, the fastest possible cycle time is ten milliseconds

(S3 equals 0.00 or 0.01).

 

S4 - CYCALM

(Segment cycle time alarm limit) Specification S4 is the segment cycle time alarm limit, expressed in the time units selected with S2. If cycle time exceeds this value, bit three of the module's second status byte will be set.

 

S5 - XRES

PID reset mode.

0 = normal

1 = external

 

This specification affects all function code 18 and 19 blocks in the segment. When S5 equals one, the internal memory of all function code 18 and 19 blocks in the segment will follow the track input, regardless of the status of the track release flag. A change in input is modified by proportional and derivative action, and is added to the track signal. This combined signal is the output.

 

Reset prevents controller windup. Reset windup may occur in batch systems where controllers may be monitoring the control variable 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 step. The controller receives the signal, takes corrective action, sees no result, and takes corrective action again. As long as the controller receives no results from its control action, it continues corrective action. When

the controller is later called into services on some other step of the process, it is wound up so far beyond the value of the controlled variable that it cannot control it. The external reset option keeps the controller aligned when it is not used for control functions.

 

 

 

164.1.2  Outputs

 

N

 

Output N is the elapsed time of the previous cycle in seconds.  The elapsed time includes any segment idle time. If the time required to run the block 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 with S3 is met. If the output is greater than the requested cycle time set by S3, the segment is consuming more  processor time than requested. If this happens, S3 must be increased

until N is equal to the time it really takes to run the segment.

 

N+1

Output N+1 is the elapsed time of current execution cycle in the time units specified with S2. 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.