Jump to content

Are there any flow-meters?


Recommended Posts

I put that into the suggestion forum ages ago, but does not seem to be happening anytime soon. What I am looking for is a mod where you put a device on a pipe or conveyor and then it counts what goes through, either until you reset it (logic input?) or for the last 1/2/3... cycles or set time intervals. Is there such a mod or maybe a mod with source code available that could be changed to do this?

Incidentally, is there some tutorial mod that takes you through the whole building process? I can code, but I never have used the tools ONI mods are built on.

Take a look in the unofficial discord. There's a modding channel in English that's pretty helpful. Mods are C# code done in Visual Studio. The game is based on the Unity Engine. Art/animation assets are made with Spriter (free version not pro). No mods do that sort of the thing right now. There was an idea floating around to have a sensor like that that would log data to a CSV file on disk that you could load into Excel to process things. Would be really cool to see it made.

9 hours ago, Gurgel said:

I put that into the suggestion forum ages ago, but does not seem to be happening anytime soon. What I am looking for is a mod where you put a device on a pipe or conveyor and then it counts what goes through, either until you reset it (logic input?) or for the last 1/2/3... cycles or set time intervals. Is there such a mod or maybe a mod with source code available that could be changed to do this?

Is it possible to use a valve, an overflow pipe, and a couple liquid sensors to do something similar?  Set the valve to the flow you want to test for.  If it goes above that, a liquid sensor trips.  A bridge reconnects the flows. 

If you're looking for a flow rate "Between X and Y" then add another valve to the first overflow and add a second overflow with another sensor.  Use an "AND" and a "NOT" gate so that while sensor 1 is green "AND NOT" sensor 2 green, then your output is true.  If flow is below sensor 1, then output is red.  If flow is above sensor 2, then output is red.  Otherwise output will be green.

This of course, assumes that the liquid is always flowing and not backed up.  You could add a filter gate to control a shutoff valve to do something such as "if the flow is above this point for X amount of time, turn off the flow." 

Since you're wanting to count up to a certain amount, you could put a liquid sensor on the main line after the valve and overflow, as well as on the overflow.  When the main line sensor trips, you know you've got something more than zero.  If the second trips, then you know you've got "at least" your valve setting flowing.  You can use filters as timers to trip after a given amount of time and thus give yourself a ballpark amount.  More overflows and valves would give you more precise results.  If you're wanting a more precise amount, you could set a shutoff in front of everything with a liquid sensor.  When the sensor detects liquid, it waits for X amount of time, then opens the shutoff.  A valve and overflow after that point would keep the shutoff open as long as there's flow in the overflow. You can then set a timer for however many full packets you want and close a shutoff after the flows rejoin.  With a couple more valves you could dial-in a precise amount.  Set the first valve (with overflow) to, say 499.9.  Then have a valve set on the overflow to 0.1, with another overflow that loops back to the main pipe.  Set a filter gate to stay open X seconds and you'll have X packets of 500g flowing in your pipe -- provided your main pipe can guarantee an average of at least 500g/s for the amount of packets you want.  If you only want full packets, then have your shutoff close the moment your first overflow (with the 0.1g/s valve) no longer has liquid in it.

Not a mod, but a solution. Use a liquid reservoir connected to a liquid output that has a flow rate of 1g/s, coupled with a liquid shutoff. If the solid transport gate is active, activate the liquid shutoff. Have this output liquid to a block with a hydro sensor. Say you want to move 500 items through a solid transport conveyor. Accounting for offsets and latency for liquid flow/solid transport lines, you can monitor the amount of items transported via the hydro sensor, and send a signal once a target threshold has been reached. Once reached, send the signal to a buffer gate to pump the liquid back to the reservoir, clearing the chamber of any remaining liquid to reset your measurements. Two of these systems side by side, oscillating via control of an and gate on each and a memory sensor between them, should make for reducing latency between measurement periods.

Haven't tried it yet, but could work.

1 hour ago, KittenIsAGeek said:

Is it possible to use a valve, an overflow pipe, and a couple liquid sensors to do something similar?  Set the valve to the flow you want to test for.  If it goes above that, a liquid sensor trips.  A bridge reconnects the flows. 

If you're looking for a flow rate "Between X and Y" then add another valve to the first overflow and add a second overflow with another sensor.  Use an "AND" and a "NOT" gate so that while sensor 1 is green "AND NOT" sensor 2 green, then your output is true.  If flow is below sensor 1, then output is red.  If flow is above sensor 2, then output is red.  Otherwise output will be green.

This of course, assumes that the liquid is always flowing and not backed up.  You could add a filter gate to control a shutoff valve to do something such as "if the flow is above this point for X amount of time, turn off the flow." 

Since you're wanting to count up to a certain amount, you could put a liquid sensor on the main line after the valve and overflow, as well as on the overflow.  When the main line sensor trips, you know you've got something more than zero.  If the second trips, then you know you've got "at least" your valve setting flowing.  You can use filters as timers to trip after a given amount of time and thus give yourself a ballpark amount.  More overflows and valves would give you more precise results.  If you're wanting a more precise amount, you could set a shutoff in front of everything with a liquid sensor.  When the sensor detects liquid, it waits for X amount of time, then opens the shutoff.  A valve and overflow after that point would keep the shutoff open as long as there's flow in the overflow. You can then set a timer for however many full packets you want and close a shutoff after the flows rejoin.  With a couple more valves you could dial-in a precise amount.  Set the first valve (with overflow) to, say 499.9.  Then have a valve set on the overflow to 0.1, with another overflow that loops back to the main pipe.  Set a filter gate to stay open X seconds and you'll have X packets of 500g flowing in your pipe -- provided your main pipe can guarantee an average of at least 500g/s for the amount of packets you want.  If you only want full packets, then have your shutoff close the moment your first overflow (with the 0.1g/s valve) no longer has liquid in it.

If you want the same with pictures I did make a post about it a year ago

 

On 1/15/2020 at 3:49 PM, KittenIsAGeek said:

Is it possible to use a valve, an overflow pipe, and a couple liquid sensors to do something similar? 

It is pretty simple: Set a value that just slowly drains the pipe behind the valve and then set one that is just enough to fill the pipe back to the valve. It is tedious, takes a lot of time and can only deal with non-changing flows reliably, but it works.

On 1/15/2020 at 5:02 PM, Goosebutt said:

Not a mod, but a solution. Use a liquid reservoir connected to a liquid output that has a flow rate of 1g/s, coupled with a liquid shutoff.

I have used reservoirs to measure flow or count things. It works but is just too much of a hassle. 

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...