Hello.
Ensuring that the refineries work and don't overfill one output is not difficult, but I didn't like that when I set the minimum and maximum levels, the pumps would start and immediately shut off again. It's logical. When the light oil level drops below 15,000 for example, the pump power on for fracking heavy oil, bringing the light oil level above 15,000, which turns the heavy oil pump off again. Depending on the size of the base and fluid consumption, it can be annoying
So I devised a controller that turns the pump on once the quantity is below 15000 (light oil for example) and keeps the pump on until the quantity is 19000 and then turns the pump off. Once the quantity drops below 19000 the pump will no longer turn on and will wait until the quantity drops below 15000 again.
I hope I translated that correctly.
0eNrtmVuOmzAUQPfibzLCvEFtpUr97gaqESLgZCyBQcZEjSIW0IV0Y11JbagmGcLDtvJSZ36QsPH19T2+D5sDWOcNqigmDEQHgNOS1CD6cQA13pIkF21sXyEQAcxQAQxAkkK8ZSjFGaKrtCzWmCSspKA1ACYZ+gki2BqLAhKK2UuBGE7HZVjtswEQYZhh1GvUvexj0hRrRPkkc7oYoCprPrQkQgEubgUdA+xB5D+5fI4MU5T2vZYB+JoZLfN4jV6SHeaj+ZB/MmPel3VyatG6wbRm8dnKNnmDs+PSKiTEoaZYbZNaLEkYlSXCwtA1TVM0FFVCO00j8OfXbz62bFjVjMjeYcoa3vIqvf9iZfaCqz1XsSEs3tCyiDHhMkC0SfIatf3EpF9opz4Ujy1FiJwalKseee0z/9ya7BdWwjRtMOteIf+8FZAHTKwFvCNYLCUsR7FyZKasB4X1aiRkKJq8rBAH1+kIvn7/pkdOiQ18a3vrxO7i3R12z5O05Uja6iTNd0cSTpOkKBtaPjgDZUg52xA49CaJj8zqDHm/FRbKbQdHLdgG14u1s/vgGGiHQfbzLUPsCAZbhZkvB8XVyoDBnTNgeJ4BP+n53uPlP+9VywJlmC8f5Xx6ykNnxc0xxsR9cjsqYUdFWl933qvhQrc5bFgaILl+XzdrBDfOGqZO1oD3yBrOfDIIzsBMJBVoq9UJgRzxQJd4+EFcOvpPIPUX6gRHJefY0hvJldsZoU7JEN6xZIAXKBngVUuGKSLeOZE51+bhfxyZcE21/OXppS9vvgq1pvTTO/NDeOeSZ7Cxvjz8cR86cj4OLT0g5uPdwjx+DQrthSJNFpqtCM26IrQbHucuGZtHcutUcLbU6i7Jsx90dK/apKPhf35DI0lr/qA0X1Mteqx0qSdZjUPVKwHzignyhmXXZbNjoOaxUNZlPZ2K+Dzseu8k7I4aO1TzqAvdhkP1i43gI9heLIUq/uIYOw+1Qnr3BzI6+eNpgB2idc8lgI4fWn7ghLYXem37F2G89Ys=
Liquid level regulator
Re: Liquid level regulator
It's great you created a switch with a low and a high threshold. This is called a hysteresis. This is commonly used with a circuit that remembers its state to decide if it should apply the low or the high threshold, which is called RS-latch or SR-latch (SR = set/reset).
I don't want to disappoint you, but there is an easily understandable example of a RS-latch with hysteresis in the wiki that uses 3 combinators for this:
https://wiki.factorio.com/Tutorial:Circ ... er_version
It seems you didn't find out yet the purpose and the implications of a wire that feeds back an output to the input of a combinator, so it has its previous output as input and has some kind of memory this way. Your setup also has such a feedback loop, but it's somewhat obscured. Explore the behavior of combinators, especially their 1 tick latency that delays the input to the output. Use the map editor for this (start a new map in the creative mode scenario), because in map editor you can single step through ticks and investigate the circuit status after each single tick.
I don't want to disappoint you, but there is an easily understandable example of a RS-latch with hysteresis in the wiki that uses 3 combinators for this:
https://wiki.factorio.com/Tutorial:Circ ... er_version
It seems you didn't find out yet the purpose and the implications of a wire that feeds back an output to the input of a combinator, so it has its previous output as input and has some kind of memory this way. Your setup also has such a feedback loop, but it's somewhat obscured. Explore the behavior of combinators, especially their 1 tick latency that delays the input to the output. Use the map editor for this (start a new map in the creative mode scenario), because in map editor you can single step through ticks and investigate the circuit status after each single tick.
-
- Burner Inserter
- Posts: 6
- Joined: Sun Mar 17, 2024 3:27 pm
- Contact:
Re: Liquid level regulator
It's a wonderful approach - you did it yourself, respect for that. But there is always a simpler solution! I try to keep that in mind. Welcome to the forum; I'd be glad to follow your progress.Tomiket wrote: ↑Tue Mar 26, 2024 12:54 amSo I devised a controller that turns the pump on once the quantity is below 15000 (light oil for example) and keeps the pump on until the quantity is 19000 and then turns the pump off. Once the quantity drops below 19000 the pump will no longer turn on and will wait until the quantity drops below 15000 again.
Re: Liquid level regulator
I'm not disappointed.
I came up with it on my own and that makes me happy. ![Wink ;)](./images/smilies/icon_e_wink.gif)
This is hard for me, because I can work with logical 1 and 0. But signals are a different field for me, and it was hard to stop counting 0 as zero and realize that 0 is nothing.
The fact that the comparator of 1 and 0 = 0 is wrong because 0 doesn't exist and I have to make 0 as a signal, hence 1 (0 as 1-if the condition does not hold, then 0 is S1-thus illogical 1), which is outside the realm of my knowledge and way of thinking.
Thank you for your acceptance. However, there probably won't be much from me. Many of the solutions are simple and there is no point in publishing them in any way, as they would probably not help anyone or be useful.
If I'm making a mistake in the translation, please correct me.![Wink ;)](./images/smilies/icon_e_wink.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
This is hard for me, because I can work with logical 1 and 0. But signals are a different field for me, and it was hard to stop counting 0 as zero and realize that 0 is nothing.
The fact that the comparator of 1 and 0 = 0 is wrong because 0 doesn't exist and I have to make 0 as a signal, hence 1 (0 as 1-if the condition does not hold, then 0 is S1-thus illogical 1), which is outside the realm of my knowledge and way of thinking.
Thank you for your acceptance. However, there probably won't be much from me. Many of the solutions are simple and there is no point in publishing them in any way, as they would probably not help anyone or be useful.
If I'm making a mistake in the translation, please correct me.
![Wink ;)](./images/smilies/icon_e_wink.gif)
Re: Liquid level regulator
It's much easier to implement this with some chests or belts, inserters and a fish (or any item really).
For each oil refinery recipe you make one chest or belt piece and connect it to a pump. If the fish is in it the pump turns on. Then you add the inserters to move the fish between those positions according to your thresholds. The location of the fish makes it easy to see where the system is at and easy to follow how it changes.
Only drawback is that you can't blueprint the fish. You always have to place it manually (unless you add a requester chest to get the fish).
PS: It's even more fun with a crafting combinator (mod needed) so you change the recipe in the oil refinery instead of turning pumps on and off.
For each oil refinery recipe you make one chest or belt piece and connect it to a pump. If the fish is in it the pump turns on. Then you add the inserters to move the fish between those positions according to your thresholds. The location of the fish makes it easy to see where the system is at and easy to follow how it changes.
Only drawback is that you can't blueprint the fish. You always have to place it manually (unless you add a requester chest to get the fish).
PS: It's even more fun with a crafting combinator (mod needed) so you change the recipe in the oil refinery instead of turning pumps on and off.
Re: Liquid level regulator
When dealing with single signals you explicitly use in some condition, the vanishing of a signal with value=0 usually doesn't matter. A condition A=0 will just work and result as true, if A is 0 (or A is nothing) and A isn't appearing as signal. You can also check for A=B, and it will result in true, even if A and B are both 0 and actually vanished.
The vanishing of signals with value 0 becomes important if you use one of the * wildcards (EACH, ANYTHING, EVERYTHING), because for these wildcards only signals with value <> 0 are processed and considered for checking the condition. For example, the condition ANYTHING=0 always results in false, because only signals with a value are processed, and this means these signals are not 0, so it's false for all considered signals, so the wildcard result is false as well. For this case, the EVERYTHING operator comes in handy, because it has the special case that if there is no signal with a value, so every signal vanishes, it results in true no matter the actual condition. So if you check for EVERYTHING=0, it actually results in true if every signal is 0 because of the special case and in false, if any signal is not 0 because of the condition.
Re: Liquid level regulator
Your blueprint is difficult to understand for me because it's only logical 1 and 0 in value and name of signalsTomiket wrote: ↑Tue Mar 26, 2024 8:41 pmThis is hard for me, because I can work with logical 1 and 0. But signals are a different field for me, and it was hard to stop counting 0 as zero and realize that 0 is nothing.
The fact that the comparator of 1 and 0 = 0 is wrong because 0 doesn't exist and I have to make 0 as a signal, hence 1 (0 as 1-if the condition does not hold, then 0 is S1-thus illogical 1), which is outside the realm of my knowledge and way of thinking.
Thank you for your acceptance. However, there probably won't be much from me. Many of the solutions are simple and there is no point in publishing them in any way, as they would probably not help anyone or be useful.
![Smile :)](./images/smilies/icon_e_smile.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
![Laughing :lol:](./images/smilies/icon_lol.gif)
Maybe this is similar to what Tertius said, i'm not sure with translation. I notice none of the arithmetic combinator is used to do simple arithmetic operation, only bitwise logical operatio. When signals are 0 it is annoying to detect, but is is possible to detect if there is a signal that exist and is > 0 with the "ANYTHING>0" in decider combinator. i try an example :
Code: Select all
AND gate
A) S0 = 1 ; S1 = 0 ; S0*S1=0 ; Anything>0=> False
B) S0 = 1 ; S1 = 1 ; S0*S1=>1 ; Anything>0=> True
C) S0 = 0 ; S1 = 0 ; S0*S1=>0 ; Anything>0=> False
D) S0 = 0 ; S1 = 1 ; S0*S1=>0 ; Anything>0=> False
NAND gate
A-) S0 = 1 ; S1 = 0 ; S0*S1=>0 ; Everything=0=> True
B-) S0 = 1 ; S1 = 1 ; S0*S1=>1 ; Everything=0=> False
C-) S0 = 0 ; S1 = 0 ; S0*S1=>0 ; Everything=0=> True
D-) S0 = 0 ; S1 = 1 ; S0*S1=>0 ; Everything=0=> True
XOR gate
E)S0 = 1 ; S1=0 ; S0+S1=>1 (S2) ; S2=1=> True
F)S0 = 1 ; S1=1 ; S0+S1=>2 (S2) ; S2=1=> False
G)S0 = 0 ; S1=0 ; S0+S1=>0 (S2) ; S2=1=> False
H)S0 = 0 ; S1=1 ; S0+S1=>1 (S2) ; S2=1=> True
XNOR gate
E-)S0 = 1 ; S1=0 ; S0+S1=>1 (S2) ; S2 !=1=> False
F-)S0 = 1 ; S1=1 ; S0+S1=>2 (S2) ; S2 !=1=> True
G-)S0 = 0 ; S1=0 ; S0+S1=>0 (S2) ; S2 !=1=> True
H-)S0 = 0 ; S1=1 ; S0+S1=>1 (S2) ; S2 !=1=> False
OR gate
I)S0 = 1 ; S1=0 ; S0+S1=>1 (S2) ; S2>=1=> True
J)S0 = 1 ; S1=1 ; S0+S1=>2 (S2) ; S2>=1=> True
K)S0 = 0 ; S1=0 ; S0+S1=>0 (S2) ; S2>=1=> False
L)S0 = 0 ; S1=1 ; S0+S1=>1 (S2) ; S2>=1=> True
NOR gate
I-)S0 = 1 ; S1=0 ; S0+S1=>1 ; Everything<1=> False
J-)S0 = 1 ; S1=1 ; S0+S1=>2 ; Everything<1=> False
K-)S0 = 0 ; S1=0 ; S0+S1=>0 ; Everything<1=> True
L-)S0 = 0 ; S1=1 ; S0+S1=>1 ; Everything<1=> False
NOT ( inverter )
Decider S != 1 output "1"
Last edited by mmmPI on Fri Mar 29, 2024 8:36 am, edited 2 times in total.
Re: Liquid level regulator
Thank you for all this advice.
This is already too complicated for me and I would have to look at it in game and try it out to fully understand what it does. In any case, I will save this, and check it out as soon as I have time. ![Wink ;)](./images/smilies/icon_e_wink.gif)
As I wrote, signals are a different field, and I'm not used to having 1 add up, hence the very common feedback problem of not being able to reset the comparator state by bringing in a 1, because instead of resetting the XOR 1 and 1 = 0, it starts cycling to infinity when I have 15,000 1's on the input.
Again as I write, I can work with logical 1 and 0, that's why the S1 and S0 are used in the blueprint, it was easier to work with and understand what I was doing.![Wink ;)](./images/smilies/icon_e_wink.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
![Wink ;)](./images/smilies/icon_e_wink.gif)
As I wrote, signals are a different field, and I'm not used to having 1 add up, hence the very common feedback problem of not being able to reset the comparator state by bringing in a 1, because instead of resetting the XOR 1 and 1 = 0, it starts cycling to infinity when I have 15,000 1's on the input.
Again as I write, I can work with logical 1 and 0, that's why the S1 and S0 are used in the blueprint, it was easier to work with and understand what I was doing.
![Wink ;)](./images/smilies/icon_e_wink.gif)
Re: Liquid level regulator
I added the names of the gates in previous post after searching them on wikipedia, and built the XOR and XNOR as example maybe it helps.The XOR already exist in the arithmetic combinator with the AND and OR gates, i made a similar version with them.
I have attempted to use such gates to build a similar controller with no sucess so far.
I have attempted to use such gates to build a similar controller with no sucess so far.
Re: Liquid level regulator
This type of circuit you created is called "Schmitt trigger".