Page 1 of 1

"Do not replenish" logic help

Posted: Thu Nov 01, 2018 8:15 pm
by Ren
I have a logical situation that I can't figure out how to make work.

For simplicity sake, let's say I have two belt loops. The one on the left is full of iron. The one on the right is empty. Between the two loops, I have an inserter->chest->inserter. So, Iron can be moved from the loop on the left, to the chest, and then to the loop on the right.

Let's say that I want to fill the chest to 10 iron, and once I have 10 iron, move those 10 to the belt on the right. Pretty easy, right? Here's where I'm struggling...once those 10 are moved, I do not want the chest filled again. Basically, I want to move those 10, only those 10, and disable both inserters for good.

This doesn't seem that complicated, but for the life of me, I can't figure it out. Any thoughts?

(sorry, I'm away from my Factorio PC, and can't screenshot right now)

Re: "Do not replenish" logic help

Posted: Thu Nov 01, 2018 8:27 pm
by quyxkh
A feedback-wired +0 arithmetic combinator is an accumulator, this tick's inputs include this tick's outputs, which is the previous tick's input + 0. Wire each inserter up to one of those with read-pulse, enable-if iron < 10, every pulse will be added to the tick's inputs and carried forward that way. When they add up to 10 the inserter's no longer enabled.

Re: "Do not replenish" logic help

Posted: Thu Nov 01, 2018 8:33 pm
by Ren
Awesome, thanks! I'll give that a go.