Jump to content

Need to count seconds with power off. Is it possible?


Recommended Posts

Posted
I want to be able to count seconds even when the PLC is off or powered down. Something that will work on the battery. Is there a command or instruction to do that? My concept is to count seconds and then divide them up into 3 shifts of production. At 10:30pm, 6:30am and 2:30pm every day I want a command to reset an output. Since daylight savings is an issue and we don't set our plc clocks regular I want a consistent way and an accurate way to reset an ouput at those time intervals. At the moment I'm using an SM412 and PINC a data register with the correct second count for the time of day. Example: 10:30pm will have a 0 in the data register, at 11:30pm it will have 3600 in my data register that is counting seconds. Any help would be appreciated. Thanks.

Posted (edited)
I have to disappoint you. It is impossible to count anything or is impossible to control the output when PLC does not work. Edited by Inntele
Posted (edited)
If a PLC is equipped with real time clock, store actual date/time permanently in holding registers. In first scan calculate the difference between actual date/time and stored values. This difference is the PLC Off time. Edited by Sergei Troizky
Posted
Sergei's response is your only real option. When the PLC is powered off, it's not running its program, so there is no way to write code to do this. Every scan save the clock to rententive addresses (like with DATERD), and then at power-up, subtract the current readings from the last saved ones. Of course you'll need to do some fancy calculations if it was powered down for hours or days to get it right...

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