Welcome to the forum!
BCS's solution will work in some cases but not all.
Assuming you start your timer when the first metal is detected...
Assume detection at 0 seconds, 55 seconds, 65 seconds.
You won't have an alarm, because the three occurrences were not within the last 60 seconds, and the timer/counter reset at 60 seconds. But, if you get a third pulse at 70 seconds, you now have three pulses within 25 seconds, but your counter will only be at two, so no alarm.
It sounds simple, but it's one of those ones that when you think about it just a little bit more, gets complicated
Here's one idea.
Start with two 60-second timers (let's call them Metal_Timer_1 and Metal_Timer_2). When you start the line or complete your metal dumping, reset both timers.
When you see a metal detected pulse, start Metal_Timer_1. Use the Metal_Timer_1.TT bit in parallel with your metal detected signal; this will make it self-reset when it reaches 60 seconds. If Metal_Timer_1 is already in use from a previous pulse (Metal_Timer_1.TT is true) then start Metal_Timer_2 the same way. If Metal_Timer_1 and Metal_Timer_2 are
both in use, and you have a metal detected pulse, then you have your alarm.
The only thing you'll have to watch for is that if you just write all that out sequentially, you'll get an alarm the first time you get a metal pulse - because it will run like this:
Rung 1: Metal Detected. Start Timer 1!
Rung 2: Metal Detected. Timer 1 already running (because we already executed rung 1), so start Timer 2!
Rung 3: Metal Detected. Both timers in use, so Alarm!
The way I would get around this is to have the metal detected input go through a oneshot to an OTL. Let's call the BOOL tag on that OTL "New_Metal_Detection". Then, when you start a timer, unlatch the bit (again, using a oneshot). Use that tag instead of your metal detected input to trigger the timers. So now if Timer 1 is busy, Timer 2 will start, and turn off the New Metal Detection tag, so no alarm. If Timer 1 is not busy, it will start and turn off the tag before Timer 2 gets a chance to look at it.
How does that sound?