Page 1 of 1

connect a switch to a switch? 0.13.17

Posted: Thu Aug 25, 2016 7:23 pm
by impetus maximus
am i missing something, or can i not wire a switch to another switch?

Re: connect a switch to a switch? 0.13.17

Posted: Thu Aug 25, 2016 10:31 pm
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%)

Re: connect a switch to a switch? 0.13.17

Posted: Sat Aug 27, 2016 8:20 pm
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 2083 times

Re: connect a switch to a switch? 0.13.17

Posted: Sun Aug 28, 2016 2:05 am
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.

Re: connect a switch to a switch? 0.13.17

Posted: Mon Aug 29, 2016 3:04 pm
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)

Re: connect a switch to a switch? 0.13.17

Posted: Tue Aug 30, 2016 12:57 am
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