Results 1 to 6 of 6

Thread: Code to prevent skimmer overflowing?

  1. #1
    New User
    Join Date
    Sep 2017
    Location
    Cincinnati, Ohio
    Posts
    13

    Code to prevent skimmer overflowing?

    I have had my skimmer overflow on me one too many times, and I want to try and use the high optical sensor on my ATK to turn off the skimmer when it is reached. Here is what I have so far:

    Fallback OFF
    Set ON
    If FeedA 000 Then OFF
    Defer 007:00 Then ON
    If ATO_HI CLOSED Then OFF
    Defer 007:00 Then OFF
    If Output Maintenance = ON Then OFF
    If Output ReturnPump = OFF Then OFF

    I am thinking that this will leave my skimmer in the OFF state even once the low optical sensor is reached, is this correct? To turn it back on would I have to add this below the second defer line?

    If ATO_HI OPEN Then ON
    Defer 003:00 Then ON

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    I would do this.

    Fallback OFF
    Set ON
    If FeedA 000 Then OFF
    If ATO_HI CLOSED Then OFF
    If Output Maintenance = ON Then OFF
    If Output ReturnPump = OFF Then OFF
    If Power Apex Off 001 Then OFF
    Defer 007:00 Then ON




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

  3. #3
    Frequent Visitor Todd's Avatar
    Join Date
    Jan 2013
    Location
    Huntsville, AL
    Posts
    583
    zombies is a good recommendation, but just to clarify some misconceptions that I see in your question: the DEFER statement applies to the entire outlet not the preceding statement, so multiple DEFERS of the same state don't work, the longest time prevails. So your proposed DEFER 003:00 Then ON would get overridden by the DEFER 007:00 Then ON. It doesnt matter where in the code they are placed, but for clarity I prefer them at the end. Also, your added ATO_HI OPEN command would be redundant to the SET ON. With a few exceptions, such as DEFER, the statements are evaluated top to bottom and any false statement is skipped. So by default, the outlet is ON unless one of the other statements changes it.

  4. #4
    New User
    Join Date
    Sep 2017
    Location
    Cincinnati, Ohio
    Posts
    13
    Thanks guys. This helps clear some things up. I am new to this so every little bit helps.

  5. #5
    Frequent Visitor
    Join Date
    Sep 2017
    Location
    Dayton, OH
    Posts
    58
    Are you sure you want the "Defer 007:00 Then OFF" in there? That means if any of the "OFF" conditions becomes true, it will wait 7 minutes to turn the Skimmer off. Just making sure. Zombie's omits it and generally is my preferred way to organize code....have your SET be the default and all the conditions follow that could turn it to the opposite of the SET. And putting DEFERs last since they are overarching.

  6. #6
    New User
    Join Date
    Sep 2017
    Location
    Cincinnati, Ohio
    Posts
    13
    Quote Originally Posted by rjkrejci View Post
    Are you sure you want the "Defer 007:00 Then OFF" in there? That means if any of the "OFF" conditions becomes true, it will wait 7 minutes to turn the Skimmer off. Just making sure. Zombie's omits it and generally is my preferred way to organize code....have your SET be the default and all the conditions follow that could turn it to the opposite of the SET. And putting DEFERs last since they are overarching.
    I was just taking a guess. I am new to coding, so I haven't got everything down pat. That makes sense though. I appreciate the explanation.


    Sent from my iPhone using Tapatalk

Similar Threads

  1. Review My Program Code for Skimmer
    By Iufan in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 06-25-2021, 15:24
  2. Skimmer Code
    By Fader in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 07-17-2019, 11:20
  3. Skimmer Code Problem
    By Charlie in forum Misc Apex Usage & Programming
    Replies: 8
    Last Post: 03-07-2018, 15:02
  4. Help! Sump overflowing
    By marito09 in forum Misc Apex Usage & Programming
    Replies: 4
    Last Post: 06-22-2017, 13:16
  5. Skimmer/Overflowing
    By SummitWynds in forum Misc Apex Usage & Programming
    Replies: 12
    Last Post: 07-26-2013, 03:12

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
  •