ASF, I did see the copy all default values option but it remains greyed-out and unchecked when the timer presets are altered. As the local tags show the correct (non zero) value for all timer presets in the offline version, I'd interpret those values as being the defaults.
I just tried an offline edit to one of the previous existing timer presets but the instances don't show the change, although a logical edit is reflected in all instances.
For a timer, the default value is the value set in the definition. That is, if you:
- Have a local AOI parameter called "My_AOI_Timer"
- Within the AOI, put a TON/TOF/RTO on a rung
- Assign "My_AOI_Timer" to that TON/TOF/RTO
- Set a preset in that TON/TOF/RTO instruction
...then the preset you specified is the default for that AOI. Any new instances of that AOI you create
after you adjust that preset will be created with the same timer preset as your definition. However, any instances that already existed will not be updated. This is good design practice of course - if you have 200 instances already in your code, and each of them has had their timer preset adjusted according to their application, having them all of a sudden set back to default just because you changed the definition would be a terrible outcome! But, at the same time, sometimes you
do want all of your 200 instances to be updated with the new "default" value. That's where that checkbox comes in handy.
The reason it's greyed out is because you made the changes in the AOI's ladder logic, not in the parameter editor. Instead of changing the timer preset in the TON instruction, open the AOI definition dialog box and select the Local Tags tab. Find your timer in the list of local tags, and click the little arrow to expand out the data structure. The first item in the list is My_AOI_Timer.PRE, and you'll see its default value in the third column. You'll notice that it matches the timer preset in your AOI definition ladder logic. Change the default value in the Local Tags editor, and you'll see the "copy all default values" box become available. Check the box and hit apply, and now whatever value you put in that "default" column will be copied to all existing instances of your AOI's. You'll also note that the timer preset in your
definition logic will update with the new preset, and all new instances that you create from this point on will likewise get the new default value.
Taking a step back into why this happened to start with - what I suspect has happened is that you've created the new timer in your AOI definition ladder logic, and then applied the change with a timer preset of zero. At that instant, the timer was created in all your existing instances, with a preset of zero. You then updated the preset in your definition, but as I have described above, this change will not push through to your existing instances unless you specifically request it to do so.
I didn't know that fixed values could be edited in the instances; I'll have a look at that tomorrow- thanks.
"Fixed values" is not really an AB term, but you are correct in that
some values cannot be edited in the instances. Generally, this is limited to constant operands - e.g. if you have a math instruction that's multiplying Tag_A by 2 and storing the result in Tag_B. You can't change the value of the 2, in the same way that you can't change which tag you are storing the result of Tag_A*2 in - because that's a structural change to the logic. But a timer preset you can vary at any time. A general rule of thumb - if you can change a parameter value outside an AOI online without doing an online edit, you can do it online inside an AOI
instance (but not the definition). You can change a timer preset online outside an AOI just by typing a new one in - you don't have to edit the rung, change the value, and accept edit - so you can likewise change a timer preset within an AOI instance online. After all, an AOI instance works just the same as any other piece of code, except that you can't do online edits to it.