Page 1 of 1

Combinators on train stations

Posted: Tue Aug 13, 2019 4:47 pm
by Serj_Rot
Hello there, i don't usually ask questions online, i prefer to find them by my own, but this problem takes already too much of my mind free time and i see no end.

How can i program a train station to be open when i have x items in chests and close when i have x + y items?

Ex:
Unloading station, 48 chests = 115.2k iron ore.
I need the station to be open (accept trains) when i have 50k or less iron ores in chests.
BUT!
To not close the station immediately after surpassing 50k. I need to keep it open until it reaches 80k iron ores..
Then closing it until goes under 50k again, and so on.

Hope i made myself understood.
I have, i believe, over 1000 hours on Factorio (from since it was 5$) but never spent this much time into a small problem like this.

Thanks!

Re: Combinators on train stations

Posted: Tue Aug 13, 2019 5:05 pm
by DaveMcW

Re: Combinators on train stations

Posted: Tue Aug 13, 2019 5:19 pm
by dockmeister
Hi,

the steam example is a little bit too much.

1. Connect all your chests with a green or red wire
2. Extend the connection with the same wire to the train station
3. Click on the train station and select - Mode of Operation: Enable/Disable
4. In the circuit definition window, which popped up below, select: Iron Ore < 50K

cheers

Re: Combinators on train stations

Posted: Tue Aug 13, 2019 5:30 pm
by Trebor
Serj_Rot wrote:
Tue Aug 13, 2019 4:47 pm
Hello there, i don't usually ask questions online, i prefer to find them by my own, but this problem takes already too much of my mind free time and i see no end.

How can i program a train station to be open when i have x items in chests and close when i have x + y items?

Ex:
Unloading station, 48 chests = 115.2k iron ore.
I need the station to be open (accept trains) when i have 50k or less iron ores in chests.
BUT!
To not close the station immediately after surpassing 50k. I need to keep it open until it reaches 80k iron ores..
Then closing it until goes under 50k again, and so on.

Hope i made myself understood.
I have, i believe, over 1000 hours on Factorio (from since it was 5$) but never spent this much time into a small problem like this.

Thanks!
(Away from game so can’t test.)

Wire all the chests to a decider combinator set to: ore < 50k output 1P. Wire output to arithmetic combinator set to: P * -30k (50 - 80) output ore. Wire output back to input of decider combinator.