Cascading Polygon Interpolation Blocks (Polygon) in PCS 7 APL

Cascading Polygon Interpolation Blocks (Polygon) in PCS 7 APL

In SIMATIC PCS 7 APL (V9.0 SP3), expanding non-linear characteristic curve interpolation beyond 8 coordinate pairs by cascading two Polygon blocks (FB1881) requires adhering to strict parameter linking and monotonicity rules. To cascade, connect CasOut of the preceding Polygon block to CasIn of the succeeding Polygon block, set CasEn = 1 on the succeeding block, and route the common analog input (In) to both blocks. Crucially, coordinate points across both blocks must form a strictly monotonically increasing sequence where X1 of the second block is greater than or equal to X8 of the first block. If X-coordinates overlap or CasEn is omitted, the second block fails to evaluate, clamping the output to default limits.

Table of Contents

Executive Summary

Non-linear signal conditioning is vital in process automation for tasks such as calculating liquid volume in horizontal cylindrical vessels with dished heads, characterizing non-linear valve flow coefficients, or linearizing thermocouple temperature curves. The PCS 7 APL Polygon block (FB1881) provides piece-wise linear interpolation for up to 8 coordinate points. When applications require higher resolution (e.g., 16 or 24 points), multiple Polygon blocks must be cascaded. Engineers frequently find that while individual blocks function correctly, the second cascaded block fails to calculate, holding its output at zero. This technical guide details the cascading architecture, parameter handshakes, and monotonic coordinate constraints required for seamless multi-block interpolation.

Architecture and Fundamental Mechanics

The interpolation and cascading engine of the PCS 7 APL Polygon block operates under strict mathematical and logical rules:
1. Single Block Piece-Wise Linear Interpolation:
- Each Polygon block defines up to 8 coordinate pairs ($X_1, Y_1$ through $X_8, Y_8$).
- Parameter Num (2 to 8) specifies the number of active interpolation points.
- Within a block, $X$-values must be strictly monotonically increasing ($X_1 < X_2 < \dots < X_n$).
- For any input $In$ between $X_k$ and $X_{k+1}$, output Out is calculated via linear interpolation:
$$\text{Out} = Y_k + \frac{Y_{k+1} - Y_k}{X_{k+1} - X_k} \cdot (\text{In} - X_k)$$
2. The Cascading Handshake (CasIn, CasOut, CasEn):
- When $In$ exceeds $X_n$ on the first block, standard execution clamps Out to $Y_n$.
- When cascaded:
a. Block 1: Emits its status and boundary handover token via output parameter CasOut.
b. Block 2: Receives this token via input parameter CasIn.
c. Parameter CasEn (Cascade Enable) on Block 2 must be set to 1. This instructs Block 2 to remain inactive while $In < X_{1\text{, Block 2}}$ (letting Block 1 drive the signal) and take over calculation once $In \ge X_{1\text{, Block 2}}$.
3. Coordinate Continuity Across Blocks:
- Block 2's starting coordinate ($X_1, Y_1$) must match Block 1's final coordinate ($X_8, Y_8$) to guarantee smooth mathematical continuity without step-change jumps.

Step-by-Step Implementation Procedure

  1. Instantiate Polygon Blocks in CFC:
    a. Open the CFC chart requiring non-linear characterization.
    b. Insert two instances of Polygon (FB1881) from the APL Math library.
    c. Name the first block Poly_Stage1 and the second block Poly_Stage2.

  2. Interconnect Process Input to Both Blocks:
    a. Route the raw scaled process variable (e.g., vessel level 0–100% from Pcs7AnIn.PV_Out) to input In of Poly_Stage1.
    b. Route the identical signal to input In of Poly_Stage2.

  3. Connect Cascading Handshake Parameters:
    a. Connect Poly_Stage1.CasOut directly to Poly_Stage2.CasIn.
    b. On Poly_Stage2, set input parameter CasEn.Value = 1 (Cascade Enable).
    c. On Poly_Stage1, verify CasEn.Value = 0 (first block is the cascade master).

  4. Configure Monotonic Interpolation Points:
    a. On Poly_Stage1 (Points 1 to 8):

    • Set Num = 8.
    • Configure coordinates: e.g., $X_1 = 0.0, Y_1 = 0.0$ up to $X_8 = 50.0, Y_8 = 420.0$.
      b. On Poly_Stage2 (Points 9 to 16):
    • Set Num = 8.
    • Set point 1 to match the end of Stage 1: $X_1 = 50.0, Y_1 = 420.0$.
    • Configure remaining points monotonically: $X_2 = 60.0$ up to $X_8 = 100.0, Y_8 = 1000.0$.
  5. Combine Final Output Signals:
    a. Poly_Stage2.Out represents the final cascaded result across the entire 0–100% span.
    b. Connect Poly_Stage2.Out to the downstream technological block (e.g., volume display on MonAnL.PV).
    c. Compile CFC charts and execute delta download in RUN.

Verification

  1. In CFC online, simulate In = 25.0 (within Stage 1): verify Poly_Stage1 calculates active interpolation and Poly_Stage2.Out passes through the valid Stage 1 value via CasIn.
  2. Simulate In = 50.0 (boundary): verify Poly_Stage2.Out reflects exactly 420.0.
  3. Simulate In = 75.0 (within Stage 2): verify Poly_Stage2 takes over interpolation actively, calculating the correct higher-range non-linear volume.
  4. Verify that signal quality remains 16#80 (Good) across the entire 0–100% range.

Limitations and Operational Precautions

Never configure overlapping or decreasing X-values between cascaded blocks (e.g., Block 2 starting at X1 = 40 when Block 1 ends at X8 = 50). Non-monotonic sequences cause calculation errors and trigger ErrorNum = 1.

Engineer FAQ

How many points can a single Polygon block interpolate in APL?

A single Polygon block can interpolate between 2 and 8 coordinate points.

What parameter enables cascading on the second Polygon block?

Parameter CasEn (Cascade Enable) must be set to 1 on the succeeding block.

What parameter carries the cascading token between Polygon blocks?

CasOut of the first block connects to CasIn of the second block.

Where do I take the final interpolated output in a 2-block cascade?

Take the final output from Out of the second (succeeding) Polygon block.

What happens if X coordinates are not strictly increasing?

The block detects non-monotonic coordinates, sets ErrorNum = 1, and holds Out at the low limit or zero.

Technical References

Related Articles

Related Tags

  • Polygon
  • Cascading
  • Non-linear Interpolation
  • CasIn
  • CasOut
  • APL Math
20 respuestas