Fluids Level Indicator by %'s!
Posted: Sun Oct 02, 2016 7:37 pm
So I finally got sick of trying to figure out which fluid is causing problems with production. So I setup a light indicator that can be seen from far away to let me know what I need to do to fix the problem. Each fluid is read from all tanks and turned into a percentage based on how much is missing. This is done by taking the amount of fluid and dividing it by the number of tanks (Arithmetic combinator equation - fluid/x output y, where x is the number of tanks). Then that number is divided by 25 to get a percentage (Arithmetic combinator equation - y/25 output z). Then each set of lights is turned on, using constant combinators for color, based on the integer "z" (the percentage of fluid in the tanks).
The lights are set to a factor of 10% for each row.
The bottom most row will flash red when z<10. This is accomplished by using 3 deciders. Input from Arithmatic - z<10 output A (1) -- Green connection to -- A<180 output A (input count), red connection from its own output to it's own input (this is a "tick counter") -- Green connection -- A>60 output A (1) -- Green connection back to the previous combinator, this resets the flash when the conditions of the fluid are no longer met -- Red Connection out from the "tick counter" to the row of lights -- Red connection to this row of lights ONLY -- Enable/Disable lights when A>60.
The rest of the rows of lights are as follows z<12-z<50 then z>50-z>98.
The top row will flash, using the same setup as the bottom, when z = 100.
Final result -
<<<<<<<<<<<<<<<<OLDER VERSION BELOW>>>>>>>>>>>>
The top and bottom most rows will flash Red when Fluid = 2500 or < 100 Respectively. The Storage tans are just indicators for each row. They are not connected to anything. I dumped a tiny bit of fluid into them just to get the icon to show up. You can easily connect them permanently and use them to read from. I am currently reading from 1 (the outer most) tank for each fluid. I was planning on reading total fluid but it would be much more complicated considering each fluid has a different number of tanks for storage. If there is any interest just let me know and I can get the string. This is an unmodded save so I dont have the string available atm.
EDIT: I am in the process of making this much more accurate. Will update when I'm done.
The lights indicate (from top to bottom) -
Flashing Red = 2500
Red > 2000
Yellow > 1600
Green > 1200
White - Constant
Green < 1200
Yellow < 800
Red < 400
Flashing Red < 100
The lights are set to a factor of 10% for each row.
The bottom most row will flash red when z<10. This is accomplished by using 3 deciders. Input from Arithmatic - z<10 output A (1) -- Green connection to -- A<180 output A (input count), red connection from its own output to it's own input (this is a "tick counter") -- Green connection -- A>60 output A (1) -- Green connection back to the previous combinator, this resets the flash when the conditions of the fluid are no longer met -- Red Connection out from the "tick counter" to the row of lights -- Red connection to this row of lights ONLY -- Enable/Disable lights when A>60.
The rest of the rows of lights are as follows z<12-z<50 then z>50-z>98.
The top row will flash, using the same setup as the bottom, when z = 100.
Final result -
<<<<<<<<<<<<<<<<OLDER VERSION BELOW>>>>>>>>>>>>
The top and bottom most rows will flash Red when Fluid = 2500 or < 100 Respectively. The Storage tans are just indicators for each row. They are not connected to anything. I dumped a tiny bit of fluid into them just to get the icon to show up. You can easily connect them permanently and use them to read from. I am currently reading from 1 (the outer most) tank for each fluid. I was planning on reading total fluid but it would be much more complicated considering each fluid has a different number of tanks for storage. If there is any interest just let me know and I can get the string. This is an unmodded save so I dont have the string available atm.
EDIT: I am in the process of making this much more accurate. Will update when I'm done.
The lights indicate (from top to bottom) -
Flashing Red = 2500
Red > 2000
Yellow > 1600
Green > 1200
White - Constant
Green < 1200
Yellow < 800
Red < 400
Flashing Red < 100