What could cause this issue?
1.) e.g. iron is requestet, but the first swing pack 100 wrong items, and then iron in it... The inserters have the wrong item from the last train in it.
2.) Sometimes LTN asks for 8000+ items, even the LCC train can only hold 8000... causing unnessary waiting times... solution?
(filter) Inserters take wrong items?
Moderator: Optera
Re: (filter) Inserters take wrong items?
Would not rly the problem, but WHY EVER, at the next station where iron gets delivered, he first unload THE WRONG ITEM (via filter inserter) (wtf)
Re: (filter) Inserters take wrong items?
That's due to unavoidable signal delay between stop output and scripted constant combinator output.
I explained this effect and a solution a few times now for example here: viewtopic.php?f=214&t=56270#p331603
I explained this effect and a solution a few times now for example here: viewtopic.php?f=214&t=56270#p331603
Optera wrote:Yes, there is a short delay of 1-5 ticks before the combinator shows what should remain in the train and another 1tick delay from subtracting that from the stop output.
If you want to make 100% sure inserters don't start unloading the wrong items use a decider combinator behind the arithmic combinator set to "encoded position of locomotive" != 0 then everything: input count.
blueprint
My Mods: mods.factorio.com
Re: (filter) Inserters take wrong items?
Im too dumb for this.
Okay, the circuit needs extra time to set the filter. I do understand this.
But why the filter inserters work BEFORE they get a filter transmitted? Shouldnt they do nothing without a filter set?
Edit: yes, if i place a stack filter inserter (has no filter set) it wont take any item out
Okay, the circuit needs extra time to set the filter. I do understand this.
But why the filter inserters work BEFORE they get a filter transmitted? Shouldnt they do nothing without a filter set?
Edit: yes, if i place a stack filter inserter (has no filter set) it wont take any item out
Re: (filter) Inserters take wrong items?
btw ur fix is working fine, still idont get why its behaiving like this. bug in factorio or in LTN?
Re: (filter) Inserters take wrong items?
nuhll wrote: Okay, the circuit needs extra time to set the filter. I do understand this.
But why the filter inserters work BEFORE they get a filter transmitted? Shouldnt they do nothing without a filter set?
Inserters get the whole train inventory as filter from the train stop reading the inventory the same tick (or 1 tick after) a train parks at the stop.nuhll wrote:btw ur fix is working fine, still idont get why its behaiving like this. bug in factorio or in LTN?
The output is scripted and updates when the train event fires. In total that means it'll take 1-3 ticks from script update (I'm not sure if events and setting constant combinators all work on one tick or have some delay) + 1 tick from arithmetic combinator before the correct list of items to unload is ready.
The only 2 ways to prevent inserters from reacting to the uncorrected inventory from train stop is to either delay that signal with 3-4 NOPs e.g arithmetic combinator set to each+0=each, or use a filter set to only open when a signal that only exists in the longest signal path e.g train composition is detected.
My Mods: mods.factorio.com
Re: (filter) Inserters take wrong items?
I've been reading nuhlls posts and wondering why I haven't had any problems with this, despite have providers with up to 4 different items. Your explanation helped me realize what it is.Optera wrote:nuhll wrote: Okay, the circuit needs extra time to set the filter. I do understand this.
But why the filter inserters work BEFORE they get a filter transmitted? Shouldnt they do nothing without a filter set?Inserters get the whole train inventory as filter from the train stop reading the inventory the same tick (or 1 tick after) a train parks at the stop.nuhll wrote:btw ur fix is working fine, still idont get why its behaiving like this. bug in factorio or in LTN?
The output is scripted and updates when the train event fires. In total that means it'll take 1-3 ticks from script update (I'm not sure if events and setting constant combinators all work on one tick or have some delay) + 1 tick from arithmetic combinator before the correct list of items to unload is ready.
The only 2 ways to prevent inserters from reacting to the uncorrected inventory from train stop is to either delay that signal with 3-4 NOPs e.g arithmetic combinator set to each+0=each, or use a filter set to only open when a signal that only exists in the longest signal path e.g train composition is detected.
what I suspect is happening is that the outputs from the train as negated and thus ignored by the inserters until the train event fires and now some of the results are positive. won't claim I planned it this way, this was my first provider and I like the idea of fewer combinators

Re: (filter) Inserters take wrong items?
Your picture shows a loading station, those will never see this effect.
For loading stations filters are only ever set by the constant combinator. Inventory signals from the stop pass through an inverting combinator making all singals negative and unable to set a filter.
For loading stations filters are only ever set by the constant combinator. Inventory signals from the stop pass through an inverting combinator making all singals negative and unable to set a filter.
My Mods: mods.factorio.com
Re: (filter) Inserters take wrong items?
Optera wrote:Your picture shows a loading station, those will never see this effect.
For loading stations filters are only ever set by the constant combinator. Inventory signals from the stop pass through an inverting combinator making all singals negative and unable to set a filter.
Indeed it does, lol. my bad. ill give it another go after work

edit: finally had time.. yeah i'll never see this problem because all of my requesters empty the train