areeeb1

How to retain value in timer (TIML) on power off

11 posts in this topic

Hello everyone, I am new to omron stuff. I have been given a task to execute a timer with retentive values on power off. I want to retain timer value when plc turn on after shut down. Timer should be start from where it stops on power failure. How to do that could anyone help me out here?

Share this post


Link to post
Share on other sites
Instead of a timer, you could decrease a DM with a 0.1 sec. pulses, and compare that DM with 0.

Share this post


Link to post
Share on other sites
And how to store DM locatiosn? I have CJ1M CPU13. Does this CPU contain DM locations?

Share this post


Link to post
Share on other sites
All CPUs contain data memory (DM). Timers are not retentive through power cycle. You could consider making your own as pfort suggested. Some DM areas are retentive, and so the current value would remain after a power cycle. Instead of a timer, write a decrement on a data register and trigger it from a built-in clock pulse signal. Do a compare to see when it reaches zero so you know when the 'timer' is done.
1 person likes this

Share this post


Link to post
Share on other sites
Yes, I have made a data register with decrement on built-in 1s pulse. But I have made a FB block and write a code in it and check the 'retain' box. Would it retian data on power off or Do I have to save my data in DM locations? and how would I save data in DM location? Could you give me an example?

Share this post


Link to post
Share on other sites
Using the retain box inside a function block will make that address retained through a power off condition. I believe FBs by default use the HR area for retained memory, but that is fine, it will work just like DM. Make sure to one shot the decrement instruction. It sounds like you are on the right track, keep going.
1 person likes this

Share this post


Link to post
Share on other sites
Yes, I've put positive edge detection on 1s pulse bit so it decreases only once on positive pulse..

Share this post


Link to post
Share on other sites
You could simply continuously copy the timer value to a data register, and move it to the timer in the first scan.

Share this post


Link to post
Share on other sites
On 9/16/2015 at 0:05 AM, areeeb1 said:

Yes, I have made a data register with decrement on built-in 1s pulse. But I have made a FB block and write a code in it and check the 'retain' box. Would it retian data on power off or Do I have to save my data in DM locations? and how would I save data in DM location? Could you give me an example?

Hello All, I am new in PLC also. I am facing the same trouble here. could you help me about how to make data register with decrement on built-in 1s pulse? I have no idea how to make this. Thanks for your advice.

Share this post


Link to post
Share on other sites

It's in the PLC instruction manual.

Increment ++/++L

Decrement --/--L

Remember to use a rising edge LD instuction ahead of the Decrement instruction.

Share this post


Link to post
Share on other sites

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