Jump to content

Recommended Posts

Posted
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?
Posted
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.
Posted
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.
Posted (edited)
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
Posted
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.
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...