Sign in to follow this  
Followers 0
robert_

First event logic Alarm

8 posts in this topic

hello guys I'm working on a project that requires knowing the first event that put on alarm state to one system and because everything happens in seconds and everything shuts down almost the same time it is very hard to tell the operator what was the cause of the shut down , so I would like to know how to implement a logic to capture within milliseconds the first event that "turns off" the whole plant. Would somebody could help me with this please?

Share this post


Link to post
Share on other sites
I suggest that you use the controllers sequence to trap the error and in the same scan you can time stamp it and put it out to the operators panel.

Share this post


Link to post
Share on other sites
Thanks for answering RussB, I refer to a "first trip out alarm". Iwould like to know how to do it.

Share this post


Link to post
Share on other sites
If you have a bit which causes an alarm, simply store the PLC clock to a variable when that bit turns on. Do this to different variables for each alarm bit, and then check the time codes to see when they happened. If you are using an operator interface, they almost all have alarm functions which can be used to log (and time stamp) alarm conditions you define in the program. That would also work. Can't get any more specific since you provided no information on the type of PLC or software being used.

Share this post


Link to post
Share on other sites
Here's an easy way to capture a first in alarm. Create a program/routine which scans all of your alarms, to see if they are in an alarm state. Once an alarm is triggered, write a value to an integer tag, and latch a "First In" bit. When the "First In" bit is True, prevent the logic from scanning the alarms until a reset has been pressed, which will clear the "First In" bit. Each alarm has a unique value, so you can reference the number to determine the First In alarm. You can also give each alarm a string value which writes to a "First In" string tag, for easy indication on the HMI. It requires a bit of extra labor, but it will always captures this first alarm, unless two alarms happen faster than the PLC scan time. In that case, it's a luck of the draw to see which one will be detected as the "First In". This is unlikely though. Hopefully I made this clear, let me know if you have any questions. @Crossbow, the issue with using the alarm interface on the HMI is that sometimes they don't always capture the time accurately to the millisecond, making it difficult to determine which alarm happened first if there were 10 alarms within a second or two. There are exceptions to this of course, like AB's Factory Talk Alarm and Events, which uses a PLC driven alarm instruction. Edited by MrAutomation

Share this post


Link to post
Share on other sites
I'm already doing something for this problem. attached a picture of what I did, what do you think?

Share this post


Link to post
Share on other sites
To be honest, this works for 8 alarms, but if you want more, this is going to get really really big, really really fast. Quite literally, on an exponential scale. I've never used Unity, but there must be a way to indirectly reference individual elements in an array of tags. Map all of your alarms to this array. Then check each element in the array, using an incrementing reference number. Once it finds an array element in alarm state, you've got your first in alarm. Sorry about the late reply.

Share this post


Link to post
Share on other sites
We use the same method that MrAutomation uses and it is pretty smooth and flawless. Just remember to contain all that logic in a single rung so that it will go through every bit in the first out function before jumping out to other scheduled processes. This can affect the reliability of this function.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0