Page 1 of 1

Lamp showing if an inserter is active

Posted: Mon Nov 16, 2020 11:46 am
by uzilan
Id like a simple lamp showing if an inserter is active or not, preferably without repeating the condition that determines if it should be active or not (so it's easier to copy it). The inserter has a small lamp on the top left that is red or green, based on its status. I'd simply like the same lamp, though bigger. How can I achieve that?

Re: Lamp showing if an inserter is active

Posted: Mon Nov 16, 2020 12:36 pm
by uzilan
Different colors would be nice, too

Re: Lamp showing if an inserter is active

Posted: Tue Nov 17, 2020 8:32 pm
by NotRexButCaesar
You could read the hand contents and wire it to the lamp with anything > 0 as the condition.

Re: Lamp showing if an inserter is active

Posted: Fri Nov 20, 2020 3:37 pm
by adjl
AmericanPatriot wrote:
Tue Nov 17, 2020 8:32 pm
You could read the hand contents and wire it to the lamp with anything > 0 as the condition.
This will work to turn on a lamp whenever the hand is full. If you want to colour the lamp, hook it up via a combinator that outputs a coloured signal (Arithmetic: Anything + 0, output in desired colour. Decider: Anything > 0, either output option in your desired colour), with the same condition on the lamp. If you want it to be turned on when the hand is empty, set the lamp condition to Everything = 0.

This will result in the lamp flickering on and off while the inserter operates, though (on when the hand is full, off when it's empty). If you want it to stay illuminated, you'll need to incorporate a timer circuit to sustain the signal for long enough to let the inserter grab another item, along with a reset signal to start the timer again whenever it picks up a new item. That's more complicated, and I believe you'll be looking at a minimum of two combinators (plus the lamp) per inserter.

Unfortunately, none of this will give you direct feedback on the inserter's status (active, waiting for items, waiting for room), if that's what you're looking for. That information can't currently be read directly from the inserter. For that, your best bet will be either to install the Bottleneck mod (gives every machine an indicator light to show whether it's operating normally, output-limited, or input-limited), or to link the indicator lamps to input/output belts/chests and have them turn on when a given ingredient runs out or is backed up (same basic circuit logic, though for detecting input shortages, you may need to configure the lamp manually instead of being able to stamp down a generic blueprint).

Re: Lamp showing if an inserter is active

Posted: Fri Nov 20, 2020 7:12 pm
by SoShootMe
uzilan wrote:
Mon Nov 16, 2020 11:46 am
Id like a simple lamp showing if an inserter is active or not, preferably without repeating the condition that determines if it should be active or not (so it's easier to copy it). The inserter has a small lamp on the top left that is red or green, based on its status. I'd simply like the same lamp, though bigger. How can I achieve that?
Approaching from the opposite direction: set the condition on a decider combinator, then use the output of the combinator to control both lamp and inserter. If you want the lamp to be red/green like the inserter light, you'll need to use a constant combinator too.