I can find nothing on this, anywhere. The tutorials don’t mention it, the wiki only says that you can do it. What I’m specifically wanting to do at the moment is change the stack size based on the quantity of items in a box.
Thanks!
How do I use control signals to set stack size on an inserter?
Re: How do I use control signals to set stack size on an inserter?
Hi!
- You check the checkbox Set stack size
- You select a signal. The value of that signal will be the stack size. If the value is higher than the max stack size, the stack size will be the max stack size.
- Somewhere you assign a value to this signal
Re: How do I use control signals to set stack size on an inserter?
Where do you assign the value to the signal?
Re: How do I use control signals to set stack size on an inserter?
That depends on what you want exactly. You want to read the number of items in a box. So you need to do something with that
Re: How do I use control signals to set stack size on an inserter?
The signal is "assigned" a value by computing the signal from the chest: addition, subtraction, division, booleans, etc.
Cable goes from chest to arithmetic (or decider) combinator, possibly a chain of several depending on how you want to compute the chest content signal. Might include changing one signal into another, so you'll have to think what calculations will turn the chest content signal into your desired number from 1 to 3 or 1 to 12. Then after all that, feed the output into your inserter. Done.
Example:
And if you're still unsure how to start, you can begin by just connecting a constant combinator to something and playing with that. Then you can slowly add the other devices and slowly build a feel for how they work. Experiment! After some time, the instructions will make sense! If you need to double check your results at any point, hook your device up to a power pole as that will let you read off the resulting signal!
Cable goes from chest to arithmetic (or decider) combinator, possibly a chain of several depending on how you want to compute the chest content signal. Might include changing one signal into another, so you'll have to think what calculations will turn the chest content signal into your desired number from 1 to 3 or 1 to 12. Then after all that, feed the output into your inserter. Done.
Example:
- Chest to Decider A: Is the For Each signal less than 50? If so output 1.
- Chest to Decider B: Is the For Each signal less than 25? If so output 1.
- Constant combinator C: always output 1.
- Decider A, B and Constant combinator C all to Inserter: Use the signal for setting stack size. (Connect all the output wires to it. Make sure using all of the same signal. We're using the fact that signals from multiple outputs are always implicitly added together to give a value of 1-3 depending on amount if items in chest.)
And if you're still unsure how to start, you can begin by just connecting a constant combinator to something and playing with that. Then you can slowly add the other devices and slowly build a feel for how they work. Experiment! After some time, the instructions will make sense! If you need to double check your results at any point, hook your device up to a power pole as that will let you read off the resulting signal!
Re: How do I use control signals to set stack size on an inserter?
Now that is a different question. If you want to know how the circuit network works, start here:
https://wiki.factorio.com/Circuit_network
Re: How do I use control signals to set stack size on an inserter?
Are you looking to reduce inserter grab amount as the box’ contents go up, or are you looking to increase the inserter grab amounts as the box’ contents go up?
Wire the box to whatever Combinators are needed to do your math. Then wire the output of that to the Inserter. Check the ‘Set Stack Size’ option. If the resulting signal sent to the Inserter is greater than 3 or 11 (Inserter or Stack Inserter) It will functionally be reduced to 3 or 11. If it is less, then the stack size will reflect the lower amount. If the number is 0, there won’t be any signal sent. If it is less than zero.... I’ve had issues with it being less than zero before.