marcadams Posted February 22, 2010 Report Posted February 22, 2010 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.
Inntele Posted February 22, 2010 Report Posted February 22, 2010 (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 February 22, 2010 by Inntele
Sergei Troizky Posted February 22, 2010 Report Posted February 22, 2010 (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 February 23, 2010 by Sergei Troizky
Crossbow Posted February 23, 2010 Report Posted February 23, 2010 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...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now