sum() function in Apex

k2-

Well-Known Member
View Badges
Joined
Oct 7, 2020
Messages
513
Reaction score
283
Location
Los Angeles
Rating - 0%
0   0   0
Hey Guys,
Is there any way to use sum or other mathematical functions in apex ? I want to write some custom code using flow sensors ? My thought process is to implement using 2 manual pumps and flow sensors to introduce auto water change.
 

All_talk

Active Member
View Badges
Joined
Oct 8, 2019
Messages
398
Reaction score
387
Location
Thorp, WA
Rating - 0%
0   0   0
I suspect there is a way to use the flow meters to set the state of virtual outlets to and us those VO to trigger actions.

There is some discussion of logic in these threads...


 
OP
OP
k2-

k2-

Well-Known Member
View Badges
Joined
Oct 7, 2020
Messages
513
Reaction score
283
Location
Los Angeles
Rating - 0%
0   0   0
Thanks, I am aware of this functionality my aim is to do something like this :

take the sum of flow rates (which is quite accurate to the .X) and sum it for a time period for both ingoing water way and out going water way using an FMM and auto turn the pumps on / off based on how much water i want to change.
 
OP
OP
k2-

k2-

Well-Known Member
View Badges
Joined
Oct 7, 2020
Messages
513
Reaction score
283
Location
Los Angeles
Rating - 0%
0   0   0
Yeah the method they use is quite inaccurate - perhaps a perasaltic pump style AWC might be a way to go but I am not very fond of those noisey ones.
 

Vivid Creative Aquatics

Upgrade Your Flow!
View Badges
Joined
Oct 12, 2017
Messages
1,386
Reaction score
1,941
Location
Phoenix, AZ
Rating - 0%
0   0   0
As @Lbrdsoxfan said, I would not trust the output of a flow sensor - to many factors that effect the actual reading.

And, as far as I know the program language is pretty limited when it comes to doing math. You can do things like test the state of outlets and inputs - true/false sorts of things.

I also believe you can test against the Neptune liquid level sensor (LLS) for a specific values or readings such as greater than or less than.

With some creative programing, you may be able to measure water height /level with the LLS to control pumps that remove or add water to the system.
 
OP
OP
k2-

k2-

Well-Known Member
View Badges
Joined
Oct 7, 2020
Messages
513
Reaction score
283
Location
Los Angeles
Rating - 0%
0   0   0
Yeah ! That was my option B but i want to stop this non sense of 10 different wires and sensors dangling from the tank everytime we do a water change or worse permanently attached to tanks. my target will be to build something which my wife can use (best user experience will be put 2 hoses in the tank and press a button for predefined value - will be cool to have a number associated e.g. amount of gallon but thats it). Looks like Reef-pi might be to the rescue for such advanced - WIll continue to look though.
 

Lbrdsoxfan

5000 Club Member
View Badges
Joined
Jun 13, 2021
Messages
5,076
Reaction score
8,048
Location
Long Beach, CA
Rating - 0%
0   0   0
What about just using a DOS for awc? I get there may be reasons to avoid, but frankly that's the easiest way to play nice with a apex.

Like you said the peristaltic pump is the way to go for absolute measurements but I get what your saying about noise and etc...
 
OP
OP
k2-

k2-

Well-Known Member
View Badges
Joined
Oct 7, 2020
Messages
513
Reaction score
283
Location
Los Angeles
Rating - 0%
0   0   0
I guess sensor with FMM might be a nicer way to go and i can build something which is less clunky. Question do we have any larger solenoid valves (1/2 inch or 3/4 inch) from neptune or any way to connect larger solenoid valves to the neptune system (12V etc) ?
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 46 16.5%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 18 6.5%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.4%
  • I wear reef gear primarily to relax where I live.

    Votes: 35 12.6%
  • I don’t wear gear from reef brands.

    Votes: 159 57.2%
  • Other.

    Votes: 19 6.8%
Back
Top