Results 1 to 7 of 7

Thread: Check my ATK code

  1. #1
    New User
    Join Date
    Jul 2017
    Location
    Central standard
    Posts
    11

    Check my ATK code

    I am new to this and was wondering if someone could check the code for my ATK?
    I searched around and copied and pasted all of the code so if something looks wrong or missing please let me know.
    FeedB will be used for water changes.

    Fallback OFF
    Set OFF
    If ATO_Lo OPEN Then ON
    If ATO_Hi CLOSED Then OFF
    If ResLo OPEN Then OFF
    If FeedB 005 Then OFF
    If Power Apex Off 005 Then OFF
    When On > 002:00 Then OFF
    Defer 005:00 Then ON
    Defer 000:04 Then OFF
    Min Time 120:00 Then OFF

    I also removed the ATO_Hi email alert and created a High_H2O virtual outlet & alarm instead:

    High_H2O
    Set OFF
    If ATO_Hi CLOSED Then ON
    If Output RetPump = OFF Then OFF
    Defer 005:00 Then ON

    Email Alarm
    If Output High_H2O = ON Then ON

    I am also interested in having the ATO only kick on 1-2 times during the night as the tank is in my bedroom and the water discharge is fairly loud.

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Looks fine. Making it run less during the night could be accomplished with some if time statements placed just before the when statement.

    For example, stop at 10, dose at midnight, dose at 4am, resume normal at 8am (the defer would need to change to 4:59 instead of 5:00 to prevent pump lockout at night).

    If Time 22:00 to 23:59 Then OFF
    If Time 00:08 to 03:59 Then OFF
    If Time 04:08 to 07:59 Then OFF



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

  3. #3
    New User
    Join Date
    Jul 2017
    Location
    Central standard
    Posts
    11
    So if between 10:00pm and 8:00am I only want it to come on once at 3:00am,
    Is this correct:
    If time 20:00 to 23:59 then off
    If time 00:00 to 02:59 then off
    If time 03:30 to 08:00 then off
    Why does defer 5:00 cause a lockout?

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    For the above example you would want

    If Time 20:00 to 02:59 Then OFF
    If Time 03:07 to 08:00 Then OFF

    With a defer of 5:01

    Had a brain fart last night and did my math wrong. You want to change the defer so that it it can only run 1:59 so if it needs to run extra time because it's dosing less you don't have to deal with an if error email and the ATO being locked out in the middle of the night. It will wait to go into lockout and alert you until 8:02 if something happens at night.

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

  5. #5
    New User
    Join Date
    Jul 2017
    Location
    Central standard
    Posts
    11
    Ok, I think I understand now.
    Because of the statement:

    When On > 002:00 Then OFF

    If the pump is on greater than 2 minutes it will send me an error alarm and lockout the pump.

    I'll increase the runtime to 5 minutes for now and check my log to see how long the pump needs to run at night to keep up and then adjust it accordingly.

  6. #6
    New User
    Join Date
    Dec 2017
    Location
    Las Vegas, NV
    Posts
    7
    In the first post, what does the "Min Time 120:00 Then OFF" do?

  7. #7
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by toothdoc View Post
    In the first post, what does the "Min Time 120:00 Then OFF" do?
    That means when the outlet finishes a "dose" and changes from ON to OFF, it's not allowed to turn on again for at least 2 hours.

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

Similar Threads

  1. Help! Check my code!
    By jstross94 in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 07-28-2019, 18:05
  2. ATK with different pump code check
    By TerraReef in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 14
    Last Post: 11-06-2017, 16:20
  3. Please check my code...
    By alexkharden in forum Misc Apex Usage & Programming
    Replies: 4
    Last Post: 02-22-2016, 11:54
  4. ATONotRunning code check
    By ToLearn in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 5
    Last Post: 03-29-2015, 20:54
  5. Can someone check my code?
    By Railcar79 in forum Misc Apex Usage & Programming
    Replies: 29
    Last Post: 03-31-2014, 20:05

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
  •