Compact Programming for timers

The Plc Kid

Member
Join Date
Feb 2009
Location
Macon, Georgia
Posts
3,233
In a rslogix 5000 program i have 160 timers that all need there .pre values set the same at the same time from a control word DINT. It looks like there is no way to do this with the copy instruction and i do not want to do 160 moves if i can help it.

Program has to be in ladder. Any other methods that may work?
 
Two thoughts:

1) Put them in an array and use the FAL instruction. See attached for an example.


2) If they aren't in an array or an array is not practical, then since you are obviously going to have to program the 160 timer instructions anyways its not really a big deal to just slap a MOV in front of the timer.
 
Last edited:
I am looking to do something similar. Except, in my scenario, the presets will not all be the same. Upon condition "A" being true, I need one group of numbers loaded into the presets and upon condition "B" being true, I need an entirely different set of presets loaded.

I have the values that I need set in an array of DINTs. There are 100 timers total, so my array of DINTs is 200 elements long (the first 100 contains the numbers I need for condition "A", next 100 for condition "B".) How would I go about using the FAL instruction to do this? Or is this even possible?

I have played around with it, but have not been able to get it to work. Also, if someone is kind enough to show me how to do this, if possible, please post it as a PDF or JPG as I do not have Logix 5000 at home.
 
Although it should be possible to do this by manipulating the start position and length of the FAL (Logix5 guy), I'd just make two 100-element arrays and trigger the appropriate FAL when needed.

YMMV
 
Although it should be possible to do this by manipulating the start position and length of the FAL (Logix5 guy), I'd just make two 100-element arrays and trigger the appropriate FAL when needed.

I would just use 1 FAL - and in the expression I would add an offset into the array element specification.

e.g.

Timer_Presets[LoadTimers.POS+Offset]

Offset would then need presetting to either 0 (condition A), or 100 (condition B)

2010-10-12_180113.jpg
 
I would just use 1 FAL - and in the expression I would add an offset into the array element specification.

e.g.

Timer_Presets[LoadTimers.POS+Offset]

Offset would then need presetting to either 0 (condition A), or 100 (condition B)

Awesome. That makes perfect sense. Thanks a lot.
 

Similar Topics

I have an Compact Logix L33 communicating with a MT(Metler Toledo) IND131. I need to writ PLC code for dispensing product. I have a hopper that...
Replies
7
Views
1,952
HI I am a beginner Programmer and am trying to set up a simple line speed reference using a rotary encoder in to a high speed counter on a L24ER...
Replies
4
Views
4,676
I got a String from the seriell port: "134r200r2r1r250r" I want to put each number into a different DINT-Tag. I did that by a very long Ladder...
Replies
1
Views
4,156
Hello Everyone, I have a issue with communication between two different PLCs. So here is the facts, The Master PLC is Guard Logix 5069 with IP...
Replies
4
Views
106
What happens if you power up a 1783-MS10T with a Compact Flash card from a 1783-MS06T? Does it work, but with the "extra" ports unconfigured? If...
Replies
0
Views
89
Back
Top Bottom