Alarms' Stacking

dsking

Member
Join Date
Dec 2008
Location
ontario
Posts
66
Hey Guys,
I'm trying to come up with programming(Contrologix) for alarm reporting. The alarms are to be stacked(I'm thinking FIFO)and recalled one by one in the order they occured and sent to trigger a pre-recorded message through the 1756 OB32 card.
I need help in the logic layout, and is the FIFO a good choice? how do i capture all alarms if there is a bunch in one scan? Can I use Move MAsk instructions?
The alarm tags already exist in a different program.
Please help i would like to complete the project by weekend.

DsKing
 
Are you a student with an assignment due on Monday or an under appreciated die hard programmer working on his/her weekend?
 
In order to capture the order of faults in the same scan, the best approach is to use a subroutine Every place where you set a fault latch, your fault subroutine would be called. Pass a fault number with the call. In the subroutine, stuff the faults in your fifo. Later when you service the alarms, pop the fault numbers off, they should be in the order. Decode the fault numbers and play your messages.
 
thanks. That sounds really helpful, However i aready have alarms generated in the main program and displayed on wonderware HMI.I need to capture these alarm bits and stack them in the FIFO register and call them up in order they occurred and activate the Audio.
Do i still need to use subroutines in this case. Examples would be really helpful.
 
In attached figure you will see a fifo queue where I save last 10 faults of a specific item, in this case I use an UDT with has year,month,day,min,sec.uSec and fault code.

queue flaw.jpg
 
If you don't use a subroutine, with a JSR branch each time a new alarm occurs, then what would you do when multiple alarm bits get set during a single scan?

Depending on the data structure of the alarm bits, you might be able to use a for/next loop around an XIC with an indirect bit address to trigger the FFL...I think that your alarms would all need to be in a boolean array for that to work. If they are just bits within INTs or DINTs, then you'd need a loop for each element.

If you go with the method ATU recommended, you'd just add a JSR to each rung that sets an alarm bit. Make sure the JSR only executes once per false to true transition of the alarm bit (oneshot).

In the JSR, you simply FFL the alarm value you need for that particular alarm into the stack and return.

Actually, you could put the FFL instruction on every existing alarm rung, and not need to worry about the oneshot. Just use the same control structure for all of them.

Make the length adequate to hold as many alarms as you need to store.

Add a FFU rung that unloads the stack according to how you want them to be "played back". Use the same control structure for it as well.

I don't have Logix5000 on this machine so I can't post examples...

Paul
 
Thanks ATU, OkiePc and Widelto. I'll give it a shot even though i'm kind of lost. Detailed examples would have been really helpful.
 
Last edited:
In order to capture the order of faults in the same scan, the best approach is to use a subroutine.
<snip>

If you don't use a subroutine, with a JSR branch each time a new alarm occurs, then what would you do when multiple alarm bits get set during a single scan?
<snip>
Paul

Ok, I might be missing something here as this is a ControlLogix platform, but if multiple alarms are generated in a single scan; wouldn't the order that the alarms occur in be by definition the order in which they appear in the ladder logic? If this is the case, it would be impossible to tell which error _actually_ occurred first. Thus, you could just have a routine at the end of your ladder that stamps all errors that occurred in that scan with the same time stamp. The only benefit that you would get from time stamping each alarm as it is scanned would be an indication of how long it took the processor to scan the intervening ladder logic.

Again, I may be _way_ out in left field on this. If that's the case, feel free to ignore me (or correct me, I could always stand to learn something new :) .)

Brian
 
I'm almost not bothered to capture the exact order in which they occurred anymore. As long as i do not miss an alarm if a bunch is set in one scan.
This is driving me nuts now.
 
Ok, I might be missing something here as this is a ControlLogix platform, but if multiple alarms are generated in a single scan; wouldn't the order that the alarms occur in be by definition the order in which they appear in the ladder logic? If this is the case, it would be impossible to tell which error _actually_ occurred first. Brian
I'm asking myself the same question. How does Controllogix distinguish between alarms that have occurred within the same scan?
 
What is the case when a periodic task is run? Does it interrupt the continuous tasks or does it wait until the continuous task is finished? The same question for Periodic tasks of different priorities.
 
What i meant was, that in order to add multiple alarms to the stack during a single scan, you will have to have multiple FFL statements.

Whether they're in a subroutine that gets called more than once or in a loop is a matter of personal preference.

In either case, they'll get added in the order they are programmed, and it shouldn't make much of a difference...

dsking: can you tell us more specifically what has you stuck?
 

Similar Topics

Hi guys, I'm trying to configure a rate of change alarm on a setpoint tag so that when the operator types a number by error (exemple: 30 instead...
Replies
4
Views
168
Hello, I have been tasked with adding some analog signals for display and alarm setup in some old Schneider Electric HMIGTO HMI-panels. I have...
Replies
4
Views
179
Dear Friends, I have few Profinet slaves connected to S7-1200 over Profinet. I wish get alarms and disagnostics from the devices. (IO-Link...
Replies
3
Views
155
Hi guys, I've got problem about my Alarms services (i think), that happen after installed Visual Studio. I did a few things like, Repair : Studio...
Replies
3
Views
139
Hello, I have to deal with iFix again and am looking at the most efficient way to create alarms to display in iFix, i.e. not creating an...
Replies
0
Views
155
Back
Top Bottom