This is a very similar question to https://answers.flexsim.com/questions/88085/alternate-destination-on-conveyor-full-condition.html but the difference for me is I need to check these conditions right before the divert and not at a common decision point like the model shows in the link.
I have attached a model here and trying to build this logic, in the real model I have 32 divert conveyors which are further extended to do some process. So the slug can build and block the photo-eye when the box is at the main decision point on main conveyor but by the time the box reaches the divert, the PE can be uncovered and I need to divert it and vice versa.
In real life this is controlled by PE sending message to PLC and PLC basically controls the shoe sorter for diverts.
Any help is much appreciated. I thought of stopping the current divert conveyor's input port or DP's input port is PE is blocked but that doesn't seem to work.