Results 1 to 15 of 15

Thread: Need Help writing code for my ATO

  1. #1
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14

    Need Help writing code for my ATO

    Good day people. I need some help writing code for my classic Apex Controller. I wanted my ATO to run pretty much 24/7. However I wanted it to automatically shut off every Sunday for about 5 minutes from 12pm to 12:05pm then turn back on. I have been messing wth the DoW command with no luck....HELP. 😀

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    I dont understand why that would be useful, but here is how to do it anyway.

    Create a VO

    SundayOFF
    Set OFF
    If Time 12:00 to 12:05 Then ON
    If DOW -MTWTFS Then OFF


    ATO
    (Existing code)
    If Output SundayOFF = ON Then OFF

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

  3. #3
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14
    I will try anything...Thanks dude I am going give it a shot. Hope it works.

  4. #4
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,489
    Why not just turn it off for that 5 minutes every day? Keep it simple...
    Please do not send me PMs with technical questions or requesting assistance - use the forums for Apex help. PM me ONLY if the matter is of a private or personal nature. Thanks.

  5. #5
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14
    I actually installed water change system to pump 5 gallons of fresh water every Sunday at Noon. I also have a submersible pump that pumps old water to my sewer line. I am just lazy and thought it would be cool to automate the entire process. I know I could write code to just have the ATO to turn off automatically around from 12pm to 12:05pm. Since the water out and water in is about approximately 4 mins total.

  6. #6
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14
    I tried your code and it's not working....

  7. #7
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by nautchilous View Post
    I tried your code and it's not working....
    That isn't helpful to just say something isn't working, especially since I know if it was done properly what I suggested works. What about it isn't working and what is your code after trying to incorporate what I suggested?

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

  8. #8
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14
    Since today is Thursday. I was trying to get it work today. This is the virtual outlet I created.

    VO
    AUTOCLEAN
    SET OFF
    IF TIME xx:xx to xx:xx Then ON
    DOW SMTW-FS Then OFF


    This is current code for My Tunze ATO

    Fallback OFF
    Set ON
    If FeedA 007 Then OFF
    If FeedB 007 Then OFF
    If Swx9_1 CLOSED Then OFF
    If Output Autofeed = ON Then OFF
    If Output AUTOCLEAN = ON Then OFF

    Your code makes perfect sense. Just not sure why the Virtual Outlet is not Turning on at the specific inputed times...I hope this help...Any suggestions would be greatly appreciated.

  9. #9
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14
    The VO is not turning on at the specific time needed.

  10. #10
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Does your clock match (ie only one clock in fusion) and is the VO in auto? I dont see a problem with the way you coded it. Perhaps accidentally writing the wrong time could have caused a problem too.

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

  11. #11
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14
    IMG_3288.jpg

    Here re is a image of my apex dash board. There seem to be two clocks on my dashboard and they seem to be 1hr apart. Not sure if that helps.

  12. #12
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    That's your problem then. Make sure you have the correct daylight savings time and UTC offset for your region and it should come on at the correct time.

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

  13. #13
    Frequent Visitor
    Join Date
    Jan 2016
    Location
    Cincinnati, ohio
    Posts
    709
    If your settings are correct, you might need to remove the internet from your apex unit for a minute then plug it back in. This forces it to reset the clock after the time change.

  14. #14
    New User
    Join Date
    Jun 2015
    Location
    U.S. , central time
    Posts
    14
    I unplugged the internet cord and did a reset. There is only one clock showing up on my dash board. Tried the code again and still not working.
    is there another code I could write for the ATO to turn off for 5 minutes on Sunday.
    i am getting close in giving up.

  15. #15
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by nautchilous View Post
    I unplugged the internet cord and did a reset. There is only one clock showing up on my dash board. Tried the code again and still not working.
    is there another code I could write for the ATO to turn off for 5 minutes on Sunday.
    i am getting close in giving up.
    That's the only way to do it besides linking it to the state of the AWC (which I couldn't help with or know if it would work at all without seeing that code). This AND That require a VO to work. Did you perhaps forget to change the DOW when testing it? If you left it the same as before and just changed the time, that could have stopped it from turning on.

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

Similar Threads

  1. Question: Need help with writing code
    By Reefya88 in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 3
    Last Post: 03-03-2017, 08:06
  2. Trouble writing code
    By Bob Millington in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 19
    Last Post: 12-02-2015, 13:38
  3. Trouble writing code
    By Bob Millington in forum Apex Programming for Lighting
    Replies: 1
    Last Post: 11-12-2015, 06:46
  4. Writing code for apex
    By Jtaylor1101 in forum APEX Fusion
    Replies: 4
    Last Post: 05-02-2015, 19:15
  5. code writing difficulties need Help!!
    By kk818 in forum APEX Fusion
    Replies: 3
    Last Post: 07-30-2014, 16:45

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
  •