Looking for help wiring in the gas venting pump

Some mods, made by Bob. Basically streaks every Factroio-area.

Moderator: bobingabout

Post Reply
Scrat
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 16, 2019 12:43 am
Contact:

Looking for help wiring in the gas venting pump

Post by Scrat »

Hello all!

hoping someone here will be able to help me with this. I am trying to turn on a pump to vent excess gas away (in this case hydrogen and oxygen) but I cant figure out the wiring. Anyone willing to lend a hand? my goal is:

1) If the oxygen is full but the hydrogen isnt, then I would like to run the venting pump for the oxygen
2) If the Hydrogen is full but the Oxygen isnt, then I would like to run the venting pump for the hydrogen
3) If both tanks are full, then run neither pumps

Eventually I would implement this for oil refining and other liquid products, but If pointed in the right direction, I can probably figure that out.

Thanks for the help!

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Looking for help wiring in the gas venting pump

Post by bobingabout »

I've not tested this but...
connect inputs of 2 storage tanks (1 oxy 1 hydrogen) to the inputs of 2 logic compare units (I forgot names, been about 3 months since I played)
You want to compare hydrogen = tank capacity (or >= what you want to consider full, because getting beyond 99% is hard, I usually consider 80% full, so that's 20k on a MK1 storage tank, or 80k on a MK4) and output 1 hydrogen. do the same for oxygen.
you then also want to feed those outputs into the inputs of 2 more logic compare units. if hydrogen > oxygen, then output 1 hydrogen, if oxygen > hydrogen then output 1 oxygen.
Since the inputs of this pair can only be a 0 or a 1, then in the case of both being 0, you get nothing, if both are a 1, you also get nothing, but if either is a 1 and the other is 0, you only get the one 1.
Connect the output of those logic gates to your 2 pumps, on the hydrogen vent pump, you can do hydrogen > 0 or hydrogen = 1, and it'll turn on when it's at that level. Be aware that the vent itself can't connect to the logic network, so you have to use a pump to pump into the vent. do the same, oxygen >0 or oxygen = 1 on the oxygen pump.

EDIT:
and after writing this... in theory, after the first pair of logic compare units, you can just put if hydrogen > oxygen on the hydrogen venting pump, because that will only turn on specifically if hydrogen is 1 and oxygen is 0, so you don't need the second pair of logic units.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

plussantana
Inserter
Inserter
Posts: 33
Joined: Sun Aug 18, 2019 7:22 pm
Contact:

Re: Looking for help wiring in the gas venting pump

Post by plussantana »

think about the most basic, you have it, now set up a circuit with the conditionals (if) of what you want to do so that 0 is true and one is false. in this case. look at this tutorial that I leave you below


Scrat
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 16, 2019 12:43 am
Contact:

Re: Looking for help wiring in the gas venting pump

Post by Scrat »

bobingabout wrote:
Sat Nov 16, 2019 1:08 am
I've not tested this but...
connect inputs of 2 storage tanks (1 oxy 1 hydrogen) to the inputs of 2 logic compare units (I forgot names, been about 3 months since I played)
You want to compare hydrogen = tank capacity (or >= what you want to consider full, because getting beyond 99% is hard, I usually consider 80% full, so that's 20k on a MK1 storage tank, or 80k on a MK4) and output 1 hydrogen. do the same for oxygen.
you then also want to feed those outputs into the inputs of 2 more logic compare units. if hydrogen > oxygen, then output 1 hydrogen, if oxygen > hydrogen then output 1 oxygen.
Since the inputs of this pair can only be a 0 or a 1, then in the case of both being 0, you get nothing, if both are a 1, you also get nothing, but if either is a 1 and the other is 0, you only get the one 1.
Connect the output of those logic gates to your 2 pumps, on the hydrogen vent pump, you can do hydrogen > 0 or hydrogen = 1, and it'll turn on when it's at that level. Be aware that the vent itself can't connect to the logic network, so you have to use a pump to pump into the vent. do the same, oxygen >0 or oxygen = 1 on the oxygen pump.

EDIT:
and after writing this... in theory, after the first pair of logic compare units, you can just put if hydrogen > oxygen on the hydrogen venting pump, because that will only turn on specifically if hydrogen is 1 and oxygen is 0, so you don't need the second pair of logic units.
Awesome! thank you! now to apply this same tech to my oil and petroleum tanks! :)

Scrat
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Nov 16, 2019 12:43 am
Contact:

Re: Looking for help wiring in the gas venting pump

Post by Scrat »

Also, I love these mods. first map with all the new ores and chemicals and now my head hurts. Love it! feeling like I need to go back to school though for this

Post Reply

Return to “Bob's mods”