AngryRobot

Using an initial value with a retained variable

3 posts in this topic

If I set a variable as retained, but then also set the initial value, does it re-initialize the variable anytime the PLC loses power, or only on a program change?

Share this post


Link to post
Share on other sites

If a variable is both retained and has initial value, the retained value is maintained unless battery dies, or unless the 'clear variables with retain attribute' check box is selected on the transfer to controller screen.

1 person likes this

Share this post


Link to post
Share on other sites

Thank you!  That is what I assumed, but I wanted to verify.

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