Issue with Reading Train Contents

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Post Reply
evopwr
Fast Inserter
Fast Inserter
Posts: 159
Joined: Fri Apr 28, 2017 1:45 am
Contact:

Issue with Reading Train Contents

Post by evopwr »

I have Read Train Contents on, and connected to stack inserters, where I only want them to be enabled if there is <1000 items (of that item) on the train.
This works, but... There seems to be a delay as the train reaches its stop, where it hasn't yet got the contents signal, but the inserter activates, transfers 1 stack, then gets the signal, and disables.
After a period of time, eventually the train fills up, as it keeps adding 10 items (with stack research I'm currently at), every time the train pulls in.

1) How can I stop this?

2) Should this not be fixed? I found it quite counter-intuitive. Even if a 1 tick delay is required for inserters putting items in a cargo wagon, to allow time for the signal to come across.

Thanks!

User avatar
Lav
Filter Inserter
Filter Inserter
Posts: 384
Joined: Mon Mar 27, 2017 10:12 am
Contact:

Re: Issue with Reading Train Contents

Post by Lav »

Wire signals need some time to propagate. Even if it's just a single tick, it's enough for the inserter to start loading the train because inserter's current signal states that the train does have less than thousand items.

You need to make a more complex system for load control. Two combinators should be enough. Retrieve both train cargo and train ID. Place one combinator to output L=1 when cargo is less than required. Put another to output L=1 when train's ID (it's T signal by default) is not zero. Activate your inserter when L=2 (i.e. both combinators are active).

evopwr
Fast Inserter
Fast Inserter
Posts: 159
Joined: Fri Apr 28, 2017 1:45 am
Contact:

Re: Issue with Reading Train Contents

Post by evopwr »

Ah! so obvious, silly me! Thanks heaps Lav!

Post Reply

Return to “Gameplay Help”