Hi, I'm a big noob when it comes to circuitry. I'm trying to rig an assembler to make assembling machines 1-3 and running into issues when it comes to latching the current recipe and not interrupting itself.
I made some similar builds for other items (electric poles, logistics chests, combinators) that do the job, but when I tried to copy those for assemblers, it breaks...
In this case, I copied the bp that makes logistic chests, which works because I only needed to account for it also making steel chests, not multiple items (assembling machines 1s and 2s).
I've tried looking at other people's builds but the things I find are always more complex/sophisticated than what I'm doing and I haven't been able to reverse engineer it.
Basically the predictable problem: it reaches the desired number of assembling machine 1, and switches to make assembling machine 2 now. Assembling machine 1 is inserted to create assembling machine 2, which takes it below the desired numbers of assembling machine 1, so it instantly changes back to making assembling machine 1s. But this immediately returns the ingredients to the chest, so it has the desired number again, without having to make more.
I think my brain is just stuck so it would help having an outsider to point out the obvious thing that I'm missing!
Re: Circuited assembler
Posted: Sun Dec 21, 2025 11:02 am
by atomizer
Sorry, I can't look at the blueprint at the moment, but it sounds like you need to add hysteresis to your system. Look at this decider:
Output and input are connected with a green wire, input is on red, and output sets AM1 to 1. This signal turns on only when the input falls under 10, and off again when there are at least 50.
No matter how complicated a crafter system is, this component is usually somewhere in there. Hopefully it is simple enough when taken alone.
Re: Circuited assembler
Posted: Sun Dec 21, 2025 12:17 pm
by Tertius
Gemma wrote: Sun Dec 21, 2025 5:27 am
Basically the predictable problem: it reaches the desired number of assembling machine 1, and switches to make assembling machine 2 now. Assembling machine 1 is inserted to create assembling machine 2, which takes it below the desired numbers of assembling machine 1, so it instantly changes back to making assembling machine 1s. But this immediately returns the ingredients to the chest, so it has the desired number again, without having to make more.
Connect the inserter that moves items into the assembling machine to the circuit network and add its signal to the signals of your general inventory. Set it to "red hand" in hold mode, so whatever it holds is added to the inventory. So the ingredient it moves is removed from the inventory but added at the same time as hand content, so the recipe calculation still receives the same amount of items, so it doesn't switch mid-swing.
Re: Circuited assembler
Posted: Mon Dec 22, 2025 12:45 pm
by Gemma
Thank you both!
atomizer wrote: Sun Dec 21, 2025 11:02 am
Sorry, I can't look at the blueprint at the moment, but it sounds like you need to add hysteresis to your system. Look at this decider:
Output and input are connected with a green wire, input is on red, and output sets AM1 to 1. This signal turns on only when the input falls under 10, and off again when there are at least 50.
No matter how complicated a crafter system is, this component is usually somewhere in there. Hopefully it is simple enough when taken alone.
So the green wire is basically functioning as a latch? I don't actually understand how this wire is doing that job. Its sending its output to itself, so the output can't change (until the other conditions are met)? Why does this override any new input signals that might want to come in?
This does the job, though, which is very nice.
But now I have a new problem, which is that I want to use one chest to hold the green and red chips, the steel, and the steel chests. The assembler's output goes into one chest, then everything except the logi chests goes back into the input chest (which also has a requester chest + circuit filtered inserter to give it ingredients as needed). This is fine, except that the combinator telling the assember which recipe to select is reading from those chests (so it knows when to make more steel chests), and at some point it always ends up with steel as its signal, rather than a chest, so the assembler stops making anything.
I also have an issue with the inserter moving from requester to input chest getting a dirty signal. I thought to clean the signal with a constant combinator setting unwanted items to -1k, which I think works. I thought maybe I could also "clean" the signal to the decider combinator by putting non-recipe items at +1k (so they will never be below the threshold where it will want to make them), but I don't think this worked, because the machine reached the same point where previously it would try to make steel, and now instead it just turns off and makes nothing. So I don't know what I've done wrong, but I'm out of time to try to fix it today.
(Just realized as I post this the bp has a pointless green wire attached to the inserter, nvm.)
Gemma wrote: Mon Dec 22, 2025 12:45 pm
Thank you both!
So the green wire is basically functioning as a latch? I don't actually understand how this wire is doing that job. Its sending its output to itself, so the output can't change (until the other conditions are met)? Why does this override any new input signals that might want to come in?
Nvm, I thought about it for a second and now I get this part.
Re: Circuited assembler
Posted: Mon Dec 22, 2025 1:33 pm
by Tertius
The loopback provides the previous output as input, so you're able to remember and keep a state.
You tried to implement a latch using the EACH operator everywhere, however EACH for the state it's a wrong approach because you can never be sure what signal exactly is matching the state you want to keep. You can use EACH everywhere but not for the signal that's supposed to carry the state (latched or not latched).
Re: Circuited assembler
Posted: Mon Dec 22, 2025 10:53 pm
by Gemma
Tertius wrote: Mon Dec 22, 2025 1:33 pm
The loopback provides the previous output as input, so you're able to remember and keep a state.
You tried to implement a latch using the EACH operator everywhere, however EACH for the state it's a wrong approach because you can never be sure what signal exactly is matching the state you want to keep. You can use EACH everywhere but not for the signal that's supposed to carry the state (latched or not latched).
I'm confused, if you can't use EACH for that decider how can it set multiple recipes? Are you saying another decider must have the EACH, and the one carrying the state should use ANYTHING or something else?
Re: Circuited assembler
Posted: Tue Dec 23, 2025 12:08 am
by Gemma
If I'm understanding you correctly, it seems like what I should do is have decider A reading from the input chest + a constant combinator and sending EACH via green to decider C (which sends EVERYTHING to the machine to set recipe), then decider B sending a red signal to decider C, and when decider B says it's okay to transmit then it sends the EVERYTHING signal. What I don't follow is why an EACH would differ from an EVERYTHING, because they are both going to send and receive the same signals, just only one of them at a time, so in the case that I'm talking about in the earlier posts, it would still send the dirty "steel" signal. I guess I haven't understood something.
Re: Circuited assembler
Posted: Tue Dec 23, 2025 11:39 am
by Tertius
My comment was a general one: what you tried to set in the combinator screenshot isn't deterministic, because it isn't clear what signal is used as feedback output to keep the latch latched.
In general, you're trying to solve the most complex and sophistic circuit network challenge the game has to offer. There is no standard solution, because it is too complex. Every approach is different and many are valid. So to help you with exactly your whole contraption means I have to solve it myself and tell you how it could work, however I assume it's your task to build it.
What I can help you with is general circuit and signal behavior. You ask about "EVERYTHING signal" - it's not a signal. It's a wildcard and operates on a number of signals. You ask what the difference is between EACH and EVERYTHING while there is no EVERYTHING but one ANY in your screenshot - I guess you should make your mind up and consult the wiki about the 3 wildcards: https://wiki.factorio.com/Circuit_network#Logic_signals and https://wiki.factorio.com/Decider_combinator#Function
Re: Circuited assembler
Posted: Tue Dec 23, 2025 12:43 pm
by atomizer
I might be stupid but I just add one decider per recipe with a parametric bp.