Page 1 of 1
Please Help with combinators
Posted: Wed Oct 19, 2016 7:13 pm
by Tobias
I've read the combinator 101 and thought i understood it but I'm lost. All I want to do is count up and count down.
basically for example everytime an inserter places an iron plate on an assembly belt i want to count up and when an iron plate is placed into a factory to make something i want to count down. I want to then limit iron plates in that assemly area to say just 1000 plates so the supply is cut off at that time or turned on if the count goes below 500.
i dont know if this is the right place for this question but I hope someone can help.
Thanks, tired of banging my face on the table.
Re: Please Help with combinators
Posted: Wed Oct 19, 2016 7:28 pm
by DaveMcW
Connect both ends of an arithmetic combinator together. Set it to: Each + 0 → Each. This is your memory cell.
Connect every inserter adding plates, to your memory cell. Set the inserter's circuit network to "Read hand contents", "Pulse".
Connect every inserter removing plates, to a new arithmetic combinator. Set the inserter's circuit network to "Read hand contents", "Pulse". Set the new arithmetic combinator to Each * -1 → Each. Connect the new arithmetic combinator output to your memory cell.
Now your memory cell counts up and down. And it is already wired to your supply inserters, so you can set them to operate when iron < 500.
Re: Please Help with combinators
Posted: Wed Oct 19, 2016 7:33 pm
by Tobias
Thanks Dave. I will try this tonight. I figure it was something simple but I kept hitting a brick wall with everthing I tried.
Re: Please Help with combinators
Posted: Wed Oct 19, 2016 7:42 pm
by brunzenstein
DaveMcW wrote:Connect both ends of an arithmetic combinator together. Set it to: Each + 0 → Each. This is your memory cell.
Connect every inserter adding plates, to your memory cell. Set the inserter's circuit network to "Read hand contents", "Pulse".
Connect every inserter removing plates, to a new arithmetic combinator. Set the inserter's circuit network to "Read hand contents", "Pulse". Set the new arithmetic combinator to Each * -1 → Each. Connect the new arithmetic combinator output to your memory cell.
Now your memory cell counts up and down. And it is already wired to your supply inserters, so you can set them to operate when iron < 500.
Screenshot?
Re: Please Help with combinators
Posted: Thu Oct 20, 2016 1:31 am
by impetus maximus
brunzenstein wrote:
Screenshot?
[edit3!]
DaveMcW wrote:impetus maximus wrote:there is probably a way to do it without it, but i couldn't find a combination of red and green wires that would work.
Use the same color wire for everything connected to the memory cell.
derp! why didn't i try that in the first place?
- plate.combinator.limit.derp.jpg (107.73 KiB) Viewed 3140 times
Re: Please Help with combinators
Posted: Thu Oct 20, 2016 8:40 am
by DaveMcW
impetus maximus wrote:there is probably a way to do it without it, but i couldn't find a combination of red and green wires that would work.
Use the same color wire for everything connected to the memory cell.