connect a switch to a switch? 0.13.17

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

connect a switch to a switch? 0.13.17

Post by impetus maximus »

am i missing something, or can i not wire a switch to another switch?
Last edited by impetus maximus on Thu Aug 25, 2016 11:31 pm, edited 1 time in total.
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: connect a switch to a switch? 0.13.17

Post by impetus maximus »

ok i didn't realize, you shift+left click on a power pole to remove the power line and use it as a connect point. doh!
still connecting switches to each other directly should be an option.

off to hopefully set up a smart accumulator bank (connects when < 10%, disconnects when =100%)
twepy
Long Handed Inserter
Long Handed Inserter
Posts: 95
Joined: Tue Apr 28, 2015 6:19 pm
Contact:

Re: connect a switch to a switch? 0.13.17

Post by twepy »

What you need is a Set/Reset latch, when the set condition is triggered it says that way until the reset condition is triggered. In the example below the right side is the Set (on switch) and triggers when the accumulator goes below ten, the left side is the Reset (off switch) and triggers when the accumulator is at 100. Only thing left is connecting the output of the S/R latch to the switch and set the condition B = 1.
SR-latch2.png
SR-latch2.png (143.65 KiB) Viewed 2080 times
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: connect a switch to a switch? 0.13.17

Post by impetus maximus »

thanks, but i did it using 1 combinator, 1 arithmetric combinator, and a switch.

what i did was hook red wire from the accumulator (signal A) to the input of a combinator with "if A <10 output A 1.
green wire from the output of the combinator to the input of a arithmetric combinator with "A*-90" red wire from arithmetric combinator to combinator input.
red wire from combinator output to switch with "a=1"
2condition.switch.png
now if the accumulators fall below 10% they connect to the steam engines. i've since added quite a few solar panels and changed the arithmetric to "a*-25" output "A".
so if it falls below 10% it connects, above 35% it disconnects. the switch on the right is a manual override.
User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: connect a switch to a switch? 0.13.17

Post by siggboy »

Yes, that's the best way to do it. Give negative feedback when the input goes below the lower threshold, or reverse it and use positive feedback when the input goes over the upper threshold. Here's a diagram of what you've made, with positive feedback (in that case the condition on the power switch needs to be reversed).

The solution posted by twepy can be simplified as well, because a latch only requires one combinator, and not two (S > 0; output S=1)
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick
User avatar
impetus maximus
Smart Inserter
Smart Inserter
Posts: 1299
Joined: Sat Aug 20, 2016 10:07 pm
Contact:

Re: connect a switch to a switch? 0.13.17

Post by impetus maximus »

thanks siggboy. :) yes i have my heavy oil, and petroleum with positive feedback to keep them from filling to the brim.
i'll have to study your posts.

cheers
Post Reply

Return to “Gameplay Help”