Part per minute counter

jtashaffer

Member
Join Date
Aug 2009
Location
KY
Posts
415
What is the best way to program a parts per minute counter. The controller is a 1769-l30ER. It will be counting molds per minute. I was thinking of using a timer set to 60000 and a counter to count the molds.
 
I will have to use a sensor or limit switch to count the molds. But is there a way to count the molds per minute based on the line speed controlled by a VFD.
 
What is the best way to program a parts per minute counter.
This is somewhat dependent on how many parts per minute we're talking. Can you clarify?

I was thinking of using a timer set to 60000 and a counter to count the molds.
This would give you number of molds counted in the last minute. That may be useful, but it would only update once every minute.

Another way would be to have a free running timer which stores the ACC value and promptly resets as your sensor counts a mold. Dividing 60s by that timer ACC value would give you the instantaneous parts/minute rate. Running that rate through some first order low pass filter logic would give you a more stable value.
 
Are you doing this to figure out how fast the process is running or are you looking for the actual number of units in any given minute? For me it would be two different routines.
 
molds per minute is any where from 9 to 20. FireJo I guess in away it would be both. It is mainly to count how many molds per minute. That will also tell me how fast it is moving in molds per minute.
 
Last edited:
I would do like RonJohn said & monitor the time between the molds, some simple math would then give you the PPM
 
Trap that your accumulated value is Greater than Zero before you Divide 60000 by it.
(learned that one the hard way)
 
Well the way I’d do it is probably pretty crude by other’s standards but then again I’m not a PLC programmer by trade.
I’d use a timer and two counters (maybe more depending on how many molds you’re going to count).
The first part is simply counting how many molds per minute I.E. speed. When the system is running there is a timer set for 60 seconds and a counter counting the molds. When the timer hits 60 seconds move the counter’s accumulator to a register, reset the counter and timer. With this every 60 seconds you get a fresh PPM (Parts Per Minute). If you want to get real ***y you can (figure out a way to) move each count, up to a certain number, to a different register so you can see if the PPM is consistent per minute. I’m sure I could figure out how to do it but with stuff like that I have to teach myself as I go. Keep in mind that with the first part you have to move the data before you reset the timer and counter. I prefer to use an EQU function so that when the timer’s accumulator reaches 60 seconds it moves the data and then resets everything (just my preference. I don’t have a great argument as to if this is better other than my experience).
The next step would be to have a second counter that keeps a running count. It is also triggered when the timer reaches 60 seconds but it’s not reset afterwards. However at some point in time you’ll have to reset it as it has an upper limit. When I’ve needed to count events (in my case in a SLC or Micro) when the first counter (counting the total, not the PPM) reaches its max and goes done, I use the done bit to count up on another counter and reset the first total parts counter. I’ve done this to count completed message instructions that are running full tilt over days so I’ve strung that out to upwards of four and five counters. So that’s clear as mud right? Let me show an example, let’s say I’m using a MicroLogix 1100 to count something and I’ll need to count more than 50,000,000. Because the 1100’s counters max out at 32767 I’ll need two counters, C5:0 and C5:1. When C5:0 reaches 32,767 and goes done, I use the done bit (along with a one shot) to count up by 1 on C5:1 and then reset C5:0. With this, C5:1 represents the number of times C5:0 has reached 32,767. To figure out the total, multiply C5:1 by 32,767 and add C5:0’s accumulated value. So if C5:1 is at 2,000 and C5:0 is at 24,800, then: 2,000*32,767 = 65,534,000+24,800 = 65,558,800.
As I said before, there are probably better ways to do this but I’ve had a lot of luck with this method over the years and it’s pretty simple to setup.
 

Similar Topics

Hello, I am still new to PLC programming and I just got this job two year out of school so I don’t remember much. I was given a task were I have...
Replies
1
Views
185
Good morning crew! Ok my logic works but I am missing something. When the start button is pushed it should like the red light for 4sec then shut...
Replies
13
Views
448
Hello: I need to buy one end-cap which was not provided by an ex-Rockwell distributor here. Since I do not know the part number I can't find it...
Replies
24
Views
6,535
For a thermoset molder I am looking for a vision system that can monitor part removal from a mold. The mold temps can range anywhere from 300 to...
Replies
4
Views
1,668
Long story short, I am creating a display to display an array of Strings from PLC [topic]VarStrA_RPHD.Desc[VarStrB] totally 100 strings...
Replies
1
Views
1,418
Back
Top Bottom