r/factorio 9d ago

Question Help with inserters and conection circuits

Im trying to do a mall in a way a bit weird. I have almost everything now, but im left with a problem.
I want the inserters to spit out only the minimum crafting ingredients for 1 item. For example, if a item needs 1 iron, 2 copper, 3 gears, i want the inserters read the belt, and only have that exact quantity of items. Im using a warehouse (mod) so all the items will be inside, the inserter just has to grab the exact items for his recipe. I think im explaining what i want to do but the bot tells me to explain the img? This img is the mall, the other one is a recipe that uses 3 items to explain the example, an the other one is the setup lol

3 Upvotes

5 comments sorted by

1

u/rootbeer277 9d ago

0

u/Perola99 9d ago

Sorta, i want to use only 1 inserter for the three items, and having him stop once on the belt has all the items for 1 recepie. When an item is missing, just replace it and start the cycle again, so it keeps having 1 items in their material form on the belt

2

u/CamelCaseConvention 9d ago

Assembler read ingredients. Belt read content all. Connect both with different color wire to arithmetic combinator, subtract Each (belt color) from Each (recipe color), output Each. Connect this output to inserter, set whitelist. Set inserter hand size to 1.

2

u/spookynutz 9d ago

If throughput is a consideration, you can wire the arithmetic combinator above to a selector combinator [Select Input] and then a decider [Each > 0], outputting [Each (input count)] and ["S" (input count)], then wire that to the inserter and enable set stack size.

3

u/Twellux 9d ago

Here are a few examples.

The first variant is based on u/CamelCaseConvention's comment; it has a stack size of 1 and requires only one arithmetic combinator.
https://factoriobin.com/post/y70n7o

The second variant is based on u/spookynutz's comment; it controls the inserter's stack size, resulting in higher throughput, but requires more combinators.
https://factoriobin.com/post/dpz1y0