ML1100 and Counters

bbishop108

Member
Join Date
Mar 2017
Location
Indiana
Posts
86
Ok so I have this project that I will have to count 1 Million cycles on a part. Unfortunately the ML1100 counters max preset is only 32767, by my math I will need a total of 31 counters! The test has to last 6 seconds, then I plan to use the timer done bit to count. While I have been testing using just 2 counters, what I have happening is that when T1 is done counting it is also allowing T2 to count at that same time. What needs to happen is when T1 finishes its count, T2 should not count until the next cycle complete.

Unless there is a better way to do this 1 Mil test and keep count of cycles complete than with 31 counters, I'm not sure of a good way to accomplish this with out that many counters. I will need a way to separate the counting between one counter being done and the next not counting until the following cycle complete. Any help would be greatly appreciated! Thanks
 
You need to count 1 million cycles in 6 seconds? That may be faster than the PLC scan time depending on the size of your program.
Are you using the high speed input?
 
Last edited:
Have your first counter count up to 32000.
When the .ACC is 32000, have your program increment the second counter and reset the first.
Repeat until the second counter .ACC is 31 and the first counter is 8000.
(I hope my calculations are right)
 
Use the Long Integer data type for your counters, and don't use the counter instructions, use a oneshot with ADD to increment them. If you must perform math on the contents of "L" registers, you may find you have to move them to floating point registers first, but do not try to count whole numbers with floats.

I don't have a clear understanding of your goal so I will stop there for now.
 
You only need two counters both going to 1,000 (1,000 times 1,000 equals 1,000,000).


Count.jpg
[/URL][/IMG]
 
Use the Long Integer data type for your counters, and don't use the counter instructions, use a oneshot with ADD to increment them. If you must perform math on the contents of "L" registers, you may find you have to move them to floating point registers first, but do not try to count whole numbers with floats.

I don't have a clear understanding of your goal so I will stop there for now.
+1 to this method
 
Thanks for all this info, after explaining all this to my boss he told me to get a CompactLogix. So it looks like I will be using the L24ER, so now I only need one counter and it more than has the capability to count to 1 Million!!! Thanks again as I was struggling to come up with a solution for the counting on the ML1100!!!
 
You only need two counters both going to 1,000 (1,000 times 1,000 equals 1,000,000).


Count.jpg
[/URL][/IMG]

The one shots preceding the counters are unnecessary. Seeing that drives me nuts, no offense.

From the RSL500 instruction help:

This output instruction counts up for each false-to-true transition of conditions preceding it in the rung and produces an output when the accumulated value reaches the preset value. Rung transitions might be triggered by a limit switch or by parts traveling past a detector.
 
Thanks for all this info, after explaining all this to my boss he told me to get a CompactLogix. So it looks like I will be using the L24ER, so now I only need one counter and it more than has the capability to count to 1 Million!!! Thanks again as I was struggling to come up with a solution for the counting on the ML1100!!!

I dont understand. They gave you some simple solutions using a ML1100...
 
Nah, if the boss is willing to upgrade, go ahead and get it. Always use up all the money you have, otherwise, the upper management will notice you are not spending your budget 100% and will take some away. Spend a little higher than your budget and they will slowly add. Hehehe :ROFLMAO:
 
The one shots preceding the counters are unnecessary. Seeing that drives me nuts, no offense.

From the RSL500 instruction help:

This output instruction counts up for each false-to-true transition of conditions preceding it in the rung and produces an output when the accumulated value reaches the preset value. Rung transitions might be triggered by a limit switch or by parts traveling past a detector.

To be fair, the one shot I put in with the counter is really from habit. When I use the "ADD" function is when it comes in handy. That said, being a habit has kept me out of trouble a few times.
 

Similar Topics

I'm looking to implement a low-cost, efficient method of communicating some integer values to an R30iB robot from a Rockwell 1100 PLC. I am not...
Replies
8
Views
1,712
Hello all, I am trying to setup my MicroLogix 1100 as a modbus RTU master for a modbus network containing multiple modbus RTU slaves. I currently...
Replies
7
Views
3,893
We have a machine that keeps losing its program at random intervals; sometimes 2x-3x in a shift, sometimes will go over 1wk without issue. I had a...
Replies
9
Views
2,894
Just asking for clarification here, but from my research all I need is a 500 ohm resistor across the AI and the common? Heres my schematic. I...
Replies
5
Views
2,546
I have a CLX L61 and I'm trying to read from and write to a Micrologix 1100. I'm attempting to read 200 REAL elements but I'm receiving an error...
Replies
2
Views
1,449
Back
Top Bottom