Jump to content

Power up or power failure indicator bit


norcotek

Recommended Posts

Hi, we have a Vision series V120, and we need to detect a power failure or power up condition to take different actions upon power up and based on where the PLC was at the time the power failed.

 

What functions or features does the software support for this type of use case? Are there any examples we can look at on how to handle this in the code?

 

Thank you,

Link to comment
Share on other sites

How do you wish to detect the power failure? Do you have any external devices or inputs that are activated when power fails without notice?

 

Our systems do not have any built in detection for if power fails, once there isn't any power the system shuts down and does not process any code.

Link to comment
Share on other sites

  • MVP 2023

I normally detect and log power off and power on conditions in the software I write. I do this by storing the date and time in an MI vector on every PLC cycle. On power up, I use the SB2 bit to prevent storing the Date and time to the MI vector prior to logging the power off condition. This provides the last date and time stored, which was at power off. Then, I log the power on date and time, also using SB2. From that you can determine anything you need, such as the length of time the PLC was powered off.

 

Regarding where the PLC was in the program loop at the time of power loss, operands retain their value through a power loss if the battery is installed and working. If there are critical intermediate steps, you can keep track of them with operands that will tell you where you are.

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.