DaveSh99 wrote:Out of curiosity, how do you wire up a station that is both a supplier of some things, and a requester of others?
Wire up the yellow combinator of the LTN station to each inserter,
The loading inserters you put the signal Anything > 0, they will start loading the train whenever a train requests anything on the station (requests are positive by default)
The unloading inserters, you put Anything < 0, the opposite of the loading ones, so they won't unload stuff from the train when you're trying to load it
The 2 combinators near the station are arithmetic combinators.
- the blue one has the signal "each * -1 | each" it is connected to the station through the Red Wire and it'll read the train's cargo content, then multiplies it by -1, essentially inverting the signal
- The green one has the signal "each / 1 | each", it is connected with the blue combinator with a green wire from the output of blue combinator into input of green combinator.
The output of the green combinator is a red wire hooking into each chest on the loading side with the signal "Set Requests".
The station is set to [X] Read Train Contents and [X] Send to train, but this last one is unecessary
In the image below you can see a mining outpost configuration:
That is an example of why you use the green combinator, this time we're setting it to "each / 12 | each".
Now the boring part:
When the train arrives at the station with a "REQUEST SIGNAL" meaning the train wants something, it'll have a negative signal, so since "something is lesser than 0" then the unloading inserters will work and the loading inserters won't.
When the train arrives at the station with a "PROVIDER SIGNAL" meaning he wanna give something to the station, every signal he's sending will be positive, so it'll trigger the "anything > 0" condition and the inserters will start to remove things from the train
If you don't have that blue combinator of picture 1, the inserters will fill the train untill there's nothing left on the chests, since the chests are requesting whenever a train arrives with a signal, it'll keep filling up the train endlessly, but with the combinator, it'll subtract the items already loaded into the train from the work order and the requester will reduce its requesting order untill the train has all the items he wants, avoiding overloading the train.
The Green signal is a work order splitter, its purpose is to get the work order signal and split it amongst the requester chests to enable fast loading of the train and to avoid overloading the chests with resources. Imagine we have 6 chests loading up 2000 iron ore in a train, if each chest requests 2000 iron ore, it'll be 6x2000 ore loaded into the chests when the train only wants 2000, so we'll have 10k spares sitting on the chest and the miners are working in the meantime wasting energy, if its in a base station, the excess item loaded into the chest will end up being on the next train that arrives on that station requesting something filling the train with "junk" for his work order.
When we hook up the Blue combinator with the regulator signal (Inventory Reader) to the green signal, there's some points to consider:
1) if the work order is lower than the number of loading chests in the station, the train won't receive any item, for example if you have 6 chests requesting items and the train has a work order of 5 barrels, he will never receive any barrel as his work order is lower than the "min delivery" of that station
2) if you have a slow filling chest, whenever the remaining items to be loaded fall under the "min delivery" the train will stop receiving items, potentially jamming that loading station, its also an indicator of supply issues.
Requests on that station you just input on the red combinator that you hook up in the lamp with a negative signal and the ammount you want, lets say you want that station to receive and maintain 200 rocket fuel, you input on the constant combinator the signal "-200 rocket fuel" and the LTN system will try to keep that station with at least 200 rocket fuel all the time.
Feel free to ask any questions, this system is what I use in my current 6.4rkt/h save, working on bumping that number to 4rkt/s!!