MVP 2022 kratmel Posted March 1, 2019 MVP 2022 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...
sgull Posted March 2, 2019 Report Share Posted March 2, 2019 Hi Kratmel. Could you use a small UPS on the PLC? If it is only vital for 15 mins than a small unit would do. You can use a digital input to detect if the plant power has gone off and start your timer. Regards Denis Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted March 2, 2019 MVP 2022 Report Share Posted March 2, 2019 Hi Kratmel, Denis's idea is good, but I am also a little confused on what is being wanted. If the need is simply to measure the length of time the power has been off, and not actually do anything else, you could easily implement this using UTC. Store the current RTC to UTC reading every second. Have a power up bit that activates a subroutine that compares the current UTC to your stored one, does maths that then displays results on a screen that tells you both the delay time and also flash an alert if it is over 15 minutes. Or have a routine that always compares current UTC to the stored one, and if it goes over, or gets close etc does the same alert system. But without things being dependent on a power-up. cheers, Aus 1 Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted March 2, 2019 Author MVP 2022 Report Share Posted March 2, 2019 Chemical processes with which I am not very familiar use powerful power supplies. Each of them is now controlled by the Samba installed in a sealed box. Everything that is programmed in it is a mode of operation that varies according to time. The customer's request is to ensure that even a power cut is recorded as an alarm, but only when it exceeds 15 minutes. This is the case in this production that the power supply network often disappears due to weather conditions. However, the automation returns power and this power return process can last longer than the processing technology allows (powerfull generator started). The idea of an uninterrupted power supply is good, however, does not meet the customer's technical requirements. It should be kept in mind that turning off the power of the process may be caused by an accidental operator mistake to . I am also surprised by the customers' task - but this problem is the last one that I should solve in this order. Thanks to Ausman, Sgull. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted March 3, 2019 MVP 2022 Report Share Posted March 3, 2019 16 hours ago, kratmel said: The customer's request is to ensure that even a power cut is recorded as an alarm, but only when it exceeds 15 minutes. Then Ausman's suggestion should work just fine. 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.