How do I use control signals to set stack size on an inserter?

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
Calion
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jun 29, 2020 8:55 pm
Contact:

How do I use control signals to set stack size on an inserter?

Post by Calion »

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!

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: How do I use control signals to set stack size on an inserter?

Post by Impatient »

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
Does that clarify the mechanic?

Calion
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon Jun 29, 2020 8:55 pm
Contact:

Re: How do I use control signals to set stack size on an inserter?

Post by Calion »

Where do you assign the value to the signal?

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

Re: How do I use control signals to set stack size on an inserter?

Post by Serenity »

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

User avatar
MEOWMI
Filter Inserter
Filter Inserter
Posts: 309
Joined: Wed May 22, 2019 12:21 pm
Contact:

Re: How do I use control signals to set stack size on an inserter?

Post by MEOWMI »

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:
  1. Chest to Decider A: Is the For Each signal less than 50? If so output 1.
  2. Chest to Decider B: Is the For Each signal less than 25? If so output 1.
  3. Constant combinator C: always output 1.
  4. 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.)
N.B.: There may exist more optimized setups even for my example calculation.

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!

User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: How do I use control signals to set stack size on an inserter?

Post by Impatient »

Calion wrote:
Tue Jun 30, 2020 6:28 pm
Where do you assign the value to the signal?
Now that is a different question. If you want to know how the circuit network works, start here:
https://wiki.factorio.com/Circuit_network

astroshak
Filter Inserter
Filter Inserter
Posts: 597
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: How do I use control signals to set stack size on an inserter?

Post by astroshak »

Calion wrote:
Mon Jun 29, 2020 8:58 pm
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!
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.

Post Reply

Return to “Gameplay Help”