Circuit network not detecting items at a certain stage

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
yankee42
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Oct 09, 2017 11:45 am
Contact:

Circuit network not detecting items at a certain stage

Post by yankee42 »

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:
quality-upgrader.jpg
quality-upgrader.jpg (172.94 KiB) Viewed 265 times
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?
Muche
Smart Inserter
Smart Inserter
Posts: 1006
Joined: Fri Jun 02, 2017 6:20 pm
Contact:

Re: Circuit network not detecting items at a certain stage

Post by Muche »

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:
126697-DelayMatching.jpg
126697-DelayMatching.jpg (23.53 KiB) Viewed 243 times
yankee42
Burner Inserter
Burner Inserter
Posts: 8
Joined: Mon Oct 09, 2017 11:45 am
Contact:

Re: Circuit network not detecting items at a certain stage

Post by yankee42 »

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.
Thank you very much. I never guessed that this could be the problem.

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:

Post Reply

Return to “Gameplay Help”