The first of your signals outputs "E" instead of "Red", but "E" is never used by the combinators. Am I right in assuming that you changed the output only in order to discard "Red" from that rail signal?quyxkh wrote: ↑Tue Oct 16, 2018 10:45 pmYep. You have to keep the train's braking point from reaching the switch exits before they're set up. It's easy-ish to do reliably, set up N+1 rail signals 7 meters apart, so for your 1-3 trains do five to count up to four, then one more 3+ meters farther along for braking-point control. Greenwire all the signals together, set the N entry signals to send C on red and the next one to send L on red, B on yellow. Set the farthest one, the braking-point-control signal, to close if B>C, so it'll close if a train has reserved the LB signal but hasn't yet reached any of the C signals.
I need the value of C because I want to set the signals after the switch according to this value. There is some way between the control signals and the switch, but we have the memory cell to store that value until the train has passed the switch. More accurately, it keeps the value until another trains starts to pass through your signal chain.quyxkh wrote: ↑Tue Oct 16, 2018 10:45 pmTo read the train length, you want the C signal value when the L signal lights, so run a pulse converter on L and feed everything into a memory cell on L=1, this one's setup for up to 6 carriages.
The memory cell readout's the accumulator on the right, feed that to your switch exits at least twice the braking distance you set ahead of the control signal, 1-1 nuc trains delivering nuclear fuel accelerate really really fast, so for this one that sets an at-most-46 meter braking distance on release you want the switch exits at least 46 rail segments farther along.
So suppose train X had passed the "B > C" signal but train Y entered the signal chain before X had reached the switch -- Y would reset the signal and there is a 50:50 chance that X would go the wrong way, potentially even blocking a station for Y when it would have picked the other path if left undisturbed. 46 rail segments -- that's quite some way! Your long row of signals has about 25 segments, so I should set the first signal (the one where "Red" is turned to "E") about 70 segments apart from the switch, if I get you right. In this case, I have two blocks (each fitting a 1-2 train) left in front of the signal chain. Add to this one second the next train has to wait at the train stop (worst case -- the train just stops; there is more time if supplies are unloaded there), that is still not very much.
Train X should have enough time to reach the switch before Y interferes if I replaced the normal signals in your signal chain (excluding the "B > C" signal) with chain signals and made sure there is no other signal between "B > C" and the switch. The only problem I've now got is the lousy layout of my rails! The signal chain would have to cover some curves in the track, so I probably can't place the signals correctly for wagon counting. Putting it closer to the switch is bad because of the super fast trains, putting it closer to the train stop has other disadvantages. Guess I'll have to give it some thought again.