Hi, i am not english speaker, but love this game too . Can you help me to fix my problem?
I have to backup my solar power (+ acc) with steam engines. This is common task and very many solution on this forum.
So, there are : 1 acc + decider combinator + arithmetic combinato and power swich. I use red and green wires to connect them.
1 Out acc -- signal A (for example)
2 Decider A < 10 then send 1 to power swich and arithmetc
3 Arithmetic A*(-25) and send to decider
we get simple hysteresis loop. It work fine!
but if i use on arithmetic minus (A - 25) all stop, pls help me understand WHY ?
if A=1, then A*(-25) = A - 25 (well - 26), so on out arithmetic we get same value, what the differense ?
Pls, help to understand combinator logic
Pls, help to understand combinator logic
- Attachments
-
- 22.jpg (527.73 KiB) Viewed 2052 times
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: Pls, help to understand combinator logic
(A * -25) will ONLY work if there is an input signal. Either you have 1 or 0:
0 * -25 = 0
1 * -25 = -25
However A - 26 will work regardless:
0 - 26 = -26
1 - 26 = -25
0 * -25 = 0
1 * -25 = -25
However A - 26 will work regardless:
0 - 26 = -26
1 - 26 = -25
Money might be the root of all evil, but ignorance is the heart.
Re: Pls, help to understand combinator logic
thanks, i can use it
.. but 1 - this is TRUE , 0 - FALSE. 0 <> FALSE
if (a<10) not true, we have no signal on exit - NOTHING. So, arithmetic get nothing (let's see GUI when mouse pointer over) and don't work. Nothing - 25 still nothing. I am a bit confusing with it. In my logic arithmetic work ONLY if decider out is true.
.. but 1 - this is TRUE , 0 - FALSE. 0 <> FALSE
if (a<10) not true, we have no signal on exit - NOTHING. So, arithmetic get nothing (let's see GUI when mouse pointer over) and don't work. Nothing - 25 still nothing. I am a bit confusing with it. In my logic arithmetic work ONLY if decider out is true.
- Deadly-Bagel
- Smart Inserter
- Posts: 1498
- Joined: Wed Jul 13, 2016 10:12 am
- Contact:
Re: Pls, help to understand combinator logic
"Nothing" in the circuit network is not the same as Null in programming. When there is nothing for a signal it is treated as if that signal is 0.
So as far as the circuit network is concerned, [nothing] - 25 = -25
This is required behaviour, say you add 10 copper to the signal of a chest, even if that chest is completely empty you still want the +10 copper signal to go through.
So as far as the circuit network is concerned, [nothing] - 25 = -25
This is required behaviour, say you add 10 copper to the signal of a chest, even if that chest is completely empty you still want the +10 copper signal to go through.
Money might be the root of all evil, but ignorance is the heart.
Re: Pls, help to understand combinator logic
I did some tests, you are right. Thank you a lot.