atomic_robo Posted March 28, 2018 Report Posted March 28, 2018 Hello, Can you please explain what a retained tag is? I thought it's a tag that retains its value after power loss. But when I created tags with initial values and then turned off the plc, they 'retained' their values even though they weren't configured to be 'retained'. And, how do we change the values in a retained tag? Thank you in advance
IO_Rack Posted March 28, 2018 Report Posted March 28, 2018 4 hours ago, atomic_robo said: Can you please explain what a retained tag is? I thought it's a tag that retains its value after power loss. This is correct. 4 hours ago, atomic_robo said: But when I created tags with initial values and then turned off the plc, they 'retained' their values even though they weren't configured to be 'retained'. I just tested this myself. My values were reset to '0'. How did you write your test values? If you populate the 'Initial Value' field then this value will be written on power up. 4 hours ago, atomic_robo said: And, how do we change the values in a retained tag? There are many ways. It depends on your application. Typically a retained tag will be a variable setting for your application. Example would be a speed setting for a VFD or a temperature setting. Typically they would be written to from an HMI. If the 'Initial Value' field is blank and there is no PLC code writing to this variable then the last setting value will be retained after power loss.
atomic_robo Posted April 1, 2018 Author Report Posted April 1, 2018 That answers my question. Thank you @IO_Rack I was populating the retained tags in the initial value field. Then I noticed when I changed the value, the plc wouldn't take it.
Crossbow Posted April 13, 2018 Report Posted April 13, 2018 The PLC will take it just fine. Initial values are only sent at power-up. It's not preventing you from changing it, unless you also check the 'Constant' box. And if you change the value and it's set to retain, that value is held instead of the initial value. Initial value would only be used on a retained variable if you force it to upon download or when the retained values are lost, such as dead battery.
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