Integrating Group Displays and ALARM_8P EventState Tags in Custom PCS 7 Blocks

Integrating Group Displays and ALARM_8P EventState Tags in Custom PCS 7 Blocks

In SIMATIC PCS 7 systems, adding an Advanced Process Library (APL) collective Group Display to a custom function block and block icon requires configuring specific block and parameter attributes in SCL, embedding an ALARM_8P instance call, and linking the resulting .EventState tag to the Group Display object in WinCC. By declaring S7_m_c := 'true' and S7_alarm_ui := '1' on the block header, declaring MsgEvId1 with S7_server := 'alarm_archiv', and interconnecting MsgEvId1 into ALARM_8P, OS compilation automatically generates the read-only .EventState tag that powers collective alarm badges.

Table of Contents

Group Display Architecture and the EventState Tag

In SIMATIC PCS 7, the Group Display (collective alarm indicator) provides operators with immediate visual summaries of active, unacknowledged, and locked alarms across equipment hierarchies. Placed inside block icons and picture overview bars, the Group Display renders standardized alarm symbols:
- Red 'A' for Alarm High
- Yellow 'W' for Warning
- White 'F' for Tolerance / Fault
- Blue padlock icon for Locked Messages

In runtime, the visual state of the Group Display is driven by a single 32-bit integer tag named .EventState. The .EventState tag is not created manually by the engineer; it is generated automatically by the OS compiler for every AS block configured with native alarm capabilities.

SCL Block Declarations for ALARM_8P and Alarm Attributes

To enable automatic .EventState generation in a custom SCL function block:

  1. Declare Block Header Attributes:
    scl { S7_m_c := 'true'; S7_alarm_ui := '1' } // Mandates Group Display / EventState generation
  2. Declare Message Event ID Variable:
    scl VAR_INPUT MsgEvId1 : DWORD := 16#FFFFFFFF; { S7_visible := 'false'; S7_link := 'false'; S7_param := 'false'; S7_server := 'alarm_archiv'; S7_a_type := 'alarm_8p' } END_VAR
  3. Instantiate and Call ALARM_8P:
    ```scl
    VAR
    ALARM_8P_1 : ALARM_8P;
    END_VAR

ALARM_8P_1(
EN_R := TRUE,
ID := W#16#EEEE,
EV_ID := MsgEvId1,
SIG_1 := FaultCondition AND NOT MsgLock,
SIG_2 := WarningCondition AND NOT MsgLock
);
```

Configuring Special Object Properties and Messages in STEP 7

After compiling the SCL source file:

  1. In SIMATIC Manager, navigate to the block container in the Master Data Library.
  2. Right-click the newly compiled FB and select Special Object Properties > Message....
  3. The message configuration dialog opens, displaying 8 available message slots associated with ALARM_8P_1:
    - Slot 1: Assign Message Class Alarm - High and message text (e.g. Electrical Fault).
    - Slot 2: Assign Message Class Warning - High and message text (e.g. High Temperature Warning).
    - Configure single acknowledgment or group acknowledgment options as required.
  4. Save the block and update block types across the multiproject.

Linking the WinCC Group Display Object to .EventState

During OS compilation, the system reads MsgEvId1 and generates the corresponding .EventState tag in WinCC Tag Management:

  1. Open the target process picture in WinCC Graphics Designer.
  2. Place a Group Display object from the WinCC object palette (or select the group display element within the custom block icon User Object).
  3. Open object properties and navigate to Geometry / Dynamic.
  4. Link the property GroupValue (Sammelwert) to the technological tag path:
    TagPrefix.EventState (or <CFC_Name>/<Block_Name>.EventState).
  5. In runtime, when an alarm is triggered, WinCC automatically decodes the .EventState bitmask, illuminating the appropriate color badge on the Group Display and propagating the event upwards into @Overview1.pdl.

SCL Declaration and Attribute Configuration Matrix

The following table details the mandatory attributes required for Group Display integration:

Attribute / ParameterLocation in SCLValue / SyntaxOperational PurposeS7_m_cBlock Header'true'Enables WinCC monitoring and control tag generationS7_alarm_uiBlock Header'1'Commands OS compiler to generate .EventState tagMsgEvId1VAR_INPUTDWORD := 16#FFFFFFFFHolds unique message ID assigned by STEP 7S7_serverParameter Attribute'alarm_archiv'Routes alarms into WinCC Alarm Logging archiveS7_a_typeParameter Attribute'alarm_8p'Identifies the message block type as ALARM_8PGroupValueWinCC Object PropertyDynamic LinkBinds Group Display visualization to .EventState

Note: Never declare unused spare MsgEvId variables in SCL, as unassigned message IDs corrupt the .EventState bitmask.

Verification

Verify Group Display operation in WinCC Runtime:
1. In CFC test mode, force an active fault condition onto SIG_1 of the custom block.
2. Open the process picture in WinCC Runtime; verify that the Group Display on the custom block icon immediately flashes red with letter 'A'.
3. Verify that the Area Button in the top navigation bar (@Overview1.pdl) illuminates the collective red alarm indicator.
4. Acknowledge the alarm; confirm that the Group Display stops flashing and displays steady red.
5. Clear the fault; verify that the Group Display clears cleanly.

Limitations and Operational Precautions

Essential rules for custom alarm block engineering:
- The EV_ID assigned to ALARM_8P must be unique across the entire CPU; never manually assign numerical constants to MsgEvId1 in code; allow the STEP 7 compiler to assign IDs automatically.
- Do not call ALARM_8P in high-frequency cyclic OBs (such as OB35 at 10 ms) without gating; rapid alarm pulsing can overwhelm controller communications buffers.
- If message texts are modified in the Master Data Library, a changes-only OS compilation is mandatory to update WinCC Alarm Logging.

Engineer FAQ

Why is .EventState not generated during OS compile?

Verify that { S7_alarm_ui := '1' } is present in the SCL block header and that at least one MsgEvId variable is declared with { S7_a_type := 'alarm_8p' }.

Can I use multiple ALARM_8P calls in one custom block?

Yes. A custom block can call multiple ALARM_8P instances (e.g. ALARM_8P_1, ALARM_8P_2) with corresponding MsgEvId1, MsgEvId2 parameters to support up to 16 or 24 messages per block.

Where is the EventState bitmask structure documented?

The bitmask structure is defined in the SIMATIC PCS 7 Programming Instructions for Blocks manual; bits 0–15 encode alarm counts, bits 16–23 encode unacknowledged states, and bits 24–31 encode message lock states.

Technical References

Related Articles

Related Tags

  • Group Display
  • EventState
  • ALARM_8P
  • S7_alarm_ui
  • SCL
6 respuestas