Configuring Decimal Formatting, Substitute Values, and Timer Displays in PCS 7 APL

Configuring Decimal Formatting, Substitute Values, and Timer Displays in PCS 7 APL

In SIMATIC PCS 7 Advanced Process Library (APL), decimal formatting on block icons is configured by opening the object properties in WinCC Graphic Designer and setting 'Configurations > AnalogValueFormat1' to '##0' to display integer units without decimals. To force a substitute value upon sensor failure, configure the channel driver block Pcs7AnIn by setting Feature.Bit28 = 0 (output substitute value), Feature.Bit29 = 1 (apply substitute value on bad quality), Feature.Bit30 = 0, and assign the desired value to SubsPV_In. To display elapsed or remaining time from a TimerP block on WinCC faceplates, interconnect TimeRemaining to MonAnL.PV_In or OpAnL.PV_In, and ensure the OS tag acquisition cycle is set to 250 ms.

Table of Contents

Executive Summary

Automation engineers implementing SIMATIC PCS 7 APL frequently encounter requirements to adjust numerical readout formats on SCADA screens, force defined fallback values when analog field instruments fail, and visualize controller countdown timers on operator stations. By default, analog block icons generate with fixed decimal formats (such as ##0.0), channel drivers report bad quality codes without forcing fallback setpoints unless explicitly parameterized, and execution timers (TimerP) lack dedicated operator faceplates. This guide provides field-tested procedures to modify block icon formatting persistently across OS compiles, parameterize safe substitute values using APL feature bits, and integrate timer readouts into standard analog monitoring blocks.

Analog Value Formatting on APL Block Icons

APL analog block icons (such as @MonAnL/1) evaluate dynamic format strings to render real process values. When an engineer modifies formatting directly on an instantiated icon, standard OS compilation can reset the property if the icon is recreated rather than updated.

The property AnalogValueFormat1 is governed by the OS Project Editor and block icon control files (@PCS7TypicalsAPLV8.pdl). Setting AnalogValueFormat1 = ##0 forces WinCC to truncate the floating-point display to integer precision without altering the underlying IEEE 754 floating-point variable in controller memory. To ensure persistence across full OS compilations, avoid renaming the parent CFC chart or changing the block icon type number after customization.

Configuring Substitute Values on Bad Quality Signal in Pcs7AnIn

The channel driver block Pcs7AnIn (FB1869) processes raw analog inputs from distributed I/O modules and generates structured process variables (PV_Out) containing process values and quality codes (ST). When an instrument wire breaks or an analog module flags an overflow, Pcs7AnIn asserts Bad = 1.

To force a predetermined high, low, or safety fallback value upon signal failure, parameterize the block's feature word:
* Feature.Bit28 = 0: Disable output of last valid value.
* Feature.Bit29 = 1: Enable output of substitute value on error (SubsPV_In).
* Feature.Bit30 = 0: Do not maintain raw input on wire fault.
* SubsPV_In: Assign the engineering unit target (e.g., 0.0, 100.0, or -50.0) that must be routed downstream.

Displaying TimerP Values on WinCC Faceplates

The standard PCS 7 timing block TimerP (FB1810) executes in cyclic interrupt organization blocks (such as OB35 / 100 ms) and tracks countdown durations via output TimeRemaining. However, TimeRemaining does not carry the S7_m_c = true attribute required to generate OS communication tags automatically.

To display remaining duration in runtime:
1. Interconnect TimerP.TimeRemaining directly to MonAnL.PV_In (Analog Monitoring) or OpAnL.PV_In (Analog Operator).
2. Using OpAnL enables operators to modify the timer setpoint directly from the WinCC faceplate while observing countdown.
3. In WinCC Graphic Designer, change the tag trigger update cycle from the default 2 s to 250 ms or 500 ms to prevent apparent display skipping (e.g., counting down in 2-second jumps).

Configuration and Parameter Comparison

The following table compares the configuration mechanisms for display formatting, substitute value routing, and timer visualization:

Engineering RequirementTarget Block / ObjectParameter or PropertyRequired Value / SettingFunctional ResultInteger Display (No Decimals)WinCC Block Icon @MonAnLAnalogValueFormat1##0Truncates decimal places in runtime display.Single Decimal DisplayWinCC Block Icon @MonAnLAnalogValueFormat1##0.0Displays one decimal place (default).Substitute Value RoutingChannel Driver Pcs7AnInFeature.Bit28 / Bit29Bit28=0, Bit29=1Routes SubsPV_In downstream on instrument fault.Last Valid Value HoldChannel Driver Pcs7AnInFeature.Bit28 / Bit29Bit28=1, Bit29=0Freezes output at last good measurement before fault.Timer Remaining ReadoutTechnological Block MonAnLPV_InConnected to TimerP.TimeRemainingGenerates WinCC tag and standard faceplate.Timer Setpoint AdjustmentOperator Block OpAnLPV_In & SP_OutLinked to Timer InputsAllows operator to enter setpoint and view countdown.

Step-by-Step Implementation Procedure

Method 1: Configuring Substitute Value on Sensor Fault in CFC

  1. Open the CFC chart containing Pcs7AnIn in SIMATIC Manager.
  2. Open the block properties for Pcs7AnIn and expand the Feature parameter.
  3. Set Feature.Bit28 = 0 and Feature.Bit29 = 1.
  4. Enter the desired safety fallback value into input SubsPV_In (e.g., 0.0 for flow shutoff or 100.0 for high alarm trip).
  5. Compile the AS program using 'Changes Only' and download to the controller.

Method 2: Suppressing Decimal Places on Block Icons in WinCC

  1. Open the target process picture (*.pdl) in WinCC Graphic Designer.
  2. Select the analog indicator or @MonAnL block icon.
  3. Open the Object Properties window and navigate to Configurations.
  4. Locate property AnalogValueFormat1 and change the text from ##0.0 to ##0.
  5. Save the graphic picture. In WinCC Explorer, verify that updating block icons preserves this setting.

Verification

To verify correct implementation:

  1. Decimal Truncation: In WinCC Runtime, observe the process value on the modified block icon. Confirm that numbers display as whole integers (e.g., 45 instead of 45.0).
  2. Substitute Value Trip: In S7-PLCSIM or on the physical instrument, disconnect the analog wire or simulate an underflow (16#7FFF). Verify that Pcs7AnIn.Bad switches to 1, PV_Out.Value adopts SubsPV_In, and the downstream MonAnL block triggers a high/low alarm as configured.
  3. Timer Readout: Start TimerP in the AS. In WinCC Runtime, open the faceplate for MonAnL or OpAnL and confirm that remaining time decrements smoothly without skipping values.

Limitations and Operational Precautions

  • OS Compilation Overwrites: If block icons are regenerated with option 'Delete and Recreate' instead of 'Update', custom formatting properties will revert to @PCS7Typicals defaults.
  • Controller Memory Resolution: Truncating decimal formatting in WinCC changes only the visual display; internal mathematical calculations in CFC continue to evaluate the full 32-bit floating-point value.
  • Safety Considerations on Substitute Values: Forcing a substitute value bypasses process alarms unless SubsPV_In is deliberately set outside alarm thresholds (PV_AH_Lim / PV_AL_Lim).

Engineer FAQ

Why does WinCC reset AnalogValueFormat1 back to ##0.0 after compiling the OS?

This occurs when the block icon is recreated from template files because the chart name, block name, or icon type changed. If the icon instance is simply updated, properties in the control file are retained.

Can TimerP display fractional milliseconds on WinCC screens?

No. The standard WinCC tag logging and screen refresh mechanisms support maximum update rates of 250 ms, making sub-second millisecond display impractical over standard Terminal Bus architectures.

What happens to the quality code when SubsPV_In is output?

When Feature.Bit29 outputs SubsPV_In, the signal status byte is set to 16#60 (Simulated value, good) or 16#48 depending on specific APL version settings, signaling downstream blocks that a fallback value is active.

Technical References

Related Articles

Related Tags

  • https://industrialautomation.net/search?query=simatic-pcs7
  • https://industrialautomation.net/search?query=advanced-process-library
  • https://industrialautomation.net/search?query=wincc-scada
  • https://industrialautomation.net/search?query=channel-drivers
6 respuestas