I build a small blueprint that takes Quality Modules 2 as input and upgrades them until they are legendary.
This is how it looks like:
Here is the blueprint:
The idea is as follows:
1. The infinity chest in the top left represents the source of quality 2-modules.
2. The recycler recycles the modules and places them in a chest
3. If the circuit network reads all resources which are in the chest, the factory, the inner belt or handled by one of the inserters connecting these components.
4. The five decider combinators on the bottom check for each quality level whether enough ingredients are available as measured in step 3.
5. The selector combinator in the lower right selects the highest possible quality level that can be selected as input quality for the factory and sets the recipe.
6. The factory produces the desired modules and the modules are then put on the "outer belt" at the top.
7. If the module created in step 6 is legendary, it is put into a chest as the final product. Otherwise it ends up in the recycler for the next round.
The arithmetic combiner in the center only serves the purpose of isolating the factory from the rest of the circuit network. Otherwise the factory would get recipies set for those things that are in the chest.
Since the factory might still have some resources in it, when the recipe changes, there is the "inner belt" at the top. If the recipe changes the left over ingredients are returned to the chest.
The problem is, that this machine regularly gets stuck in a loop where the recipe is changed forth and back quickly. I think that the problem is that when the inserters connecting chest, factory and the belts grab or drop an item, there is a tick where the items being moved by the inserter are not accounted for and thus the recipe is reset. However moments later the items turn up again and the loop starts again.
I am out of ideas how I can detect and prevent this. Any ideas how this could be fixed?
Circuit network not detecting items at a certain stage
Re: Circuit network not detecting items at a certain stage
Indeed.
Similarly to 122373 Signal interruption on decider combinator from crafting machines output their contents,
there is one tick during which the items brought by the inserter to the AM are not visible to the circuitry due to delay introduced by the isolating combinator.
A solution could to be apply this delay to the storage signal as well, for example:
Similarly to 122373 Signal interruption on decider combinator from crafting machines output their contents,
there is one tick during which the items brought by the inserter to the AM are not visible to the circuitry due to delay introduced by the isolating combinator.
A solution could to be apply this delay to the storage signal as well, for example:
Re: Circuit network not detecting items at a certain stage
Thank you very much. I never guessed that this could be the problem.Muche wrote: Sat Feb 08, 2025 10:53 pmthere is one tick during which the items brought by the inserter to the AM are not visible to the circuitry due to delay introduced by the isolating combinator.
I parameterized to blueprint so now it should work with any item that has three ingredients. A quick test in sandbox mode suggests that it works now. I am curious how it turns out once I test it "for real".
Here is the new parameterized version: