TL;DR
The circuit network cannot react to an inserter's pickup of an item in time to prevent it from picking up another item in the following tick.This is a repost of a not-a-bug report (viewtopic.php?f=23&t=108780) I made last year, and I'm hoping it can be considered for 2.0 if there are more recipes or mechanics which may motivate counting item pickup from belts.
What?
An inserter will only ever pick up one item off a belt each tick, but depending on item position, belt speed and inserter rotation, there are times when an inserter will pickup items in consecutive ticks and not have time to react to the signal from the previous pickup.The easiest way to see the issue is with an inserter picking up from the far lane of a blue belt set to enable when not holding anything. It will sometimes pickup 2 items instead of 1.
Why?
People who are new to circuit network, or just players aiming to make compact builds may see what appears to be a simple, elegant and intuitive solution, only to be confused by a tick delay which is hard to observe. It's frustrating because it works almost perfectly already, just because most of the time there is 2 or more ticks between inserter pickup from belts.When using a combinator connected back to its input as a memory cell, and the inserter set to read hand contents in pulse mode, a pickup counter can be created, but that pickup counter can't be used to disable the inserter in time.
These two images are one frame tick. The inserter is disabled in the second tick, but also picked an item up, even though the circuit network reads 7 on the previous tick.
Alternatives/workarounds and their downsides are:
Use a chest.
- Chest based item counting has a different array of challenges and layout considerations.
- Exact item pickup control requires using the hand limit control signal.
Use the circuit network to calculate hand limit while picking up from the belt.
- Requires an extra combinator to do the subtraction.
- Because the stack size counts down as the inserter picks up items, the inserter will have to make extra swings.[/list]
Afterword
I understand if this may be difficult or impossible due to engine design, sequencing of circuit network read and write passes, and inserter wake lists. I would hope that some investigation may also help others with similar timing struggles:- viewtopic.php?f=23&t=92636
- viewtopic.php?f=71&t=99519