AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Rslogix using tag as timer preset9/28/2023 The first item in the list is My_AOI_Timer.PRE, and you'll see its default value in the third column. Find your timer in the list of local tags, and click the little arrow to expand out the data structure. Instead of changing the timer preset in the TON instruction, open the AOI definition dialog box and select the Local Tags tab. The reason it's greyed out is because you made the changes in the AOI's ladder logic, not in the parameter editor. That's where that checkbox comes in handy. 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. However, any instances that already existed will not be updated. Any new instances of that AOI you create after you adjust that preset will be created with the same timer preset as your definition. then the preset you specified is the default for that AOI. Set a preset in that TON/TOF/RTO instruction Assign "My_AOI_Timer" to that TON/TOF/RTO Within the AOI, put a TON/TOF/RTO on a rung Have a local AOI parameter called "My_AOI_Timer" 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.įor a timer, the default value is the value set in the definition. 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. If you perform the test above, that should confirm things one way or the other.įor what it's worth, I've never seen a download cause any such symptoms, but I've been caught out by the "copy default values" trick a few times!ĪSF, I did see the copy all default values option but it remains greyed-out and unchecked when the timer presets are altered. So if your issue is as you described it, this may be unrelated - but it's plausible that you edited an AOI and downloaded it, then noticed the issue, and mistakenly thought the issue occurred when you downloaded, not when you made the edit. This would occur not when you downloaded, but when you clicked "OK" on the AOI definition editor. If the timer preset in your AOI instance has a default value of zero, and you updated the AOI with this option selected, all instances would be set to zero. When you update an AOI for which there are existing instances, there is an option to "copy all default values of parameters and local tags whose values were modified to all tags of this instruction type". You can make a pointer to it (as you would do in FAL) or you can give it a unique alias.If you change the timer preset of one of your instances online, save the program, and download again, does it retain its preset? Since the preset is a specific word of memory you can't arbitrarily re-assign the preset as a new location in memory. EN bits and a system time reference stamp are stored in word 1, the PRE is the second word, the ACC is the third word. Keep in mind that a timer is not a device, it is a computer instruction that operates on a defined location in memory, in this case, it operates on three consecutive 32 bit words of memory.DN. But don't despair, 30 rungs can be programmed in fewer man hours than has been invested in this thread so far, and it will execute just as fast as any other method, because when you get down to it, you still have to store something in 30 different memory locations. If you cannot put all 30 timers in an array then you will require 30 MOV instructions to set the presets. DN, etc, allowing you to place them all in an array but still give each one a unique name via the alias. You can also create an alias to each timer and still access the elements as. You can create an alias to a timer preset, however each timer preset will have its own alias. However, to answer your question, if you place the thirty timers in an array then you can use the FAL instruction to set all 30 presets with a value from a single DINT or an array of DINTs. Bernie is correct, not only is that not the case, by you cannot even enter the letter N into the preset field in RSLogix 500.
0 Comments
Read More
Leave a Reply. |