norcotek Posted January 21, 2016 Report Share Posted January 21, 2016 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, Quote Link to comment Share on other sites More sharing options...
Alexander Posted January 22, 2016 Report Share Posted January 22, 2016 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted January 22, 2016 MVP 2022 Report Share Posted January 22, 2016 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. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted January 22, 2016 MVP 2022 Report Share Posted January 22, 2016 I inadvertently answered this question for VisiLogic rather than UniLogic, but the same functionality exists. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.