I think what you want is a FIFO:
1) When a product hits the infeed, you calculate the time in the future by which it should be out of the heater, and load (FFL) that onto the FIFO.
2) Wnen a product hits the outfeed, you unload (FFU) the oldest time on the FIFO.
3) at every other scan, you compare the current time to the time of the oldest time on the FIFO: if the current time is equal to that oldest time then the oldest bottle has been in too long, and the heater should be shut off.
I assume there will be operator intervention after that.
The time could be the second of day i.e. get current hour, minute, second from the Real-Time Clock (RTC), and calculate [second_of_minute + 60 * (minute_of_hour + 60 * hour_of_day)] => second_of_day*. Add 5s to get the future time by which the bottle should be out; if that future time is greater than 84,399s, subtract 86,400 (seconds per day); that is what gets loaded onto the FIFO.
Caveats
* Can FFL/FFU work with 32-bit Longs? If not then it may require two FIFOs working in parallel, or loading and unloading two words at a time (messy) Or you could create a circular buffer and implement a FIFO by keeping track of two pointers: one where the next future time will be added; one where the oldest future time is; if they are the same then there are no bottles under the heater.
Initialization will be a mess; you may need to have a button the operator presses declaring that the heater is empty and that resets everything.
This may not work if you are using MicroLogix 1100 as the clock only updates every 2s, then you would have to fiddle with the free-running clock (10kHz counter; s:4 and/or s:35, IIRC).