Note From the Editor:
All of the articles in this series by the same author were originally part of several presentations made to a local aquarium club on programming your Neptune Apex Controller. The article is reprinted with permission from the author.
Because this topic will be of great interest to some readers but no interest to others who have not automated their systems, R2R will run these programming articles every Friday until we come to the end of the series.
Here is a quick Table of Contents for all the articles:
Part 1 Introduction
Part 2 Timers
Part 3 Automatic Top-Off Kit (ATK)
Part 4 Power Monitoring
Part 5 Virtual Outputs
Part 6 Alarms
Part 7 Feed Cycles
Part 8 Lunar Schedule and Lighting Profiles (Conclusion)
Photos, images, and diagrams included in this article below are all courtesy of the author, @SuncrestReef ©2019, All Rights Reserved.
~~~~~~~~~~~~~~~~~~~~~~~
Preface
I first learned of the Neptune Apex in January 2018 while I was researching how to set up an aquarium. I was a complete novice to reefing and aquariums in general. However, with my 30+ year career in IT systems and my love of all things automation, I realized I could leverage my technical background and the Apex to automate most functions on the aquarium.
When I received my Apex, I quickly discovered it was a bit different than other automation devices I have used. Neptune’s online documentation was a bit scattered and disjointed, and the programming language was different than all the widely used standards I was familiar with. I stumbled my way through the basic setup and learned a lot about advanced programming through trial and error while my tank was still cycling. Once I discovered the official Neptune Community Forums I found several examples of programming that helped me achieve what I wanted to build.
Over the past year I’ve become much more comfortable and proficient in Apex programming, and I've become a frequent contributor on the Neptune Community Forums and Neptune’s Apex Community Facebook group where I do my best to help answer questions posted by other confused users. From my observations of these forums the most common problems are with the ATK, timers, feed mode, and alerts.
I decided to write some tutorials which will hopefully fill in the blanks that Neptune’s documentation doesn’t fully spell out. All of the information I’ll provide is already publicly available, but hopefully the way I’ll present it will explain things more clearly and in a single location.
I’d like to thank Zombie and RussM, two of the most frequent contributors on the Neptune Community Forums. Most of the things I've learned were due to their replies to others or directly to my questions.
Here are some invaluable resources for Apex programming:
Introduction
Before I get into specific tutorials, I’d like to explain the basics of Apex programming. An Apex system consists of Modules, Inputs, Outputs, and Profiles:
The Apex evaluates each Output programming once per second, so when a condition changes it should react to that change within 2 seconds. It reads the list of program statements for each Output from top to bottom, and determines the state of the Output based on the last line of programming that evaluates as True. For example, if a heater has the following programming, and the water temperature is 77.9 F, here’s how the Apex will decide what to do:
If Tmp < 78.0 Then ON
If Tmp > 78.2 Then OFF
However, in this next example the water temperature is still 77.9 F, but there is an additional condition to be evaluated:
If Tmp < 78.0 Then ON
If Tmp > 78.2 Then OFF
If Output Maintenance = ON Then OFF
In this example, we have a virtual output named Maintenance that we turned on while performing routine maintenance on the tank. This could include water changes, cleaning out the sump, making plumbing repairs, or anything where you might not want the heater to come on since it may not be submerged in water.
In general, it’s always best to list the conditions that would turn ON and output first, then one by one list conditions that might turn it off.
You can rename each module, input, output, and profile. Using meaningful names will make programming and troubleshooting much easier, so I highly recommend renaming each component as the first step before you do any programming. However, if you decide to rename a component later, any existing programming will be automatically updated to reflect the new name.
For example, I have 3 FMM modules, so I named each one based on its function:
Inputs and Outputs can be displayed on the Apex or Fusion dashboard as “tiles”. Inputs display as a read-only item, meaning you cannot change its value. It only shows what the sensor or probe is measuring:
Outputs can be manually turned ON or OFF, or can be set to AUTO. If you manually set an output to ON or OFF, it will remain in that state until you manually change it. The output programming is only active when the output is set to AUTO, and the state of the output will be displayed above the tile:
This brief introduction only touches on the main points of Apex programming. For complete details including how to initially set up the Apex, modules, and configuring Fusion, see Neptune’s official documentation: https://www.neptunesystems.com/support/docs/
This series of articles will contain detailed tutorials on specific Apex programming topics, which I promise will be more entertaining than this dry introductory topic.
~~~~~~~~~~
We encourage all our readers to join the Reef2Reef forum. It’s easy to register, free, and reefkeeping is much easier and more fun in a community of fellow aquarists. We pride ourselves on a warm and family-friendly forum where everyone is welcome. You will also find lots of contests and giveaways with our sponsors.
~~~~~~~~~~~
Author Profile: @SuncrestReef
John Halsey is a reefing hobbyist who keeps a Red Sea Reefer XL 425 in his living room. He is new to reefing with just over one year of experience, but has been successful in keeping a healthy mixed reef by following best practices learned here on R2R as well as actively participating in his local aquarist club -- PNWMAS -- in Portland, Oregon. John retired from his 30-year career in IT support, and put that technical expertise to good use by automating much of his aquarium equipment with an extensive Neptune Apex system.
~~~~~~~~~~~
All of the articles in this series by the same author were originally part of several presentations made to a local aquarium club on programming your Neptune Apex Controller. The article is reprinted with permission from the author.
Because this topic will be of great interest to some readers but no interest to others who have not automated their systems, R2R will run these programming articles every Friday until we come to the end of the series.
Here is a quick Table of Contents for all the articles:
Part 1 Introduction
Part 2 Timers
Part 3 Automatic Top-Off Kit (ATK)
Part 4 Power Monitoring
Part 5 Virtual Outputs
Part 6 Alarms
Part 7 Feed Cycles
Part 8 Lunar Schedule and Lighting Profiles (Conclusion)
Photos, images, and diagrams included in this article below are all courtesy of the author, @SuncrestReef ©2019, All Rights Reserved.
~~~~~~~~~~~~~~~~~~~~~~~
Preface
I first learned of the Neptune Apex in January 2018 while I was researching how to set up an aquarium. I was a complete novice to reefing and aquariums in general. However, with my 30+ year career in IT systems and my love of all things automation, I realized I could leverage my technical background and the Apex to automate most functions on the aquarium.
When I received my Apex, I quickly discovered it was a bit different than other automation devices I have used. Neptune’s online documentation was a bit scattered and disjointed, and the programming language was different than all the widely used standards I was familiar with. I stumbled my way through the basic setup and learned a lot about advanced programming through trial and error while my tank was still cycling. Once I discovered the official Neptune Community Forums I found several examples of programming that helped me achieve what I wanted to build.
Over the past year I’ve become much more comfortable and proficient in Apex programming, and I've become a frequent contributor on the Neptune Community Forums and Neptune’s Apex Community Facebook group where I do my best to help answer questions posted by other confused users. From my observations of these forums the most common problems are with the ATK, timers, feed mode, and alerts.
I decided to write some tutorials which will hopefully fill in the blanks that Neptune’s documentation doesn’t fully spell out. All of the information I’ll provide is already publicly available, but hopefully the way I’ll present it will explain things more clearly and in a single location.
I’d like to thank Zombie and RussM, two of the most frequent contributors on the Neptune Community Forums. Most of the things I've learned were due to their replies to others or directly to my questions.
Here are some invaluable resources for Apex programming:
- Neptune Community Forums: https://forum.neptunesystems.com/forum.php
- Official Neptune Systems Apex Community Group:https://www.facebook.com/groups/neptunesystemscommunity/
- Apex Comprehensive Reference Manual:https://www.neptunesystems.com/downloads/docs/Comprehensive_Reference_Manual.pdf
Introduction
Before I get into specific tutorials, I’d like to explain the basics of Apex programming. An Apex system consists of Modules, Inputs, Outputs, and Profiles:
- Modules: The Apex base unit, Energy Bars, and a variety of add-on modules. Modules are physically connected to the Apex or each other by AquaBus or 1Link cables. Each module is automatically assigned an AquaBus address, from 1 to 49.
- Inputs: Temperature probes, pH probes, ORP probes, Conductivity (Salinity) probes, optical water level sensors, leak sensors, flow sensors, PAR sensors, Energy Bar watts and amps, Trident measurement readings. All Inputs are connected to ports on the Apex or add-on modules.
- Outputs: 120v (or 240v international) outlets, 24v DC outlets, 0-10v variable outputs, DOS pumps, WAVs, COR pumps, lights, auto feeders, virtual outputs. Outputs exist on the Apex base unit, Energy Bars, and add-on modules.
- Profiles: Pump profiles, dose profiles, lighting profiles, WAV profiles, ramp profiles, weather profiles. Profiles are used to apply pre-defined settings to an Output.
The Apex evaluates each Output programming once per second, so when a condition changes it should react to that change within 2 seconds. It reads the list of program statements for each Output from top to bottom, and determines the state of the Output based on the last line of programming that evaluates as True. For example, if a heater has the following programming, and the water temperature is 77.9 F, here’s how the Apex will decide what to do:
If Tmp < 78.0 Then ON
If Tmp > 78.2 Then OFF
- The first line evaluates True since the temperature is less than 78.0.
- The second line evaluates False since the temperature is not greater than 78.2.
However, in this next example the water temperature is still 77.9 F, but there is an additional condition to be evaluated:
If Tmp < 78.0 Then ON
If Tmp > 78.2 Then OFF
If Output Maintenance = ON Then OFF
In this example, we have a virtual output named Maintenance that we turned on while performing routine maintenance on the tank. This could include water changes, cleaning out the sump, making plumbing repairs, or anything where you might not want the heater to come on since it may not be submerged in water.
- The first line evaluates True since the temperature is less than 78.0.
- The second line evaluates False since the temperature is not greater than 78.2.
- The third line evaluates True because we turned on the Maintenance output.
In general, it’s always best to list the conditions that would turn ON and output first, then one by one list conditions that might turn it off.
You can rename each module, input, output, and profile. Using meaningful names will make programming and troubleshooting much easier, so I highly recommend renaming each component as the first step before you do any programming. However, if you decide to rename a component later, any existing programming will be automatically updated to reflect the new name.
For example, I have 3 FMM modules, so I named each one based on its function:
- FMM_LEAK = leak detectors
- FMM_FLOW = flow monitors
- FMM_ ATO = auto top off
- Tmp200 = temperature probe in your 200 gallon tank
- TmpFrg = temperature probe in your frag tank
- TmpMix = temperature probe in your mixing station
Inputs and Outputs can be displayed on the Apex or Fusion dashboard as “tiles”. Inputs display as a read-only item, meaning you cannot change its value. It only shows what the sensor or probe is measuring:
Outputs can be manually turned ON or OFF, or can be set to AUTO. If you manually set an output to ON or OFF, it will remain in that state until you manually change it. The output programming is only active when the output is set to AUTO, and the state of the output will be displayed above the tile:
This brief introduction only touches on the main points of Apex programming. For complete details including how to initially set up the Apex, modules, and configuring Fusion, see Neptune’s official documentation: https://www.neptunesystems.com/support/docs/
This series of articles will contain detailed tutorials on specific Apex programming topics, which I promise will be more entertaining than this dry introductory topic.
- Timers: OSC, If Time, DOW, Defer, When, and Min Time
- ATK programming and troubleshooting
- Power Monitoring
- Virtual Outlets
- Alerts
- Feed Modes
- Lunar Schedule and Lighting Profiles
~~~~~~~~~~
We encourage all our readers to join the Reef2Reef forum. It’s easy to register, free, and reefkeeping is much easier and more fun in a community of fellow aquarists. We pride ourselves on a warm and family-friendly forum where everyone is welcome. You will also find lots of contests and giveaways with our sponsors.
~~~~~~~~~~~
Author Profile: @SuncrestReef
John Halsey is a reefing hobbyist who keeps a Red Sea Reefer XL 425 in his living room. He is new to reefing with just over one year of experience, but has been successful in keeping a healthy mixed reef by following best practices learned here on R2R as well as actively participating in his local aquarist club -- PNWMAS -- in Portland, Oregon. John retired from his 30-year career in IT support, and put that technical expertise to good use by automating much of his aquarium equipment with an extensive Neptune Apex system.
~~~~~~~~~~~