[13.9][Twinsen] Inserter "Hold Mode" Sends Signal One Tick Too Long

This subforum contains all the issues which we already resolved.
Post Reply
Meelo
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue Jul 19, 2016 6:07 pm
Contact:

[13.9][Twinsen] Inserter "Hold Mode" Sends Signal One Tick Too Long

Post by Meelo »

When using inserters to read their hand in "hold mode", I get that items are sometimes counted twice in my circuit network in situations when I do not expect them to be. In particular, consider the following setup:
Screen Shot 2016-07-20 at 9.33.14 AM.png
Screen Shot 2016-07-20 at 9.33.14 AM.png (41.54 KiB) Viewed 2323 times
Were the inserter activated, I would expect that the upper red network's signal is non-increasing, giving me the items which are either held in the upper chest or held by the inserter. Similarly, I would expect that the lower green network's signal is non-decreasing, giving me the items either held by the inserter or held in the lower chest.

However, this is not what happens on either circuit: When the inserter grabs something from the top chest, those items are sent to the circuit network both by the chest and by the inserter, and thus counted twice, causing an increase in the signal for one tick. Similarly, when it places something in the lower chest, those items are sent by both chest and inserter. I created a circuit which tests this as follows:
Screen Shot 2016-07-20 at 9.33.48 AM.png
Screen Shot 2016-07-20 at 9.33.48 AM.png (201.06 KiB) Viewed 2323 times
The left setup tests the top circuit. Turning the constant combinator off activates the inserter, and then the circuit network is passed through the top *-1 combinator, and the difference of the current signal to the signal one tick ago is tested to see if it is positive, and if so, it is counted by the +0 combinator below. If the signal were non-increasing, the light would not come on. A similar setup on the right tests the lower circuit. The result is that both lights will come on if the inserters are activated.

I've noticed that, if the inserter on the left setup is set to "pulse mode", one gets no double counting - so "pulse mode" appears to be activating one tick after "hold mode" currently does. I also tested this using belts (also in "hold mode") in place of the top chest, the same issue occurs, but if one replaces the lower chest by a belt, I get the expected behavior.

Here is a link to a save file featuring the pictured setup

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [13.9] Inserter "Hold Mode" Sends Signal One Tick Too Long

Post by Klonan »

Thank you for the very well detailed report

Twinsen
Factorio Staff
Factorio Staff
Posts: 1330
Joined: Tue Sep 23, 2014 7:10 am
Contact:

Re: [13.9][Twinsen] Inserter "Hold Mode" Sends Signal One Tick Too Long

Post by Twinsen »

Fixed in Version: 0.13.12

Post Reply

Return to “Resolved Problems and Bugs”