Creating Operator-Modifiable Calculation Inputs in WinCC: Connecting I/O Fields to CFC Math Blocks via OpAnL
In SIMATIC PCS 7, standard arithmetic calculation blocks (such as Mul_R FC63, Add_R, and Div_R) lack the s7_m_c system attribute and cannot generate WinCC tags directly. To allow operators to modify an input parameter dynamically from a WinCC I/O field, place an APL analog operator block (OpAnL FB1866) in the CFC chart. Connect OpAnL.Out to the input pin of Mul_R. When you compile the OS, WinCC automatically creates the structured tag for OpAnL. In WinCC Graphics Designer, bind the I/O field (or standard APL block icon) to OpAnL.SP_LiOp or OpAnL.SP_Int, enabling secure, authorized operator setpoint entry.
Table of Contents
- The s7_m_c Attribute: Why Standard Math Blocks Are Not Taggable
- The APL Operator Block Concept: OpAnL vs Raw Static Constants
- Step-by-Step CFC Interconnection and OS Compilation Workflow
- Binding WinCC I/O Fields and Standard APL Faceplates
- Operator Input Integration Method Comparison
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
The s7_m_c Attribute: Why Standard Math Blocks Are Not Taggable
When engineers build process calculations in Continuous Function Charts (CFC)—such as mass flow temperature compensation, heat duty calculations, or ratio blending—they utilize elementary arithmetic function blocks from the standard library (such as Mul_R FC63 for real multiplication, Add_R FC60 for addition, and Div_R FC61 for division).
A frequent stumbling block occurs when an engineer attempts to expose a multiplication factor or divisor to the operator on the WinCC OS screen. When opening WinCC Tag Management or the WinCC Graphics Designer tag browser, the inputs to Mul_R cannot be found. This occurs because elementary math functions are pure algorithmic routines without instance data blocks. They lack the s7_m_c = 'true' attribute required by the AS-OS compiler to generate WinCC tags.
The APL Operator Block Concept: OpAnL vs Raw Static Constants
In the SIMATIC PCS 7 Advanced Process Library (APL), operator input values must pass through dedicated supervisory blocks. For analog values, the standard block is OpAnL (Analog Value Operation, FB1866):
-
Full OCM Support:
OpAnLpossesses thes7_m_cattribute on its setpoint and operator inputs, automatically creating structured WinCC tags during OS compile. -
Built-in Engineering Ranges and Limits:
OpAnLincludes configurable high and low operator entry limits (SP_HiLim,SP_LoLim), engineering units (PV_Unit), and decimal place formatting, preventing operators from entering dangerous, out-of-range numbers. -
Audit Trail and Operating Messages: When an operator adjusts the value from WinCC,
OpAnLgenerates an operator intervention message in the WinCC Alarm Logging journal with username, old value, and new value.
Step-by-Step CFC Interconnection and OS Compilation Workflow
Follow this sequence in CFC and SIMATIC Manager to implement dynamic calculation inputs:
- Place OpAnL in CFC: Open the target CFC chart. Drag
OpAnL(FB1866) from the APL library catalog into the chart. Rename it meaningfully, such asRatio_Factor. - Configure Range and Default: Double-click
OpAnL. SetSP_LoLim(e.g.,0.1),SP_HiLim(e.g.,5.0), and initial internal setpointSP_Int(e.g.,1.0). - Wire to Math Block: Interconnect
OpAnL.Outto input pinIn2of the arithmetic blockMul_R. - Compile AS Program: Execute Charts > Compile > Changes only.
- Execute OS Compile: In SIMATIC Manager, right-click the OS project and select Compile. The compiler registers
Ratio_Factorin WinCC Tag Management with all associated structure tags.
Binding WinCC I/O Fields and Standard APL Faceplates
In WinCC Graphics Designer, the operator interface can be implemented in two ways:
-
Standard APL Block Icon: Drag the standard
OpAnLblock icon from@PCS7TypicalsAPLV8.pdlinto your process graphic. At runtime, clicking the icon opens the full APL faceplate where operators view trends, limits, and type new values. -
Direct WinCC I/O Field: If a compact embedded input box is preferred on the process graphic:
- Insert an I/O Field from the Smart Objects palette.
- Under Properties > Output/Input > Output Value, bind the tag to:
Plant/Area/Ratio_Factor.SP_Op#Value. - Set the field type to Input/Output and format to Decimal (
999.99).
Operator Input Integration Method Comparison
The following table compares architectural methods for exposing calculation parameters to operators:
OpAnL (FB1866) + Mul_RSP_HiLim / SP_LoLim)Op_A (FB45) + Mul_Rs7_m_cMul_RVerification
Verify dynamic parameter modification through the following steps:
- Open WinCC Runtime. Locate the newly created I/O field or
OpAnLblock icon. - Click the field and enter a new multiplication factor (e.g.,
2.5). Press Enter. - Open the CFC chart online in Test Mode. Confirm that
OpAnL.Outreflects2.5. - Verify that
Mul_Rcomputes the output correctly (e.g.,Input 10.0 * Factor 2.5 = Output 25.0). - Attempt to enter a value exceeding
SP_HiLim(e.g.,99.0). Confirm that WinCC rejects the entry with an out-of-range advisory.
Limitations and Operational Precautions
Consider these operational rules when implementing operator inputs:
-
Never Allow Division by Zero: If feeding an operator input into a division block (
Div_R), always place a limit or minimum clamping block (SelA02InorPolygon) to preventDiv_Rfrom dividing by zero, which results in NaN (Not a Number). -
Operator Authorization: Ensure the
OpAnLblock icon or I/O field is assigned appropriate user authorization (e.g., Level 5 or Level 6 in WinCC User Administrator) to prevent unauthorized personnel from altering plant calculation factors. -
Signal Status Handling: Verify that
OpAnLgenerates valid signal status (ST = 16#80), ensuring downstream APL controllers do not treat the calculated value as an uncertain or bad sensor signal.
Engineer FAQ
How do I restrict the minimum and maximum value an operator can enter?
Configure the SP_LoLim and SP_HiLim parameters on OpAnL in CFC, which restrict the input limits in the WinCC faceplate and I/O field.
What parameter on OpAnL stores the engineering units (e.g., kg/h or %)?
The PV_Unit parameter defines the engineering unit code according to the IEC 61987 standard, which renders automatically on the WinCC faceplate.
Can I use OpDi01 for Boolean operator switches in CFC?
Yes, OpDi01 is the digital counterpart to OpAnL, providing a secure operator toggle button for Boolean logic inputs.
Technical References
- SIMATIC Process Control System PCS 7 Advanced Process Library (APL) Function Manual (Entry ID: 109780813)
- APL Operator Control Blocks: OpAnL, OpDi01, OpDi03 Reference Manual
- SIMATIC Process Control System PCS 7 OS Process Control Manual
- WinCC Graphics Designer: Working with Smart Objects and Dynamic Tag Binding
Related Articles
- Fundamentals of Continuous PID Control in SIMATIC PCS 7: PV, SP, and LMN
- Configuring WinCC User Archive Control Column Persistence and User Authorization
- Expanding Interlock Capacity in SIMATIC PCS 7 APL Faceplates
Related Tags
- OpAnL
- CFC Math Blocks
- Mul_R
- WinCC I/O Field
- s7_m_c
- Operator Input