AB MicroLogix Timers

bernie_carlton

Lifetime Supporting Member + Moderator
Join Date
Apr 2002
Location
Yakima, Washington
Posts
6,412
Can a timer which has been set up in the data table be operated merely by using its ENable bit as an output (OTE) instruction? The software accepts this but I haven't tried it on an actual CPU (where I suspect it will generate a runtime error).

As to the obvious question "Why would you want to do that?" I have multiple sections of the machine which are identical except for data which I am keeping in seperate data tables. I have a common processing file set up and I call it multiple times with the number of the controlling data table set. Within the file I use Indirect addressing. This works fine except for the rung actuating the timers. The timer box (TON) won't accept the indirect address. So I'm actually implementing these rungs outside of the common file. I am able to test the DoNe bits with indirect addressing.

It would be really convenient if I could activate the timers by turning on the ENable bit but I suspect that it's read-only, though the documentation doesn't specifically say so.
 
multiplex

I don't know if this is what you're looking for but, could you load the three timer elements (PRE,ACC, CTL) from a file into a single timer within your routine? Once the values are loaded operate the timer as you would a normal one, then, when done with it store out the current values back to the 'timer status' file of your choosing. I suppose you may be able to use something like:

COP T4:[INDEX] T10:0 3
Insert logic to operate timer T10:0 and check its status here
COP T10:0 T4:[INDEX] 3

Use the controlling data set to derive an index into the timer file to select the correct [INDEX] value for the current iteration.

This technique was used (without the index feature) on an old 1774 PLC we had which had a limited number of timers/counters .

Just a thought.
 
Thanks for the tip. Right now the necessity of operating the timers seperately is just a nuisance. But in trying to ensure that the code is the same for all the identical sections this may come in handy.

Actually, looking through the effect on execution time that indirect references have, I may go back to individual files for each section.
 
Last edited:
load timer.pre

you can MOV a value into the timer PRE register.
I have used that on several occasions.
You could use inoffsets to adjust the pointer for the source of the MOV, and use a sinlge timer as the destination.
 
Just in case anybody wonders, I chickened out. The added time effect, above the normal logic solution, of all the indirect instructions (approximately 33 indirect references in the file which would have been called 12 times per scan) would have been 50 ms per scan. So I went back to standard code. Oh well, maybe some other time. I guess I was trying to emulate Siemens Function Blocks. That would have been handy, but this is AB.
 

Similar Topics

My project uses a MicroLogix 1400. First time I’ve used the 1400; used the 1500 for a few projects. I have 1.5 years’ experience programming...
Replies
11
Views
6,801
I was wondering how I might go about using my sequencer in such a way that I can set a time at each step or positon in the sequence. What will be...
Replies
1
Views
1,568
Hi, I want to reset 20 timers simultaneouly in Micrologix 1500. Is it possible to do it with one command instead of using 20 CLR or MOV commands...
Replies
1
Views
4,223
G
Hello all: I am taking a Micrologix 1000 programming class, and having the time of my life. I would appreciate some suggestions with the...
Replies
3
Views
7,928
I'm using a SLC typed write from the ControlLogix5572 to the MicroLogix 1400, with path: 2, (MicroLogix IP). The ControlLogix equipment has a...
Replies
0
Views
31
Back
Top Bottom