Combinators: Unloading off train

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Ralf71
Manual Inserter
Manual Inserter
Posts: 1
Joined: Fri Jan 05, 2018 6:10 pm
Contact:

Combinators: Unloading off train

Post by Ralf71 »

Hello,

I would like to have 3 or 4 parallel stations (with the same name) to unload trains into the bot network of my base.
At these stations different trains stop: iron and copper plates, green boards. I want to unload the current train only if there is not enough (1k?) in the chests (otherwise the less demanded resource fills up my chests)

So I need to read the content of the train (found that) and read the content of all chest (found that too), but now I need the combination for "if number of items in chest of the type of current train < a number then do some unload".

How do I compare the chest quantity of the item in the train?

Any idea? I hope you can understand what I mean to ask, if not I will try to find other words to ask...

pleegwat
Filter Inserter
Filter Inserter
Posts: 258
Joined: Fri May 19, 2017 7:31 pm
Contact:

Re: Combinators: Unloading off train

Post by pleegwat »

Multiply the amount in the base by -1, put it on the red wire. Read the train contents on the green wire. Attach both of them to a filter inserter in set filter mode.

Serenity
Smart Inserter
Smart Inserter
Posts: 1000
Joined: Fri Apr 15, 2016 6:16 am
Contact:

Re: Combinators: Unloading off train

Post by Serenity »

The thing with wires is that connecting two signals automatically adds them. So as said above to compare two signals you multiply one of them by -1 (Each and input and output) and add it to the other. Then depending on if the result is positive or negative you can do something.

Post Reply

Return to “Gameplay Help”