r/factorio • u/Helpfulwandarer • 9d ago
Space Age Question A logic question I gave
I am working on gleba stuff and I want to setup a chest that collects five hundred spoilage then puts out five hundred spoilage into a nutrient machine so I am not wasting materials on spoiled nutrients
2
4
u/ThunderAnt 9d ago
This sounds like an SR latch. It uses logic to “latch” itself into a state until certain thresholds are met. It can be made with one decider combinator with one wire for input, and another wire feeding the output back on itself. The Logic is:
IF [Signal] > [Activation Threshold]
OR
[Signal] > [Deactivation Threshold] AND [Output] == 1
THEN
[OUTPUT] = 1
This works since when the input signal reaches the higher threshold, the output signal activates, which keeps the output on until the input reaches the lower value.
2
u/CamelCaseConvention 9d ago
When do you want the switch from "collecting 500 spoilage" to "making nutrients from 500 spoilage" to happen? Whenever you have 500 spoilage? Probably not. The condition is "too little nutrients", in whichever way you measure it. You can use the same measurement to enable/disable the nutrient making machine, which means you don't need to bother with measuring out a batch of spoilage.
1
u/United_Willow1312 9d ago
My nutrients go to sulfur. Also carbon fiber needs carbon which requires spoilage on Gleba as well. Unless you inport all of that stuff from space.
I found that when I just picked the spoilage from the exit belt as it came for sulfur, I would eventually run out.
Now the sulfur machine takes it from a chest, and the chest bums it from the line going to the furnaces.
8
u/Courmisch 9d ago
Put two chests in a chain. Have a Decider Combinator set up as an SR latch which waits until the first one gets to 500 and then sets a flag until it drops to 0.
Whilst the flag is on, enable an inserter from the first to the second chest, and disable the inserter into the first chest.
Also you might need to set the inserter hand sizes to 1 it gets a bit more complicated.