Logix 5000 Timer Preset

Winklehoffen

Member
Join Date
Jun 2009
Location
Auckland
Posts
46
So I'm just starting out with logix 5000 and am on to my second project.

In Logix 500, you can assign an integer file to a timer preset so that multiple timers can have the same preset and they can all be changed quickly and at the same time by adjusting the integer value.

In logix 5000 I can't assign a DINT tag to a timer preset so I have to MOV the DINT to the timer.pre. Is there a way of doing this easily so I don't have to have a MOV for each timer? I've got about 30 different timers all using the same preset and it would be nice if I could do it without 30 MOVs.

Just as I typed that I thought of using an add-on instruction which would work brilliantly in this case because the logic for each timer is the same. But how would you go about this if you wanted the same preset for a bunch of timers with different conditions?
 
In Logix 500, you can assign an integer file to a timer preset so that multiple timers can have the same preset and they can all be changed quickly and at the same time by adjusting the integer value.

I don't believe this is true. I think you have to move a common integer value into the timer's presets in RSLogix 500 also.
 
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.

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.

You can create an alias to a timer preset, however each timer preset will have its own alias. You can also create an alias to each timer and still access the elements as .PRE and .DN, etc, allowing you to place them all in an array but still give each one a unique name via the alias.

If you cannot put all 30 timers in an array then you will require 30 MOV instructions to set the presets. 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.

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, .TT, .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. Since the preset is a specific word of memory you can't arbitrarily re-assign the preset as a new location in memory. You can make a pointer to it (as you would do in FAL) or you can give it a unique alias.

I hope that helps.
 
Last edited:
Thanks guys, you are of course correct. I don't know what I was thinking about with the logix 500 presets. It was a bit of a rough night last night. 🍺

Thanks for the suggestions Alaric. I know it doesn't take long to program a bunch of MOV instructions but I like my programming to be neat and uncluttered. Throwing MOV instructions all over the place hurts my tender sensibilities and brings my OCD to the fore;).
 
I know it doesn't take long to program a bunch of MOV instructions but I like my programming to be neat and uncluttered. Throwing MOV instructions all over the place hurts my tender sensibilities and brings my OCD to the fore;).

If that really does annoy you, do what I do when I have a great number of assignments, or calculations... Use a Structured Text routine.

They make things a whole lot cleaner for multiple MOVes and such. One place I use them often is just loading up my sequencer status bits and values. It beats 20 pages of XIC OTE.
 

Similar Topics

If any of you wizards can help in this I would be ever more grateful. We have this device that generates 9 second pulses coming into a DI module...
Replies
31
Views
3,605
Processor: 1769-L30ER; Logix 5000: v32.02 I have an AOI that's been used in previous applications without issue, and have added a TON...
Replies
6
Views
2,759
Hi there, I am accustomed to working with Logix 500 but have a program modification I need to do on a CompactLogix.... I created a timer...no...
Replies
7
Views
2,452
Good Afternoon , I have an older Panelview Plus and do not have the application . I'm in the process of re-doing the HMI application from...
Replies
11
Views
3,896
I have 47 timers that I want to change the .PRE value in with one instruction but different values from a saved "SavedTimers" INT[46] array file...
Replies
7
Views
1,852
Back
Top Bottom