MVP 2021 kratmel Posted March 1, 2019 MVP 2021 Report Share Posted March 1, 2019 I'm faced with a task that I can not implement yet. We have a chemical process that is controlled by a PLC (Samba). It lasts more than 24 hours. If the power fails, then it's possible to continue it normally only for 15 minutes without energy. After a switch-off period of more than 15 minutes, the process must be interrupted. It is clear that I need to copy the clock values to the variable every minute, and then, after re-switching on the power, compare the time passed with the value of 15 minutes. The question is how to calculate the shutdown duration, since the real-time clock goes to 00.00 and it is possible that the process can be shut off exactly at 24 hours and no crash will be recorded. I have seen on the forum a way to determine the length if the distance meter is overflowing. If in my case operate time in seconds then may this method work? Of course it is necessary to take into account the change of days in the calendar. Is there an easier way? Quote Link to comment Share on other sites More sharing options...
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.