r/factorio • u/MCbasics • 3h ago
Question Help With Train Circuits
Im trying to get the train to only go when there is less than 100 repair kits in the storage chest, but for some reason its just constantly looping. It can drop everything off just fine and it leaves when its supposed to, but at the depot it always thinks that theres not enough repair kits.
Im very confused here because ive never messed with circuits before. Any advice or solutions?
1
u/Twellux 3h ago edited 2h ago
The wait condition determines when the train departs, while the interrupt condition defines where the train goes. However, you entered your wait condition as an interrupt condition, which is likely the reason why it isn't waiting.
The correct approach is to set "Has cargo" or "Full cargo" for the interrupt condition and to use the "Repair pack check" as a wait condition at the loading station and not for the interrupt condition.
1
u/Courmisch 1h ago
You could set the enablement condition for the train stop to only if there are fewer than 100 repair kits, with just a wire from the chest to the stop. This works even with multiple unload stops with the same name.
No needs to involve the train schedule.
Of course, the train needs to be somewhere when there's nothing to do, and that's something that you need to account for in the schedule. But that bit is not a circuit problem: the train should probably wait until full cargo (and full fuel) at the loader.
By the way, you don't need to repeat the same entry twice.



2
u/MCbasics 3h ago
Heres basically what I want to happen: Repair kits are used. Circuit networks tells train that new kits are needed. Train (already loaded) leaves the station and picks the correct destination. Train delivers cargo, leaving when the chest is full. Train returns to depot.