Page 1 of 1

[1.1.109] inconsistent belt circuit when inserting

Posted: Mon Aug 26, 2024 6:07 pm
by Saibantes2
I'm connecting a single piece of belt to the circuit network and configure it to "Read belt contents" in "Pulse" mode. When an Inserter puts an item onto the connected belt piece, the circuit network pulse is usually triggered, except when another item happens to be in the exact same belt piece at the same time.
08-26-2024, 19-50-07.png
08-26-2024, 19-50-07.png (741.35 KiB) Viewed 222 times
The constant+decider combinators below the belt create a timer to synchronize the Inserters to a certain timing offset. The arithmetic combinator above accumulates all pulses generated by the belt piece. The right Inserter is about to put a copper plate onto the belt while there is another copper plate on the same belt segment. The belt will generate only one pulse, so the accumulator will only register one of the two plates.
If I change the timing offset between the two Inserters slightly (making the distance of the two plates bigger), it will register both plates.


The attached save game has both examples next to each other (two of those belts, with different offsets between the Inserters), along with a 7-segment-display using lamps to show the counter. One of the counters goes up twice as fast as the other.
Alternatively, use this blueprint instead of the save game:
08-26-2024, 20-06-15.png
08-26-2024, 20-06-15.png (879.95 KiB) Viewed 222 times

Re: [1.1.109] inconsistent belt circuit when inserting

Posted: Mon Aug 26, 2024 6:30 pm
by boskid
Thanks for the report however this case is described in the tooltip that should show up when you hover over the "read belt contents" mode.

To be more precise, belt "pulse" mode keeps track of the last item and anything that appears after the last item is going to be transmitted during transport belt control behavior update. When there are only items arriving from the back it works fine, if there are only items inserted from side it will mostly work, but if both are happening, when item is inserted in front of the "last seen" item then it is considered "already counted" and pulse is not generated.