Results 1 to 18 of 18

Thread: Apex programming code

  1. #1
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22

    Apex programming code

    Hello all I am wrapping up a new build and have a quick question. I'm not much of a programmer and I've been reading this site everyday looking as to where I might find this info. I'm looking for a where I can find the programming language to set up my apex. I have 2 energy bars a fmm module with 2 leak detection probes and the ATO kit by neptune and a Fire tablet as the control screen. I want to be Be able to use it to the fullest potential and have only really figured out how to activated heartbeat and get put my info in for notifications. Thanks in advance !

  2. #2
    Frequent Visitor
    Join Date
    Jan 2016
    Location
    Cincinnati, ohio
    Posts
    709
    In the Neptune links above is the comprehensive resource manual. It's a great way to learn how to program

  3. #3
    NSI Member eschulist's Avatar
    Join Date
    Nov 2015
    Location
    Minneapolis, MN USA
    Posts
    467
    To get started open up Apex Fusion. Use the unlock button at the top right to access any unused modules or sensors you want to see. Once on your dashboard you can hit the little gear icon above each to access their coding and rename them to something more logical.

    For instance on mine I renamed the sensors ATK_Lo (Low optical sensor), ATK_Hi (High Optical Sensor), ATK_Le (Solid surface leak sensor), and ATK_Em (ATO Reservoir empty optical sensor). Once you have them renamed go to the top of the dashboard and click the Task button. It looks like 2 documents. This is the auto setup for your ATK. It will put in the most universal settings. Once you have that complete do the task setup for your leak sensors.

    After the code is generated you can hit the gear icon on the ATK module itself and see the code that it generates.

    Code:
    Fallback OFF
    Set OFF
    If ATK_Lo OPEN Then ON
    If ATK_Hi CLOSED Then OFF
    If ATK_L1 CLOSED Then OFF
    If ATK_L2 CLOSED Then OFF
    When On > 005:00 Then OFF
    Defer 000:10 Then ON
    Defer 000:04 Then OFF
    Min Time 060:00 Then OFF
    What does this mean?
    Fallback OFF and Set OFF means it starts in an off state and if there is an issue with the Apex itself it defaults to OFF
    Things like Fallback ON and Set ON would be good for things like your return pump, you want it to constantly go even if the Apex losses communication.

    The rest of the code is all about the sensors and various delays and failsafes.

    When the ATK_Lo is open it means its not sensing water so that the ATK will turn on.
    All of the other sensors tell it to turn the ATK back off if the water level rises too high and hits the top sensor or it the leak sensors detect water. If any 3 of them touch water the ATK will not turn on.

    The next lines of code are delays and safety things. When ON > 5:00 means it prevents your ATK from running longer than 5 minutes. In a freak situtation where it runs for 5 minutes and the sensors still arent turning it off, the Apex will turn the ATK and actually slide the tile from Auto to OFF. This means it can never turn back on until you manually slide it back to auto.

    The Defer statement tell the ATK to wait 10 seconds before turning the pump on. The bottom sensor needs to be exposed for a full 10 seconds before it starts. The Defer :04 tells the ATK that once it activates it stays active for a full 4 seconds. This prevents slight fluctuations from triggering it on and off very rapidly. And the last line says the ATK will only run once per hour.

    After you know what all of that does you can of course adjust the code specifically for your tank. Here is some of the code I altered to work for me.

    Code:
    Fallback OFF
    Set OFF
    If ATK_Lo OPEN Then ON
    If ATK_Hi CLOSED Then OFF
    If ATK_Le CLOSED Then OFF
    If ATK_Em OPEN Then OFF
    If FeedA 005 Then OFF
    If FeedB 005 Then OFF
    If Power Apex Off 005 Then OFF
    When On > 000:30 Then OFF
    Defer 003:00 Then ON
    Defer 000:04 Then OFF
    Min Time 060:00 Then OFF
    I have an empty reservoir sensor that turns the ATK off when it senses that its empty. When the Feed Modes are active I don't want the ATK to turn on, and when the feed mode end I want to delay any possible top offs for 5 minutes. This prevents top offs from happening when pumps and skimmers are restarting. The same is for when the Apex turns back on after a power loss. I want it to make sure the water has restabilized and is adding the correct amount of evaporation that was lost during that outage.

    My When command is really low as I run this on a nano aquarium. My usual top offs last about 5 seconds. If it ran for 30 seconds something really went wrong but its not enough to flood my sump. If I left in the default code of 5 minutes my sump might actually overflow with that much water and my top off reservoir would be empty. My Defer 3:00 instead of :10 means the bottom sensor needs to be exposed for 3 minutes before it tops off. This further prevents accidental top offs when Im screwing around in the sump.

    Most of the coding for your pumps, lights, etc can be generated automatically by selecting that piece of equipment when setting up its outlet. Further code can be generated by using the Task feature for things like Skimmers and return pumps. Once those are setup you can access their outlet gear icon and see the advance code its creating. This can always be altered to your needs and saved at the top right.

    Good luck with your new Apex

  4. #4
    Frequent Visitor
    Join Date
    Mar 2017
    Location
    US, Central
    Posts
    355
    Since you are still new at this, make sure you complete the "Getting Started" guide before you jump feet first into that Comprehensive Guide.
    https://www.neptunesystems.com/getstarted/apexng/

    The slow down and tackle your tasks one at a time. If you think you can pick this up in a few weeks and just program the whole thing, you will be greatly disappointed and/or overwhelmed. There will be errors, you will find bugs that don't work, etc. Just start with what feature is most important to you and program that part first. Then work out from there. This is my advise. Most importantly, enjoy it.

  5. #5
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22
    Thanks for all the great info. One thing I'm still having trouble with is the clock. I have auto time update enabled with DST turned off and -5 set as I am eastern standard time in New York. My clock on my dash board displays 2 times. One is the my local time which is correct the other is the "Apex " time which is and hour behind. Everything I tired dosnt correct the time. I turned on DST and it made it worse , i also adjusted the off setting and it made it worse. Can anyone help?

  6. #6
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22

  7. #7
    Frequent Visitor
    Join Date
    Mar 2017
    Location
    US, Central
    Posts
    355
    Yep, mine does the same thing. I have the DST feature turned off as I don't want my tank to adjust the time used on the programming. I use seasonal settings for my lighting and I have my tank set 2 hours behind with DST and auto turned off. This results in two times in Fusion. If you do want to sync the tank with your current time, then you have to enable both Auto Clock and DST.

  8. #8
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22
    Thank you everyone so much for the great info. I've been reading all the guides and taking it slow. I'm still overwhelmed by this dashboard and what all the different switches are / do would anyone be able to break down what I'm looking at in this dashboard? IMG_0104.jpgIMG_0105.jpg

    Theres 2 FMM modules hooked up one of them has the apex ATK connected to it and 2 leak detection probes. The second FMM has nothing in it yet but I do have 2 optical sensors ordered one to go in the ato container for a low water alarm/ shutoff and the other probably in the sump.

  9. #9
    Frequent Visitor
    Join Date
    Mar 2017
    Location
    US, Central
    Posts
    355
    You are looking at the Dashboard in the "unlocked' mode. This allows you to add blocks, delete blocks and rearrange blocks. The frame at the top highlighted in blue contains all the blocks that are currently not in your dashboard. This is a great place to store unused outlets, probes, switches, etc. Just drag and drop to add them or rearrange them. Click/press the 'X' to delete them. Really that simple, like rearranging apps on your iPhone, except folders are not support (future suggestion btw!).

    Unfortunately I have not had the pleasure of playing with FMMs yet. I do plan to though.

  10. #10
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22
    This is driving me insane I can't for the life of Me get the clocks to sync it's always am hour off and felt like I've tried everything. IMG_0107.jpg

  11. #11
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22
    Quote Originally Posted by clsanchez77 View Post
    You are looking at the Dashboard in the "unlocked' mode. This allows you to add blocks, delete blocks and rearrange blocks. The frame at the top highlighted in blue contains all the blocks that are currently not in your dashboard. This is a great place to store unused outlets, probes, switches, etc. Just drag and drop to add them or rearrange them. Click/press the 'X' to delete them. Really that simple, like rearranging apps on your iPhone, except folders are not support (future suggestion btw!).

    Unfortunately I have not had the pleasure of playing with FMMs yet. I do plan to though.
    Ok and what about the switches on the left side that start with SW what do all those do ?

  12. #12
    Frequent Visitor
    Join Date
    Mar 2017
    Location
    US, Central
    Posts
    355
    Quote Originally Posted by curryb15 View Post
    Ok and what about the switches on the left side that start with SW what do all those do ?
    Nothing yet There is a break out box you can purchase as an additional accessory and this plugs into the mini-DIN port on the Apex base unit; All PM-1 and PM-2 modules have them as well. On the break out box, you can attach any non-powered normally closed switch, such as panel switches, push buttons, float valves, door sensors, etc. You can use normally open as well, but the Dashboard and Classic displays will be reverse intuitive as the interface shows "Closed" as normal and "Open" to be noticeable. Programming is the same either way.

    Traditional uses include using float switches to shut off pumps, turn on ATO's, sound alarms, etc. Or using toggle switches to manually turn on/off some device. Or you can use a push button or momentary switch to setup a 'Feed' or 'Maintenance' mode without having to interface with the Apex. Or a door contact sensor for turning on cabinet lighting. And many other uses.

    The device must be non-powered through the Apex (separate and isolated power source will work).

    You can custom create a device and build your own DIN-8 cable, but the break out box makes it much easier.

  13. #13
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by curryb15 View Post
    This is driving me insane I can't for the life of Me get the clocks to sync it's always am hour off and felt like I've tried everything. IMG_0107.jpg
    Do you have it offset -5 and DST on? Are you in the same time zone as your tank?

    You might be an engineer if...You have no life and can prove it mathematically.

  14. #14
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22
    Quote Originally Posted by zombie View Post
    Do you have it offset -5 and DST on? Are you in the same time zone as your tank?

    You might be an engineer if...You have no life and can prove it mathematically.
    Yes I have the offset -5 DST on and I'm in the same time zone

  15. #15
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22
    Quote Originally Posted by clsanchez77 View Post
    Nothing yet There is a break out box you can purchase as an additional accessory and this plugs into the mini-DIN port on the Apex base unit; All PM-1 and PM-2 modules have them as well. On the break out box, you can attach any non-powered normally closed switch, such as panel switches, push buttons, float valves, door sensors, etc. You can use normally open as well, but the Dashboard and Classic displays will be reverse intuitive as the interface shows "Closed" as normal and "Open" to be noticeable. Programming is the same either way.

    Traditional uses include using float switches to shut off pumps, turn on ATO's, sound alarms, etc. Or using toggle switches to manually turn on/off some device. Or you can use a push button or momentary switch to setup a 'Feed' or 'Maintenance' mode without having to interface with the Apex. Or a door contact sensor for turning on cabinet lighting. And many other uses.

    The device must be non-powered through the Apex (separate and isolated power source will work).

    You can custom create a device and build your own DIN-8 cable, but the break out box makes it much easier.
    And where could I find devices that work with a breakout box ? Esp the sound alarm and door sensors ?

  16. #16
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by curryb15 View Post
    And where could I find devices that work with a breakout box ? Esp the sound alarm and door sensors ?
    The breakout box is inout only. You cannot power a sound alarm with it.

    Door sensors can be purchased lots of places. You can find them in the big box stores security section or online by looking for "magnetic reed door"

    You might be an engineer if...You have no life and can prove it mathematically.

  17. #17
    Regular Vistor
    Join Date
    Jun 2017
    Location
    Long Island NY
    Posts
    22
    Need some help with alarms. I'm trying to set and alarm for a optical sensor that will ,trigger when the water is low In the ATO , an optical sensor in the sump when the water level is to high in the sump , and 2 leak detection probes. I know the stitches work as when I test them I can see them opening and closing on the dash bored. I programmed the code in the Emailalm category but it never generates a notification or alarm when I test it

    - - - Updated - - -

    IMG_0835.jpgIMG_0836.jpg

  18. #18
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,254
    Your screen shots show that the Email alarm is on. Did you setup your email and phone number for notifications? Click the pulldown arrow next to your username at the top right of the screen and then click settings. Then choose Notifications on the left side. Make sure your e-mail and or phone number are listed there and have a check in the box on the right side of them.

Similar Threads

  1. Review My Program Need Help Converting Pseudo Code To APEX Code
    By bpeders1 in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 07-24-2022, 16:13
  2. UV programming code
    By Sarge Lausage in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 09-23-2021, 04:31
  3. Programming code for LDK
    By marineboy in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 25
    Last Post: 04-18-2020, 13:35
  4. Help! Help With Programming Code
    By Saltmeup in forum Apex Classic/Apex Lite/Apex Jr
    Replies: 3
    Last Post: 03-31-2016, 18:40
  5. Tracking Apex Programming (code) changes
    By tdunmore2 in forum Misc Apex Usage & Programming
    Replies: 4
    Last Post: 02-04-2016, 05:22

Tags for this Thread

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •