OkiePC
Lifetime Supporting Member
This is a job for good old fashioned trial and error.
Since the PLC cannot know or control the ball speed, it can't calculate an expectation. I would expect that a typical ball passing through the beam is going to be much less than 500ms (where I would start the trial).
A really good cheater might be able to foul and hop out of the way almost as fast, so it is unlikely you wil ever get it perfect.
Set up your logic and pitch the ball at the slowest potential legitimate speed. Trap the timer accumulator in your logic to measure that duration and set your preset a little below that.
Repeat a few times and adjust until it is as good as you can get it. Too low, and you will false trigger on slow balls, Too high and you will fail to detect really nimble cheaters...
Since the PLC cannot know or control the ball speed, it can't calculate an expectation. I would expect that a typical ball passing through the beam is going to be much less than 500ms (where I would start the trial).
A really good cheater might be able to foul and hop out of the way almost as fast, so it is unlikely you wil ever get it perfect.
Set up your logic and pitch the ball at the slowest potential legitimate speed. Trap the timer accumulator in your logic to measure that duration and set your preset a little below that.
Repeat a few times and adjust until it is as good as you can get it. Too low, and you will false trigger on slow balls, Too high and you will fail to detect really nimble cheaters...