Configuring Rising-Edge-Only Alarm Generation with ALARM_8P and Event Blocks in SIMATIC PCS 7
In SIMATIC PCS 7, generating a process alarm strictly on the rising edge (0 to 1 transition) without an outgoing or leaving message requires configuring the message class in the S7 Message Configuration dialog or using dedicated event blocks such as Event (FB1811) or EventTs (FB1823). When using ALARM_8P (SFB35), configure the message class as an 'Operating Message' or 'Message without acknowledgment' without an outgoing state, or decouple the signal input using edge-evaluation logic to suppress the falling-edge trigger.
Table of Contents
- Operating Principles of ALARM_8P Edge Evaluation in S7-400
- Alarm Block Selection Matrix for Edge and Operational Messaging
- Configuring Rising-Edge Messaging in S7 Message Configuration
- Alternative Edge Logic Using CFC Flip-Flops and Event Blocks
- Verification
- Limitations and Operational Precautions
- Engineer FAQ
- Technical References
- Related Articles
- Related Tags
Operating Principles of ALARM_8P Edge Evaluation in S7-400
The standard block message generator in SIMATIC S7-400 controllers is the system function block ALARM_8P (SFB35). ALARM_8P monitors up to eight binary signal inputs (SIG_1 through SIG_8) cyclically. By design, the block evaluates both signal transitions:
* Rising Edge (0 -> 1): Generates an Incoming (+) alarm state and initiates acknowledgment requirements.
* Falling Edge (1 -> 0): Generates an Outgoing (-) alarm state, clearing the active alarm in WinCC Alarm Logging.
When process engineers require an alarm or operator notification to trigger strictly on an instantaneous event (e.g., button pressed, cycle started, transient trip condition) without generating a cleared/leaving message or leaving an unacknowledged orphan alarm on the screen, relying on raw ALARM_8P behavior causes complications. If SIG_1 falls back to 0, WinCC records a leaving event. Furthermore, if SIG_1 remains 1 until acknowledged, the signal cannot re-trigger a new alarm upon subsequent process cycles without an explicit reset.
Alarm Block Selection Matrix for Edge and Operational Messaging
Select the appropriate messaging block and configuration method based on functional requirements:
ALARM_8P (SFB35)Event (FB1811)EventTs (FB1823)ALARM_8 (SFB33)SFB35SIG_xLicensing & PO notice: Standard APL Event blocks consume AS RT Process Objects when compiled with alarm attributes; verify license capacity before block expansion.
Configuring Rising-Edge Messaging in S7 Message Configuration
The cleanest method to eliminate outgoing messages without adding custom CFC logic is to adjust the message class inside the S7 Message Configuration:
- Open Block Message Properties in CFC:
* Right-click the instance block callingALARM_8P(or the block itself in the CFC chart).
* Select Special Object Properties > Messages. - Modify Message Class Assignment:
* In the Message Configuration dialog, locate the specific signal row (SIG_1toSIG_8).
* By default, the Message Class is set toAlarm - HighorWarning - High, which enforces both incoming and outgoing states.
* Change the Message Class to:- Operating Message - Standard (or Operational Message), or
- Message without acknowledgment - Incoming only.
- In the WinCC message class configuration, messages configured under this class do not track or display a falling-edge state.
- Compile and Download OS:
* In SIMATIC Manager, right-click the OS project and execute Compile OS.
* Scope: Changes only. The compilation updates the WinCC Alarm Logging database to treat the message as an instantaneous incoming event.
Alternative Edge Logic Using CFC Flip-Flops and Event Blocks
If a custom block requires programmatic control over message resetting using controller logic:
1. Using APL Event Block (FB1811):
* Place Event (FB1811) in the CFC chart.
* Connect the process trigger to input In1.
* Configure Feature.Bit0 (Set message behavior) to evaluate rising edge only. The block automatically handles pulse shaping and sends the notification to WinCC without generating a leaving event.
2. Using CFC Logic with ALARM_8P and Flip-Flop (FC389 / SR):
* Insert an R_TRIG (Rising edge detector) or RS flip-flop ahead of SIG_1.
* Evaluate the ACK_STATE output of ALARM_8P. ACK_STATE contains bits 0-7 indicating the acknowledgment status of incoming messages for signals 1-8.
* Latch the input using the flip-flop upon process signal rising edge.
* Use the corresponding acknowledgment bit from ACK_STATE or a timer pulse to reset the flip-flop, ensuring the input returns to 0 cleanly before the next event occurs.
Verification
Verify rising-edge alarm behavior:
1. Trigger the process signal (0 -> 1 transition) on the controller.
2. Open the WinCC Alarm Control in Runtime. Confirm that an Incoming (+) alarm entry is registered with the current timestamp.
3. Return the process signal to 0.
4. Confirm that no Outgoing (-) entry appears in the WinCC Alarm Logging list.
5. Trigger the process signal a second time (0 -> 1) and confirm that a new Incoming (+) alarm is immediately logged without deadlocks.
Limitations and Operational Precautions
- Operational messages configured as 'Incoming only' cannot be used for critical safety interlocks or shutdown trips where operators must be aware of persistent faulted states.
- Generating rapid bursts of edge-triggered messages can flood the controller's communication buffer and WinCC Alarm Logging queue. Implement minimum re-trigger suppression timers (e.g., 500 ms) for fluttering signals.
- When using
ACK_STATEfeedback logic, be aware that remote acknowledgment from WinCC can take several controller scan cycles to propagate back to the AS.
Engineer FAQ
Can ALARM_8P be triggered by a single-cycle pulse in CFC?
Yes. However, the signal pulse must remain active for at least one full execution cycle of the block's runtime group (OB 30-38). If the pulse is generated and cleared within an interrupt routine faster than the cyclic OB, ALARM_8P will miss the edge.
Why does WinCC show an unacknowledged alarm even after the signal returned to zero?
Standard PCS 7 alarm classes require operator acknowledgment regardless of whether the physical signal has cleared. To prevent this, use a message class that does not require acknowledgment (such as Log Message or Operational Message).
What is the difference between FB1811 (Event) and FB1823 (EventTs)?
FB1811 utilizes standard cyclic CPU timestamps. FB1823 (EventTs) interfaces with high-precision time-stamping hardware (e.g., ET 200M IM 153-2 with 1 ms SOE capability) to record exact field contact transition times.
Technical References
- SIMATIC S7-300/400 System and Standard Functions Reference Manual (A5E00709387)
- SIMATIC PCS 7 Advanced Process Library (APL) Manual (A5E32106040)
- Siemens Support Entry 109780813: PCS 7 Message Configuration Guidelines
Related Articles
- Implementing Sequence of Events (SOE) 1ms Time Stamping in PCS 7
- Configuring APL Event and EventTs Blocks for Batch Automation
- Troubleshooting Alarm Overflow and S7 Communication Buffer Saturation
Related Tags
- ALARM_8P
- SFB35
- Rising Edge
- Event Block
- FB1811
- CFC Messaging
- Alarm Logging