James,
I revised your last FIFO SAMPLE program. I only changed the necessary things to make the FFU work correctly (unload based on machine state instead of Start Requests).
There are a lot of relays, bits, and timers that can now be deleted, but I left those in so you would recognize it as the same program!
EDIT: The File 3 Station 1 rungs got cut out of the PDF file, so I have resaved it.
That was the problem in a nutshell: the Water Fill Timers T15:1 to T15:12 DID NOT control when the FIFO was unloaded. Instead they only controlled when the machine O:5 Run outputs were energized.
OK... Lancie, I still don't see what's wrong with the second program I posted. (Although... as I think about it, maybe I missed an XIC in front of the FILL ACTIVE flag, duh! Keeo reading, LOL.)
The intent is:
START PB loads the FIFO.
When there are no FILL ACTIVE flags set, the FIFO is unloaded. This is trivial, and I thought it was what we wanted. If no FILL ACTIVE flags are set, nobody is using water. Now, with the 12 station and 36 station machines together, more logic is needed but for just one machine the FILL ACTIVE flag is fine.
RUN COMMAND and FILL ACTIVE are set on the next scan after the FIFO is unloaded. When one of the FILL ACTIVE flags is set, it locks out the FIFO unload. Eventually, the fill timer times out, FILL ACTIVE clears, and the FIFO is unloaded again.
RUN COMMAND is high until the station cycle is done; at that point, the START PB is active again and that station can again load the FIFO.
So, if in fact you put the time required to fill, and then the time after that required to complete the cycle, into James' timers it will work. The START PB will load the FIFO; when no FILL ACTIVE flags are set the FIFO will unload; when the station RUN COMMAND goes down, the station PB will again be active and pressing it will load the FIFO to run that station again.
Lather, rinse, repeat.
The whole point to a FIFO is to capture a series of events at one time, and act on those events at a later time... in the same order that they occurred. I am pretty sure that the second mod I made to James' program is doing that.
NOTE: I'm home today, not at work... so I can't see the program since I didn't PDF it. FILL ACTIVE is supposed to be ON while the fill timers are running, and OFF afterwards. If I forgot to put --|/|-- (Tmr DN) in front of the FILL ACTIVE coil, then duh! LOL. Yeah, that would not work. The whole point is that the FILL ACTIVE flags are set while James' fill timers are running, and OFF when they time out. Given that, his logic in PRG 5 is fine with the FIFO unload at the end and will work.
This stuff with N7:0, ONS bits, and one rung with the FIFO load is just plain silly. Load the FIFO with the station number when station START PB is pressed; unload it when no FILL ACTIVE flag is set. The WATER FILL timers DO control that unload if the WATER FILL timers are set to 4.5 minutes or whatever it really takes. Granted, it would be better to use the fill valve state rather than a timer to control that, but the FIFO logic is fine either way.
Well, everybody have a good Labor Day! I'm out of town for the weekend, I'll check in when I get back.
GL James, take a look at what I wrote and let us know if it helps. I think it should. If I missed the --|/|-- in front of FILL ACTIVE, my apologies to you and everybody - yeah, that would confuse things. Eh, I had to get back to my own work!
Paul T