shoelesscraig
Member
Ok, so here's one that's been giving me a headache all day. I'm one of those guys that thinks about stuff until I get it...even off the clock.
I've got a SLC 5/03 running a production floor at our plant. I've got a limit switch counting packages as they pass by. My goal is to do the following:
I want to keep track of the best production hour. That is, the maximum packages per hour that the operators were able to run.
Sounds simple. Right? Ok, this part I DO know how to do. This part is easy. I'm counting parts and at the end of the hour I see if that number is greater than the previous record...if so, I replace it with the new record and move on. Got it.
Now, for my dilemma....
I'm looking once an hour at the number. For example, 1pm, 2pm, 3pm, etc. Well thats fine. But I want to know the most packages that they have been able to run in 1 hour, regardless of when that hour started. So lets say that between 1pm and 2pm they ran 500 packages, and between 2pm and 3pm they ran 550 packages. But..., what if they actually ran 700 packages between 1:30 and 2:30? Right now, my program just thinks that 550 is the best hour that was ran, when in fact, they actually ran 700 packages in a 1 hour period???
I've have thought all day about it, but I don't know how to make it work. Any thoughts or suggestions are welcome. I'm sure that someone has had to do this before. I'm probably overlooking something simple, but for the life of me I can't figure out what.
I've got a SLC 5/03 running a production floor at our plant. I've got a limit switch counting packages as they pass by. My goal is to do the following:
I want to keep track of the best production hour. That is, the maximum packages per hour that the operators were able to run.
Sounds simple. Right? Ok, this part I DO know how to do. This part is easy. I'm counting parts and at the end of the hour I see if that number is greater than the previous record...if so, I replace it with the new record and move on. Got it.
Now, for my dilemma....
I'm looking once an hour at the number. For example, 1pm, 2pm, 3pm, etc. Well thats fine. But I want to know the most packages that they have been able to run in 1 hour, regardless of when that hour started. So lets say that between 1pm and 2pm they ran 500 packages, and between 2pm and 3pm they ran 550 packages. But..., what if they actually ran 700 packages between 1:30 and 2:30? Right now, my program just thinks that 550 is the best hour that was ran, when in fact, they actually ran 700 packages in a 1 hour period???
I've have thought all day about it, but I don't know how to make it work. Any thoughts or suggestions are welcome. I'm sure that someone has had to do this before. I'm probably overlooking something simple, but for the life of me I can't figure out what.