Jump to content

is it possible to add an alarm when power off the PLC ?


Recommended Posts

Hello , 

I want to add  in the alarm history a fault when One power up and power off the PLC . in the power up  of the PLC I used the SB2 and it worked. but in the power off I do not know how to do it, I tried to use even SB2 by reversing the contact but it always gives me the startup time and is not the one of the power off.

Link to comment
Share on other sites

  • MVP 2023

I create my own alarm history rather than use the built-in alarms function, but the technique I use for this could be adapted to your needs. When I create my alarm history, I store the date and time in a vector of MIs using the "RTC To ASCII" function. If you grab the data from that vector in a ladder rung that is executed before the RTC To ASCII function, with SB 2, you will have the last date & time stored just before power loss. Grab the data again with SB 2 just after the function and you'll have the power on date & time. This can be done in 3 consecutive ladder rungs if desired.

  • Like 1
Link to comment
Share on other sites

  • MVP 2023

Here is the way I do it. I'm logging the date and time to a data table, but you can do whatever you want with the MI vectors MI 2000 & MI 2005, such as copy the vectors to another location that won't be overwritten in the next ladder rung.

image.thumb.png.087b0f0a4bc39d705147b4dc50d33d6c.png

  • Like 1
Link to comment
Share on other sites

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.   Paste as plain text instead

  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...