Does the Apex "programming language" support variables?

dtruitt

Active Member
View Badges
Joined
Jan 2, 2020
Messages
492
Reaction score
303
Rating - 0%
0   0   0
Id like to set some BRS dosers up on my new Apex.

All of the examples I've seen set an outlet on between manually configured times. This is objectively not a good approach, and if this is the most "power" and "control" I get for $800, then the Apex is going back.

I would like to create a variable representing a total daily dose, specify a length of a photoperiod, and then calculate how long the dosers will need to run, and at which times, to achieve that total daily dose.

If the Apex "language" doesn't support variables and the most very basic math, is there a hobby grade controller that does?

My fallback is to snag an automation direct PLC, a few relays, and some probes and set up a little industrial control panel.
 

Tuffyyyyy

2500 Club Member
View Badges
Joined
Aug 16, 2016
Messages
2,603
Reaction score
3,133
Location
BHM
Rating - 0%
0   0   0
Its weird how aggressively you're attacking the apex, but the thing you're trying to accomplish is the most basic functionality built into the DOS.
 

GK3

Valuable Member
View Badges
Joined
Jan 16, 2017
Messages
1,852
Reaction score
1,339
Location
Cincinnati
Rating - 100%
2   0   0
Id like to set some BRS dosers up on my new Apex.

All of the examples I've seen set an outlet on between manually configured times. This is objectively not a good approach, and if this is the most "power" and "control" I get for $800, then the Apex is going back.

I would like to create a variable representing a total daily dose, specify a length of a photoperiod, and then calculate how long the dosers will need to run, and at which times, to achieve that total daily dose.

If the Apex "language" doesn't support variables and the most very basic math, is there a hobby grade controller that does?

My fallback is to snag an automation direct PLC, a few relays, and some probes and set up a little industrial control panel.
So you are a programmer by my guess from your comments. Apex is not built for raw programming. So to answer your question, no you cannot define X as a value and the manipulate x with functions. However, what you are trying to do can be done using the time function and OSC command.

if you are looking for a platform that is going to let you use any hardware and have absolute control over it, i’d recommend you look at reefpi. Apex works really well with Neptune products, but isn’t going to let you get into the nitty gritty and have full programming control. IMO, YMMV
 

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,216
Location
Oregon
Rating - 0%
0   0   0
Id like to set some BRS dosers up on my new Apex.

All of the examples I've seen set an outlet on between manually configured times. This is objectively not a good approach, and if this is the most "power" and "control" I get for $800, then the Apex is going back.

I would like to create a variable representing a total daily dose, specify a length of a photoperiod, and then calculate how long the dosers will need to run, and at which times, to achieve that total daily dose.

If the Apex "language" doesn't support variables and the most very basic math, is there a hobby grade controller that does?

My fallback is to snag an automation direct PLC, a few relays, and some probes and set up a little industrial control panel.

This site allows you to enter your desired amounts and it will calculate the appropriate Apex programming for you:

 
OP
OP
dtruitt

dtruitt

Active Member
View Badges
Joined
Jan 2, 2020
Messages
492
Reaction score
303
Rating - 0%
0   0   0
So you are a programmer by my guess from your comments. Apex is not built for raw programming. So to answer your question, no you cannot define X as a value and the manipulate x with functions. However, what you are trying to do can be done using the time function and OSC command.

if you are looking for a platform that is going to let you use any hardware and have absolute control over it, i’d recommend you look at reefpi. Apex works really well with Neptune products, but isn’t going to let you get into the nitty gritty and have full programming control. IMO, YMMV

OSC command looks a little less primitive than many examples Ive seen. Still not impressed, but I think I can live with that, at least for a bit.

I'm an industrial controls programmer.
 
OP
OP
dtruitt

dtruitt

Active Member
View Badges
Joined
Jan 2, 2020
Messages
492
Reaction score
303
Rating - 0%
0   0   0
Its weird how aggressively you're attacking the apex, but the thing you're trying to accomplish is the most basic functionality built into the DOS.

The DOS costs twice what the BRS pumps do. I dont get why they can include that feature for DOS, but not provide the tools to roll your own for third party pumps.

Ultimate goal would be automatic dose correction based on trident, reefbot, kh director, or similar.

To the best of my knowledge, that requires math even with trident and dos, no?

Trident can estimate corrections, but can't see a 0.1dKH change and increase or decrease by an exact amount to compensate based on additive strength and water volume.
 
Last edited:

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,216
Location
Oregon
Rating - 0%
0   0   0
I recently published a complete Apex Command Reference article. This will show you everything the Apex language supports. There are no variables.

 

robbyg

Valuable Member
View Badges
Joined
Sep 8, 2019
Messages
2,303
Reaction score
2,859
Rating - 0%
0   0   0
The DOS costs twice what the BRS pumps do. I dont get why they can include that feature for DOS, but not provide the tools to roll your own for third party pumps.

Because in general with all controllers while that may be a great tool for guys like you and me and others that can write code it would be useless for the vast majority of people. The second issue is that some people would try it and then wreck their tanks and claim that the controller did it without ever mentioning their own botched code.

Ultimate goal would be automatic dose correction based on trident, reefbot, kh director, or similar.

Well it can do that with the Trident and DOS combo and I think the GHL can do it with the KH director.

To the best of my knowledge, that requires math even with trident and dos, no?

Trident can estimate corrections, but can't see a 0.1dKH change and increase or decrease by an exact amount to compensate based on additive strength and water volume.

I think your over thinking this thing. The Apex has so far been able to handle these changes based on the readings pretty well. The .1dKH kind of thing is a rabbit hole that will lead you into chasing numbers non stop. It's also not realistic as all of this equipment in combination is not good enough to maintain that level of precision. My personal feeling is that all this stuff is just too new for me to trust it to do dosing automatically. So far it has worked for others but I am waiting it out to see if over the long term the systems hold up or do they sometimes just go south and screw up your tank.
For now I will keep changing my dosing levels manually when the numbers show they need to be changed and even then I confirm it with a manual Hanna test to make sure the Trident has not gone out of calibration.
 

Tastee

Valuable Member
View Badges
Joined
Oct 19, 2018
Messages
1,124
Reaction score
891
Location
Sydney, Australia
Rating - 0%
0   0   0
One further point for your information - the Apex does not use Boolean programming logic. It is a form of a state machine and knowing that helps when programming it. It is reasonably flexible however and the use of virtual outlets helps work around some of the state machine limitations (but not all). There are also some custom commands such as OSC to give it a little more flexiblity.
 

robbyg

Valuable Member
View Badges
Joined
Sep 8, 2019
Messages
2,303
Reaction score
2,859
Rating - 0%
0   0   0
One further point for your information - the Apex does not use Boolean programming logic. It is a form of a state machine and knowing that helps when programming it. It is reasonably flexible however and the use of virtual outlets helps work around some of the state machine limitations (but not all). There are also some custom commands such as OSC to give it a little more flexiblity.
Are you serious, its a "State Machine"! Oh Jezz that would explain why you have to jump through so many hoops to get it to do things that are simple for other controllers.
 

Rock solid aquascape: Does the weight of the rocks in your aquascape matter?

  • The weight of the rocks is a key factor.

    Votes: 10 8.1%
  • The weight of the rocks is one of many factors.

    Votes: 43 34.7%
  • The weight of the rocks is a minor factor.

    Votes: 39 31.5%
  • The weight of the rocks is not a factor.

    Votes: 31 25.0%
  • Other.

    Votes: 1 0.8%
Back
Top