Paul T,
There is a basic flaw in your logic. Your program still is trying to use the Run Requests (B12:4 word) to control the FFU unload. All 12 Run Requests COULD occur in the first 4.5 minutes after the first machine starts (your fill timers are only set for 5 seconds, so this is not a true test of the real situation). After that, your FFU will not be triggered again, even if only one station is running.
I ASSUME that Step 3 takes 4.5 minutes. If so, then setting the Water Fill timers to 5 seconds will falsely allow your FFU trigger to work, but it will not work when you set the timers to the real 4.5 minutes.
Until the Run Command is completely separated from (disassociated with) the Run Requests, you will have problems getting the FFU to unload correctly.
Huh. I thought it was.
I'm using the RUN COMMAND, which is set when the RUN REQUEST goes down, to unload the FIFO.
The RUN REQUEST is really only useful as a one-shot for the FIFO load command. Without it, the FIFO load would trigger every scan as long as the START PB was made. Really, the only thing I use it for is to keep the FIFO load from triggering more than once.
Now, THAT is a problem later on, after the RUN REQUEST goes down, if pressing the START PB will ALWAYS OTE the RUN REQUEST. If the program is state-based, then that isn't an issue. But, the program probably is not state based and in that case, we need yet another IK in the FIFO load rung to make sure it only happens once, and when it should.
And, sure, you could trigger every RUN REQUEST on a single scan. That's ok, it's why we're using the FIFO.
As far as the unload... I think it's OK. If RUN COMMAND is on for the entire FILL cycle, then I think it works.
I have to admit, I need James to clarify what exactly those timers are trying to do. Are they some kind of test case, or what?
If they are set to cover the "real" time that the station is filling, and running, then it should work. Although, I don't like timers for process control - I want something tied to the hardware that tells me what state the hardware is in.
Better would be a flag, set and then cleared in each station, as the station cycled. Shucks, for this you could use one register - N7:something. Load a "1" when the station RUN COMMAND was set; that could be done in the logic stub we're looking at. Then each station subroutine clears that flag when it is done filling, which I would think would be pretty easy to tie to a station fill valve or float switch or whatever it is that tells the station it's full and ready to process!
And it could all still use some exception handling, and it needs to be cleared on powerup, or command, and all that sort of stuff.
But maybe it's getting there!