Alarm Silence Circuit

jsowder

Member
Join Date
Jun 2003
Posts
6
Does anyone have any ideas on how to write the following code?
If an alarm level goes high it turns on a horn, I need to push an Acknowledge button that silences the horn. Here is the trick, I do not want the horn to go on again until the alarm goes false and then true again. Any ideas? I need to write it in Ladder logic in IEC61131-3
 
Oh good, an easy one (finally!)...

I do this all the time. Operators love it. I have my own method, but here's a 'generic' version that should work with nearly all PLCs:

| ALARM SILENCE
|----] [-------]/[------------( HORN )
|
| ACK_PB ALARM
|----] [---+---] [------------( SILENCE )
| |
| SILENCE |
|----] [---+


.
Basic operation:

First Rung: When "ALARM" bit is ON, "HORN" will sound as long as "SILENCE" bit is OFF

Second rung: When operator presses "ACK_PB", "SILENCE" bit turns ON and is latched ON by the "ALARM" bit. Once ALARM goes false, "SILENCE" bit will unlatch.

Get it?

beerchug

-Eric
 
Two Different Alarms, same horn

OK this worked great for one alarm input. What do you think I need to do to use this for 2 or more? I have the logic like stated below for 2 alarm inputs. It works great until I have alarm 1 still on and ack'ed and I get alarm 2 (true). The horn will not go off again because it still is disabled from alarm 1 ack'ed. Any ideas?
Any help will be appreciated!


| ALARM SILENCE
|----] [-------]/[------------( HORN )
| |
| AlARM2|
|----] [--+
|
| ACK_PB ALARM
|----] [---+---] [------------( SILENCE )
| | |
| SILENCE | ALARM2 |
|----] [---+---] [ --+
 
Use a general alarm flag coil:

Code:
|   ANY_ALARM  SILENCE
|----] [---------]/[------------( HORN )
|
|  ACK_PB     ANY_ALARM
|----] [---+---] [-------------( SILENCE )
|          |
|  SILENCE |
|----] [---+
|
|
|   ALARM1                  ANY_ALARM
|-----] [-----+----------------( )
|             |
|   ALARM2    |
|-----] [-----+
|
|
 
Does not work as I expected

This logic will not latch any alarm, if the alarm goes false the horn shuts off. I need it latched until it is Ack'ed. The other issue is if the first alarm is ack'ed and the alarm remains high and an addition alarm goes high I need the horn to go off again. Does this make sense? Any help again is appreciated.
Not to muddy the waters but this is what I am trying to accomplish. I have 5 alarms. When Alarm1 goes high I need it to sound the horn and remain latched even if the alarm goes low, the horn will remain on until the Ack_PB is pushed. If the ALarm1 stays high and has been Ack'ed and Alarm2 goes high I need the horn to go off again and stay on even if Alarm2 goes low, until the Ack_PB is pushed again.
I really appreciate any help!
 
I always latch the alarm bit where it is set - this keeps your alarm group logic simpler.

I generally use a separate silence and acknowledge pushbuttons instead of doubling up functions on the single button - it is more intuitive, and your prgramming time and operator confusion time is more expensive than the extra pushbutton.

I don't reccommend having the alarm horn go off when a second alarm comes in after the silence is pressed. Operators tend to get pi$$ed off when a horn blasts in their ear when they are standing there figuring out the first alarm. (But that's just me!)

You can always use a separate alram light and alarm horn coil for each alarm occurrence to accomplish what you want to do.
 
To elaborate on Tom's suggestion to latch the alarms locally...

A quick (again, generic) solution might be to latch the 'general alarm' bit, like this:

| ALARM1 ALM_RESET ANY_ALARM
|-----] [-----+-----]/[----------( )
| |
| ALARM2 |
|-----] [-----+
| |
-----------
More Alarms
-----------
| ANY_ALARM |
|-----] [-----+


.
beerchug

-Eric
 
OK almost there

Forgive my lack of knowledge. What would the code look like if I wanted then to have a serperate silence and Ack_PB? And what would the logic look like if wanted to latch the Horn until it was ack'ed
In other words what would the logic look like for what you had mentioned?

Thanks a bunch for your help!
 
Here is an example of some logic.

Alarm 1 uses both a SILENCE ALARM PUSHBUTTON and also an ACKNOWLEDGE PUSHBUTTON.
If alarm input bit turns on, alarm will latch in. Horn can be silenced by SILENCE ALARM pushbutton. Alarm bit will remain latched until ACKNOWLEDGE pushbutton is pressed.


Alarm 2 use only a SILENCE ALARM PUSHBUTTON.
If alarm input bit turns on, alarm will latch in. Horn can be silenced by SILENCE ALARM pushbutton. Alarm bit will remain latched until alarm is silenced and alarm bit goes false.

alarm_1.jpg
 
Hmmm... Kim seems to have beat me to the punch... :D

Anyway, here's my version of all ideas combined...

| ANY_ALARM SILENCE
|----] [------+-----]/[------------( HORN )
| |
| HORN |
|----] [------+
|
|
| SILENCE_PB ANY_ALARM
|----] [------+-----] [------------( SILENCE )
| |
| SILENCE |
|----] [------+
|
|
| ALARM1 ACK_PB
|-----] [-----+-----]/[------------( ANY_ALARM )
| |
| ALARM2 |
|-----] [-----+
| |
| ALARM3 |
|-----] [-----+
| |
| ALARM4 |
|-----] [-----+
| |
| ALARM5 |
|-----] [-----+
| |
| ANY_ALARM |
|-----] [-----+
|


.
Someone double check my code please... ;)

beerchug

-Eric
 
Alarms - my third favorite subject.

Here's some code that will do what jsowder originally wanted - alarms being silenced but not re-annunciating until cleared, but different alarms being allowed to "break the silence".



First Make all the alarms into One-shots

ALARM1 WAS_ALARM1 ALARM1_ONS
-----| |----+---|/|-----------( )
|
| WAS_ALARM1
+------------------( )


ALARM2 WAS_ALARM2 ALARM2_ONS
-----| |----+---|/|-----------( )
|
| WAS_ALARM2
+------------------( )


ALARM3 WAS_ALARM3 ALARM3_ONS
-----| |----+---|/|-----------( )
|
| WAS_ALARM3
+------------------( )


. . . And so on....

Next, determine if a new alarm has occurred.
ALARM1_ONS NEW_ALARM
---+-----| |-----+-------( )
| |
| ALARM2_ONS |
+-----| |-----+
| |
| ALARM3_ONS |
+-----| |-----+
| |
. .And so on...


Note that NEW_ALARM, being driven by one-shots, is itself a oneshot.

Finally, control the horn
NEW_ALARM SILENCE HORN
-----+-----| |-----+----|/|--------( )
| |
| HORN |
+-----| |-----+




Each one-shot won't re-fire the horn until it's own alarm is reset, but a different alarm will have a different one-shot, and so trigger the horn.

I posted a TREATISE some time back that was AB specific and showed some techniques on simplifying the above code. The key to the simplification is the ability manipulate the bits by doing math on the word level. This is not specifically allowed in 61131-3, nor is it specifically prohibited. I can't remember (if I even ever knew) how 61131-3 one-shots are supposed to be coded, which is why I coded them as above.

But Tom's advice is good - unless you have some other means (such as a SCADA) of showing the operator why the blasted horn is blasting again, then stick with the first version of the codes we posted.


If you want to have a seperate ACK and SILENCE, simply modify the above code as follows:

ALARM1 WAS_ALARM1 ALARM1_ONS
-----| |----+---|/|------------( )
|
| WAS_ALARM1
+------------------(L)


ACK WAS_ALARM1
-----| |-----------------------(U)




With the above code, if you press the ACK on an active alarm that has been silenced, the horn will resound. If this is undesirable, put an -|/|-ALARM1 on the unlatch rung, so that you undo the one-shot if the alarm is still active.

If you desire to retain that the ACK has been pressed, see my treatise (link above).
 
Last edited:
Alarms, scan by scan

I received this via e-mail:

I think I follow your code. What do you mean by "WAS_ALARM1" is this an actual bit?
All I want to do is sense alarm1 and trigger a horn. And then be able to silence Alarm1. If Alarm1 stays high fine but if Alarm2 goes high I need to have the horn again trigger. I need to silence Alarm2 and so on.
I hope this makes sence.

Thanks for your help.

Jason

Jason:

Most of us like to keep all exchanges on the forum, for lots of good reasons.

WAS_ALARM1 is an internal bit, used to capture the event of ALARM1 going ON. The label is shorthand for "ALARM #1 was ON last scan". Depending on your PLC type, this bit may not be needed. Some PLCs allow the following code:


ALARM1 ALARM_ONS
-----| |-------(DIFU)


In others, the instruction is not DIFU, but -(^)-. But since you asked for IEC 61131-3, I gave you a generic one-shot rung, which required the extra bit.

As for your requirements "sense alarm1...trigger a horn....silence Alarm1.... but if Alarm2 goes high I need to have the horn again trigger", the code I posted will do exactly that.

Here's how it works:

ALARM1 goes ON. Since WAS_ALARM1 is not ON yet, ALARM1_ONS will fire. THEN WAS_ALARM1 will come ON, resetting ALARM1_ONS on the next scan, and preventing ALARM1_ONS from firing in any future scans until ALARM1 goes OFF (which turns WAS_ALARM1 off in the process).

Getting back to the scan that fired ALARM1_ONS: ALARM1_ONS fires off NEW_ALARM. NEW_ALARM makes the horn sound, and, since the horn is sounding, it will keep sounding until the SILENCE button is pressed.

The next scan, ALARM1_ONS is reset, and, as I said, can't fire again until ALARM1 goes OFF. With ALARM1_ONS reset, NEW_ALARM is reset. This is OK, because it has already done it's job making the horn sound. Since the horn is sounding, it continues to sound.

But pressing the SILENCE breaks the sealing-in of the horn circuit, bringing peace to the land. The horn can't sound off again until NEW_ALARM is true, and it's not, currently. Even though ALARM1 is still active, ALARM1_ONS isn't, and can't be until ALARM1 (and WAS_ALARM1) are false.


If and when another alarm occurs, that alarm's associated _ONS bit will cause NEW_ALARM to fire again.

Does that clear things up? This is the "PLC mindset" that you need to practice getting into - being mindful of what's currently true at any particular point in the scan, and being mindful of what's going to happen next scan when the code loops back around. VB programmers have a particularly hard time with this - their code is triggered just once when some event occurs. PLCs are the Energizer Bunny's of the programming world - they keep going, and going, and going....
 
Last edited:

Similar Topics

Currently I have a simple rung of logic written from an input to a B3 bit for a run status on a pump. When the pump goes down, or the input...
Replies
1
Views
1,899
Looking to silence an alarm from a HMI Button. Right now the HMI button command is set to Pulse the binary bit. Will the attached logic work to...
Replies
9
Views
9,482
Hello- I am trying to figure the best way to stop an alarm beacon when acknowledged and only turn it on again when a new alarm comes in. First...
Replies
1
Views
1,950
Good day all. I have been trying to create a simple alarm circuit and I have everything working for me but one. When an alarm is triggered I need...
Replies
12
Views
5,738
From the Red Lion website, after some customer enquiries in the last week or so... Rev. March 25, 2024 [18:30] Just thought it might help a...
Replies
9
Views
253
Back
Top Bottom