Results 1 to 12 of 12

Thread: Help with code to setup an AWC with two pumps

  1. #1
    New User
    Join Date
    Apr 2013
    Location
    washington, dc
    Posts
    12

    Help with code to setup an AWC with two pumps

    I have been racking my brain and sifting through the posts to find a similar setup to mine. I haven't found a setup that is close enough (or that I can modify to make into my own code). I have two pumps (SW_OUT_PMP and SW_IN_PMP) for my water changes. I also have my ATK and then I have 3 additional optical sensors. One in the new saltwater (NSW_LO) to stop water changes if there isn't enough water to perform a water change. The two remaining sensors are in the sump. One is set low to turn off the pump that pumps the water out of the sump(AWC_LO) and a failsafe to prevent from overfilling (AWC_HI).

    What I would like to do is at a specific time (ie 7pm each night) have my ATK turn off, then turn SW_OUT_PMP a set amount of time to pump water out. Followed by the SW_IN_PMP to pump new saltwater back in. I can create virtual outlets, but wasn't sure what to make them for. Can the sensors that the ATK uses be set as a backup to the AWC_LO or AWC_HI? I want to build in enough fail safes to prevent any issues, but not make it too complicated. I can also have the pumps run for a combination of time and use the optical sensors too. Just not sure how to compile all the code together.

    Any help would be appreciated!

    Thank you!

  2. #2
    New User
    Join Date
    Apr 2013
    Location
    washington, dc
    Posts
    12
    Would this code work?

    My optical sensors are:

    NSW_LO = low new saltwater to indicate a water change should not be done if the sensor is open
    Awc-Lo = Low sensor to stop water from being pumped out
    Awc-Hi = High sensor for fail safe

    ATO_pump = ato pump should be turned off during water change

    Will this code work?
    Auto Water Change virtual outlet:

    AWC
    Fallback OFF
    Set OFF
    If Time 19:00 to 11:01 Then ON
    If Awc-Lo Open Then OFF
    If Awc-Hi Closed Then OFF

    SW_OUT_PMP
    Fallback OFF
    Set OFF
    If Output AWC = ON Then ON


    SW_IN_PMP
    Fallback OFF
    Set OFF
    If Output AWC = ON Then ON
    Defer 002:00 Then ON
    If Awc-Lo Open Then ON
    If Awc-Hi Closed Then OFF

  3. #3
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    No. You need something along the lines of this as a starting point. Example assumed fill and remove take like 2 or 3 minutes each. Also assumes up is OPEN on floats and covered is closed for opticals.

    StartAWC
    Set OFF
    If Time 18:59 to 19:00 Then ON
    If AWC_LO CLOSED Then OFF
    If AWC_HI OPEN Then OFF
    If ATO_HI CLOSED Then OFF
    If Output ATOstuckCL = ON Then OFF
    Defer 001:58 Then ON
    Min Time 010:00 Then ON

    ATOstuckCL
    Set OFF
    If ATO_LO CLOSED Then ON
    Defer 240:00 Then ON

    StopDrain
    Set OFF
    If Output StartAWC = ON Then ON
    Defer 005:00 Then ON

    Drain
    Fallback OFF
    Set OFF
    If Output StartAWC = ON Then ON
    If Output StopDrain = ON Then OFF
    If AWC_LO CLOSED Then OFF

    Fill
    Fallback OFF
    Set OFF
    If Output StopDrain = ON Then ON
    If AWC_HI OPEN Then OFF
    If ATO_LO CLOSED Then OFF
    If ATO_HI CLOSED Then OFF



    Sent from my SM-G965U using Tapatalk

  4. #4
    New User
    Join Date
    Apr 2013
    Location
    washington, dc
    Posts
    12
    Thanks Zombie,

    I am assuming the first three are virtual outlets? So another question. I have three virtual outlets that monitor the state of the neptune optical sensors. The virtual outlets are either On or OFF depending on whether the sensors are open or closed.

    I named the 3 virtual outlets:
    VO_AWC_LO = monitors the state of the AWC_LO sensor
    VO_AWC_HI = monitors the state of the AWC_HI sensor
    VO_ATO_HI = monitors the state of the ATO_HI sensor on the ATO

    and in any of my statements I should be referencing the virtual outlets instead of the optical sensors (except for the actual virtual outlets that monitor the state of the sensors). So none of the sensors names should be in any of the other programming?

    Is that correct?

    So my virtual outlets are:
    StartAWC
    VO_AWC_LO
    VO_AWC_HI
    VO_ATO_HI
    StopDrain
    VO_ATO_LO
    StartAWC
    VO_AWC_LO
    VO_AWC_HI
    VO_ATO_HI
    StopDrain
    VO_ATO_LO




    My program is:
    StartAWC
    Set OFF
    If Time 18:59 to 19:00 Then ON
    If Output ATOstuckCL = ON Then OFF
    Defer 001:58 Then ON
    Min Time 010:00 Then ON

    Fill
    Fallback OFF
    Set OFF
    If Output StopDrain = ON Then ON
    If Output VO_AWC_HI = OFF Then OFF
    If Output VO_ATO_LO = ON Then ON
    If Output VO_ATO_HI = ON Then OFF

    Drain
    Fallback OFF
    Set OFF
    If Output StartAWC = ON Then ON
    If Output StopDrain = ON Then OFF
    If Output VO_AWC_LO = ON Then OFF

    ATOstuckCL
    Set OFF
    If ATO_LO CLOSED Then ON
    Defer 240:00 Then ON

  5. #5
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    No need to use your VOs for the switch status unless you want the ability to force a state if you know something failed. The only news for the VOs is if you want to log the switch states.

    Sent from my SM-G965U using Tapatalk

  6. #6
    New User
    Join Date
    Apr 2013
    Location
    washington, dc
    Posts
    12
    Ok. Good because it was getting confusing.

    If I don't have those virtual outlets then I am getting an error when I try to enter the code:

    //Error: line 3 - Valid keywords following If are Temp, pH, ORP, DO, Cond, Salt, Par, Feed, SwX, FLx, Error, Power, Sun, or Moon // If AWC_LO CLOSED Then OFF

    I figured out the error. It was because of AWC_LO being case sensitive. I changed it to Awc_Lo and it worked.

  7. #7
    Frequent Visitor 2mk's Avatar
    Join Date
    Dec 2017
    Location
    US, EASTERN TIME
    Posts
    125
    I am having a really hard time trying to make this work. Can anyone here review my programming to see if I am doing this right?

    Help needed to program my Apex DOS with Breakout Box and floaters for AWC (Purchased the Breakout Box with 2 Float Switches from BRS using it on Apex Fusion)


    My Goal: Use the Apex DOS to change 5 gallons of water over a 7 days period
    -------
    My Apex Programming now are:

    *Left DOS Pump (New Salt Water Reservoir 5 gallon bucket full; float switch placed at the bottom of bucket):

    Interval data: Start 00:00 | End 23:59 | Action: Add | Volume: 2703.8ml

    Fallback OFF
    tdata 00:00:00,1,21,0,189,2,88,143,0,200,2,28,10,0
    If Sw1 CLOSED Then OFF
    If Sw2 CLOSED Then OFF



    -------
    *Right Dos Pump (Old Salt Water Container 5 Gallon empty; float switch placed at the top of bucket):

    Interval data: Start 00:00 | End 23:59 | Action: Remove | Volume: 2703.8ml

    Fallback OFF
    tdata 00:00:00,1,5,0,189,2,88,143,0,200,2,28,10,0
    If Sw1 CLOSED Then OFF
    If Sw2 CLOSED Then OFF


    ----------------

    My Email Alarm settings:

    Set OFF
    If Error ATKpmup_4_1 Then ON
    If Swx4_2 CLOSED Then ON
    If Swx4_3 CLOSED Then ON
    Defer 000:30 Then ON
    If Tmp > 82.0 Then ON
    If Tmp < 75.0 Then ON
    If Salt > 37.0 Then ON
    If Salt < 32.0 Then ON
    If pH > 8.40 Then ON
    If pH < 7.80 Then ON
    If ORP > 450 Then ON
    If ORP < 200 Then ON
    If Sw1 CLOSED Then ON
    If Sw2 CLOSED Then ON


    ------------

    My questions are: Are the Highlighted and Underlined on/off statements correct?
    Also is my Volume of 2703.8ml correct to accomplish the 5 gallon change over 7 days?

    Any other suggestions to make this programming more efficient greatly is appreciated.
    When You're a NOOB, You need lots of help all the time

  8. #8
    Frequent Visitor
    Join Date
    Mar 2015
    Location
    San Jose,CA
    Posts
    528
    What is the error or problem you are having?


    Sent from my iPhone using Tapatalk Pro

  9. #9
    Frequent Visitor 2mk's Avatar
    Join Date
    Dec 2017
    Location
    US, EASTERN TIME
    Posts
    125
    Thanks for the reply vhung168,

    I am trying to determine if these statements are correct:

    The lines below in the left and right DOS:

    If Sw1 CLOSED Then OFF
    If Sw2 CLOSED Then OFF

    Will the above lines allow both left and right pumps to run when the reservoir bucket is full, while the waste reservoir is empty?
    And will the above lines stop both left and right pumps when the resevoir is empty while the waste reservoir is full?



    And the line below in the email alarm

    If Sw1 CLOSED Then ON
    If Sw2 CLOSED Then ON


    Will the above line trigger the alarm?

    Apex suggested to use these lines when using a breakout box with float switches. The program does work but i don't know if that is how I program the float switches to prevent accidents of pumping water out of tank while pumping nothing into the tank when the reservoir bucket is empty.
    When You're a NOOB, You need lots of help all the time

  10. #10
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by 2mk View Post
    Thanks for the reply vhung168,

    I am trying to determine if these statements are correct:

    The lines below in the left and right DOS:

    If Sw1 CLOSED Then OFF
    If Sw2 CLOSED Then OFF

    Will the above lines allow both left and right pumps to run when the reservoir bucket is full, while the waste reservoir is empty?
    And will the above lines stop both left and right pumps when the resevoir is empty while the waste reservoir is full?



    And the line below in the email alarm

    If Sw1 CLOSED Then ON
    If Sw2 CLOSED Then ON


    Will the above line trigger the alarm?

    Apex suggested to use these lines when using a breakout box with float switches. The program does work but i don't know if that is how I program the float switches to prevent accidents of pumping water out of tank while pumping nothing into the tank when the reservoir bucket is empty.
    Assuming you have them plugged into those switch inputs and have verified that they both close when empty and full respectively, then yes.

    Sent from my SM-G965U using Tapatalk

  11. #11
    Frequent Visitor 2mk's Avatar
    Join Date
    Dec 2017
    Location
    US, EASTERN TIME
    Posts
    125
    Quote Originally Posted by zombie View Post
    Assuming you have them plugged into those switch inputs and have verified that they both close when empty and full respectively, then yes.

    Sent from my SM-G965U using Tapatalk

    Thanks Zombie. I will try it with the float switches this time. cause I did not do not dare to try to use settings I do not understand fully.
    When You're a NOOB, You need lots of help all the time

  12. #12
    Frequent Visitor 2mk's Avatar
    Join Date
    Dec 2017
    Location
    US, EASTERN TIME
    Posts
    125
    Quote Originally Posted by 2mk View Post
    Thanks for the reply vhung168,

    I am trying to determine if these statements are correct:

    The lines below in the left and right DOS:

    If Sw1 CLOSED Then OFF
    If Sw2 CLOSED Then OFF

    Will the above lines allow both left and right pumps to run when the reservoir bucket is full, while the waste reservoir is empty?
    And will the above lines stop both left and right pumps when the resevoir is empty while the waste reservoir is full?



    And the line below in the email alarm

    If Sw1 CLOSED Then ON
    If Sw2 CLOSED Then ON


    Will the above line trigger the alarm?

    Apex suggested to use these lines when using a breakout box with float switches. The program does work but i don't know if that is how I program the float switches to prevent accidents of pumping water out of tank while pumping nothing into the tank when the reservoir bucket is empty.
    Finally Done. An update for future member setup.

    Code is totally correct as suggested by Neptune, except they did not mention the floaters' orientations. By default, the Madison Floaters I bought are in the (APEX BREAKOUT BOX) "CLOSED" state when the the floater is not floating/up position (with the wires facing up). In order to make it work, you have to flip the waste water floater upside down while the Reservoir floater right side up, to trigger a open then closed state.

    Or, if your floaters are reversible, reverse the open / closed orientation on one of the floaters to have both floaters having a right side up (wire facing up) orientation if desired.
    When You're a NOOB, You need lots of help all the time

Similar Threads

  1. HELP with AWC using two level sensors and two pumps
    By Rui Manuel Gaspar in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 0
    Last Post: 09-24-2021, 08:17
  2. setup AWC
    By risk1994 in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 9
    Last Post: 08-25-2021, 07:30
  3. AWC with pumps
    By antstank in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 23
    Last Post: 07-15-2019, 08:56
  4. Question: AWC Programming - Aqualifter Pumps
    By Reeferdave01 in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 2
    Last Post: 12-22-2016, 08:13
  5. Help! AWC I am having with my code
    By ralgiere in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 0
    Last Post: 05-22-2015, 10:07

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
  •