sum() function in Apex

k2-

Well-Known Member
View Badges
Joined
Oct 7, 2020
Messages
519
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
399
Reaction score
391
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
519
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
519
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,517
Reaction score
2,166
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
519
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,334
Reaction score
8,469
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
519
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) ?
 

HAVE YOU EVER KEPT A RARE/UNCOMMON FISH, CORAL, OR INVERT? SHOW IT OFF IN THE THREAD!

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top