WinCC flexible Alarms Acknowledgement

JNS

Member
Join Date
Apr 2009
Location
UK
Posts
26
Hi,
I am using Simatic MP277.I am looking for a method to acknowledge all the active alarms on HMI when the push button pressed in the field.i.e. When the pushbutton is pressed in the field,Digital sigal will come in to PLC. If this signal is active in the PLC then it should acknowledge all active alarms on HMI.

There is individual PLC acknowledge bit for the each alarms in the WinccFlex and I could not find a way to set all these PLC acknowledge bit from a singal bit in a PLC(PLC pushbutton).

I appreciate all the help.

Thanks
JNS
 
I have done something similar

In WinCC Flex i have a word tag setup "Confirmword" (Array of 16 words), i move FFFF to the Array when i want to clear all alarms, otherwise i hold them at zero.

PLC CODE
Code:
      L     W#16#0
      T     "Message DB".ConfirmWord1
      T     "Message DB".ConfirmWord2
      T     "Message DB".ConfirmWord3
      T     "Message DB".ConfirmWord4
      T     "Message DB".ConfirmWord5
      T     "Message DB".ConfirmWord6
      T     "Message DB".ConfirmWord7
      T     "Message DB".ConfirmWord8
      T     "Message DB".ConfirmWord9
      T     "Message DB".ConfirmWord10
      T     "Message DB".ConfirmWord11
      T     "Message DB".ConfirmWord12
      T     "Message DB".ConfirmWord13
      T     "Message DB".ConfirmWord14
      T     "Message DB".ConfirmWord15
      T     "Message DB".ConfirmWord16

      A     "Error Reset PB"
      JCN   M001
      L     W#16#FFFF
      T     "Message DB".ConfirmWord1
      T     "Message DB".ConfirmWord2
      T     "Message DB".ConfirmWord3
      T     "Message DB".ConfirmWord4
      T     "Message DB".ConfirmWord5
      T     "Message DB".ConfirmWord6
      T     "Message DB".ConfirmWord7
      T     "Message DB".ConfirmWord8
      T     "Message DB".ConfirmWord9
      T     "Message DB".ConfirmWord10
      T     "Message DB".ConfirmWord11
      T     "Message DB".ConfirmWord12
      T     "Message DB".ConfirmWord13
      T     "Message DB".ConfirmWord14
      T     "Message DB".ConfirmWord15
      T     "Message DB".ConfirmWord16
M001: NOP   0
You need to define an array big enough to clear all your alarms in your project.

If you need to acknowledge large memory areas then i suggest using block move "SFC20 BLKMOV"
 
Last edited:
I'm a ladder guy, but I do it the same way (just in ladder). I have found you need to set the bits to acknowledge for a period of time - about two seconds. This is so the HMI can read them from the PLC. Then you need to put them back to all zeroes.

Back when we used ProTool the alarm acknowledgement bits had to be contiguous with the alarm bits. For example if the alarm bits started at M100.0 and were three words long, the acknowledgement bit had to start at MW106 and be three words long.

Based on this idea of contiguous, I have one tag in WinCC Flexible.
It is defined as:
ALM_AND_ACK_WD
MW100
INT
Array elements = 48 (this is for 24 alarm words & 24 acknowledge words)

With this one tag I do all the alarms in Flexible. A digital alarm is set up like this:
"Alarm M100.0"
Number: 2001
Class: Errors
Trigger Tag: ALM_AND_ACK_WD
Trigger Bit: 8
Trigger Address: M100.0 (for display only, dependent on Trigger Bit)
PLC Ack Tag: ALM_AND_ACK_WD
PLC Ack bit: 392
PLC ack address: M148.0 (for display only, dependent on Trigger Bit)

Tip: You can configure the display of columns in Flexible so you can "see" this information at a glance in the Discrete Alarms editor.

Now in the PLC when an alarm is acknowledged (operator presses Alarm Clear pushbutton):
Move -1 to all acknowledge words MW148 - MW194 (sets all bits)
Set a latch

When latch set, enable timer for 2 seconds.

When timer done:
Move 0 to all acknowledge words MW148 - MW194 (clears all bits)
Reset latch
 
This worked well for my project.

Create 3 DBs, one will be the Active alarm which you condition to create the actual alarm. The SetDB contains all of the alarms that are set but not acknowledged, and the AckSetDB contains all set and acknowledged alarms.

I create the ActiveAlarmDB, and copy and paste into the other (2) DBs.

In WinCC Flex, use the AckSetDB for your alarm view and on the PLC side plug in your acknowledge & reset bits from the HMI.

Hope this helps

FUNCTION AlarmWordHandler : VOID

TITLE= 'GenAlarmHandling'
Version:'0.0'
Author:'OPC'
Name: 'Alarms'
Family:'GenAlarm'

VAR_INPUT
Acknowledge, //Acknowledges all pending alarms
Reset: BOOL; //resets all pending alarms

END_VAR


VAR_IN_OUT
ActWord, //Word containing all active alarms
SetWord, //Word containing all set alarms
AckWord: WORD; //Word containing all set and acknowledged alarms
AnyAckAlarm, //Indicates that at least one acknowledged alarm is pending
AnyUnackAlarm, //Indicates that at least one unacknowledged alarm is pending
AnyResettableAlarm:BOOL; //Indicates that at least one acknowledged alarm is resolved but not resetted yet

END_VAR


//Acknowledge set alarms if acknowledge alarms active
IF Acknowledge THEN
AckWord := SetWord;
END_IF;

//Reset set alarms if reset alarms active and alarm acknowledged
IF NOT RESET THEN
//Memorize active alarms in set alarms DB using bitwise OR instruction
setWord := ActWord OR SetWord;
ELSE
//Reset acknowledged alarms-> only active or (set but not acknowledged alarms remain)
SetWord := ActWord OR (SetWord AND NOT AckWord);
//Remove acknowledges of reset alarms, only active, acknowledged alarms remain acknowledged
AckWord := ActWord AND AckWord;
END_IF;

//Any unacknowledged alarm active
IF (SetWord AND NOT AckWord)<> 0 THEN
AnyUnackAlarm := true;
END_IF;

//Any acknowledged alarm set
IF (SetWord AND AckWord)<> 0 THEN
AnyAckAlarm := true;
END_IF;

IF (SetWord AND AckWord AND NOT ActWord)<> 0 THEN
AnyResettableAlarm := true;
END_IF;





END_FUNCTION
 
Last edited:

Similar Topics

Hi! I have wincc flexible rt on computer connected to modbus plc via ethernet. Wincc flex controls some analog values (integers, modbus words)...
Replies
2
Views
3,751
Thanks to Jesper here, I finally was successfull at connecting a Simatic 377 with a TSX premium 57 with a good connection speed. But a problem...
Replies
1
Views
3,322
Hi, I have a Siemens S7-400 PLC connected to 10 operator panels (MP370) with over 1000 alarm messages. My client wants to synchronize the...
Replies
1
Views
3,816
Is it possible to import alarms into WinCC felx 2007 from excel. I especially mean the alarm texts. We need a couple thousand alarms and the texts...
Replies
15
Views
8,527
Hi, I know that you can export a translation of alarm messages... by right clicking on DISCRETE ALARMS and choosing for export. But, I want...
Replies
2
Views
3,854
Back
Top Bottom