Hello factorio forum!
I've been playing Bob's and Angel's mods now, with a lot of new fun ores! However, maybe a bit tricky to handle...
I was thinking of making a "Mixed ores" drop off station where I would read the content of the train into a memory (latch) to set filter inserters to filter the current stationed (or just departed) trains' content. However, when a new train arrives with a new type of ore, I don't know how to switch the latched ore type in the memory. I've been the latch part from https://wiki.factorio.com/Tutorial:Circ ... ok#Latches but currently without any working reset. I try to use "each" or "anything" to read the content of the train, instead of setting up a big number of decision combinators outputting a,b,c... for each different ore type and getting the filter latched from that, but I don't know how to get this to work. Any help would be appreciated as I'm quite new to the bit more advanced circuit network stuff.
Thanks! -RenewU
How to filter train content based on train content
Re: How to filter train content based on train content
I assume you are trying to take a set of signals, and assign a unique signal to each inserter?RenewU wrote:I try to use "each" or "anything" to read the content of the train, instead of setting up a big number of decision combinators outputting a,b,c... for each different ore type and getting the filter latched from that, but I don't know how to get this to work.
This really is as hard as you think. viewtopic.php?t=42902
Re: How to filter train content based on train content
A latch like that can only store on/off states as it'd start counting the moment you set it to anything: value.
If all you need is a reset trigger you can hook up a signal reading red while a train is in the station.
The latch can then be set to green = 0: anything: 1.
When using train id from the stop you will need an inverter so it doesn't start self holding with trainid.
Inverter: TrainID = 0: R: 1
and latch: R=0: anything: 1
Edit: I don't see why you would use an SR-Latch for this though.
If all you need is a reset trigger you can hook up a signal reading red while a train is in the station.
The latch can then be set to green = 0: anything: 1.
When using train id from the stop you will need an inverter so it doesn't start self holding with trainid.
Inverter: TrainID = 0: R: 1
and latch: R=0: anything: 1
Edit: I don't see why you would use an SR-Latch for this though.
My Mods: mods.factorio.com
Re: How to filter train content based on train content
Humm... I may be completely wrong using an SR latch. My idea was to use an SR latch to remember the last signal (ore type) from the current/previous train and then somehow make the signal reset to a new ore type with the next train. Maybe an SR latch, which as mentioned, is basically used for on/off control.
A reset trigger could be that a train arrives as the problem with reading stationed train would probably reset the filter signal as soon as the train leaves.
A reset trigger could be that a train arrives as the problem with reading stationed train would probably reset the filter signal as soon as the train leaves.
Re: How to filter train content based on train content
To filter Bobs and Angels I'd unload either to active provider chests or large "chests" like 6x6 warehouses, wide chest, asf and filter from there either by loader or filter stack inserters.
My Mods: mods.factorio.com
Re: How to filter train content based on train content
Of course it could be done with individually made filter inserters to filter each ore one at a time along a belt or something, but that's not what I'm after here.Optera wrote:To filter Bobs and Angels I'd unload either to active provider chests or large "chests" like 6x6 warehouses, wide chest, asf and filter from there either by loader or filter stack inserters.
Re: How to filter train content based on train content
Here's a working proof-of-concept, it works well in all my easy tests. The main weakness I've found is, don't unload multiple chests too quickly while items are still being unloaded; there's a delay propagating the exclusions which I handle by staggering the startup. My attempts to reduce the delay add lots more combinators, and I think nothing can actually eliminate it so I think emptying multiple chests simultaneously while the wagon's still unloading will always be risky.
The idea is, during unload items are in exactly one of the wagon, the inserter hand, or the chest. The sum of items-in-hand+items-in-chest+items-in-wagon will be larger than items-in-wagon if and only if the item's being unloaded, so cascade a >0 filter on the difference to drive further filter selection. You can eliminate the back-propagation isolator if you never empty more than one chest while the wagon's still unloading.
The save game has read-train-contents turned off, turn it back on to start.
Blueprint
Re: How to filter train content based on train content
Awwwww yes! This is exactly what I was looking for! Thanks so much. really a perfect design in my little world! No worries about any delay, it's definitely quick enough
Re: How to filter train content based on train content
This works _very_ much better if you run a red wire from each inserter to its chest, connecting the hand readout into the filter propagation.circuit.
-
- Burner Inserter
- Posts: 17
- Joined: Tue Mar 08, 2016 12:44 am
- Contact:
Re: How to filter train content based on train content
I was looking to do exactly what you described, and I came up with a solution. The key was a single pulse generator, that takes a constant signal and creates a single pulse every time that signal appears. I used this one that I found, and added the rest of what I needed. Storing what was in the last train was easy, simply a combinator set to T > 0, output everything. The pulse generator is configured to turn the arrival of a train to a single pulse of -1G value on T, which clears what was saved in the combinator from the last train.
My problem was that I also needed to determine if the last train was empty, which required a bit more circuitry. If you don't need this, you can just remove the 5 combinators on the right. As I configured it, if the last train was empty, there will be an 'E' signal.
The pulse generator is on the left, the single combinator that stores what was in the train is in the center, and what I created to also save if the train was empty is on the right. The final signal is output on the pole to the right.
Edit: I compacted the logic a good bit. Now the logic to add a condition for last train empty only adds one combinator and a constant signal generator. Plus I reduced the pulse generator by one combinator.
My problem was that I also needed to determine if the last train was empty, which required a bit more circuitry. If you don't need this, you can just remove the 5 combinators on the right. As I configured it, if the last train was empty, there will be an 'E' signal.
The pulse generator is on the left, the single combinator that stores what was in the train is in the center, and what I created to also save if the train was empty is on the right. The final signal is output on the pole to the right.
Blueprint
Edit: I compacted the logic a good bit. Now the logic to add a condition for last train empty only adds one combinator and a constant signal generator. Plus I reduced the pulse generator by one combinator.
Blueprint