Results 1 to 6 of 6

Thread: Defer statement - 2 times?

  1. #1
    Frequent Visitor
    Join Date
    Oct 2016
    Location
    Us, Pacific
    Posts
    91

    Defer statement - 2 times?

    Is it possible to have multiple defer statements?

    I want different defer times based on events
    If pH is > 8.25, I want to defer for 30 minutes

    If Output v71 or Clean, defer for 5 minutes


    Here’s my program for my skimmer

    Set ON
    Fallback ON
    If FeedA 000 Then OFF
    If FeedB 000 Then OFF
    If FeedC 000 Then OFF
    If FeedD 000 Then OFF
    If pH > 8.25 Then OFF
    Defer 030:00 Then ON
    If Output V71-Return = OFF Then OFF
    If Output Clean_Virt = ON Then OFF
    Defer 005:00 Then ON


    Sent from my iPad using Tapatalk

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    You have to seperate each defer condition to a virtual outlet and then combine them back in the outlet itself. Any one outlet can only use one defer.

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

  3. #3
    Frequent Visitor
    Join Date
    Oct 2016
    Location
    Us, Pacific
    Posts
    91
    Zombie,
    Thanks for your response.
    Let's see if I understand correctly.
    I'm going to create 3 new VOs.
    1. VO_pH
    2. VO_Clean
    3. VO_RetP


    Each VO will have a statement and defer contained within it.
    1. VO_pH
      1. If pH > 8.30 Then ON
      2. Defer 030:00 Then OFF

    2. VO_Clean
      1. If Output Clean_Virt = ON, Then Defer 005:00 (not sure if this syntax is correct or if Defer needs to be on it's own line). Also, I only want the Defer to happen after the Output changes state from ON to OFF.

    3. VO_RetP
      1. If Output V71-Return= OFF
      2. Defer 005:00 Then ON(same question as VO_Clean)


    Revised skimmer Output code:
    Set ON
    Fallback ON
    If FeedA 000 Then OFF
    If FeedB 000 Then OFF
    If FeedC 000 Then OFF
    If FeedD 000 Then OFF
    If Output VO_pH ???
    Here's where I'm stuck. I'm not sure what my statement should be.
    I think it should be If Output VO_pH = ON Then OFF
    If Output V71-Return = OFF Then OFF
    If Output Clean_Virt = ON Then OFF

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    The VOs need this format

    Set OFF
    (Triggering condition)
    Defer XXX:XX Then OFF


    You can actually get away with just one VO since two of the three conditions are 5 minutes by using a 25 minute defer on the pH VO and then add a global defer of 5 minutes to the skimmer with the other two conditions triggering it off directly.

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

  5. #5
    Frequent Visitor
    Join Date
    Oct 2016
    Location
    Us, Pacific
    Posts
    91
    Quote Originally Posted by zombie View Post
    The VOs need this format

    Set OFF
    (Triggering condition)
    Defer XXX:XX Then OFF


    You can actually get away with just one VO since two of the three conditions are 5 minutes by using a 25 minute defer on the pH VO and then add a global defer of 5 minutes to the skimmer with the other two conditions triggering it off directly.

    You might be an engineer if...You have no life and can prove it mathematically.
    Ok. I think I have this generally figured out.
    Now I’m stuck on having my skimmer defer turning on for 5 minutes if
    (1) I turn off my return pump outlet
    (2) if any of the 3 virtual outlets are triggered, to only use the defer in the VOs.

    My code is as follows.
    VOs
    Virt_Clean
    Set Off
    When ON > 060:00 Then OFF
    Defer 005:00 Then ON

    Virt_pH
    Set OFF
    If pH > 8.25 Then OFF
    Defer 030:00 Then ON

    Virt_Return
    If Output V71-Return OFF Then OFF
    Defer 005:00 Then ON

    Skimmer Outlet
    Set ON
    Fallback ON
    If Output V71-Return OFF Then OFF
    If Output Virt_Clean ON Then OFF
    If Output Virt_Return ON Then OFF
    Defer 005:00 Then ON
    (I only want this when OP V71-Return is triggered)


    Sent from my iPad using Tapatalk

  6. #6
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Make these changes.

    VOs
    Virt_Clean
    Set Off
    When ON > 060:00 Then OFF

    Virt_pH
    Set OFF
    If pH > 8.25 Then ON
    Defer 025:00 Then ON

    Skimmer Outlet
    Set ON
    Fallback ON
    If If Output V71-Return OFF Then OFF
    If Output Virt_Clean ON Then OFF
    If Output Virt_Return ON Then OFF
    Defer 005:00 Then ON



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

Similar Threads

  1. ATO defer statement help
    By mlewandowski61 in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 10
    Last Post: 05-28-2019, 18:13
  2. Question: Defer line statement?
    By Bob E in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 01-11-2016, 22:36
  3. Defer Statement
    By marksw in forum Misc Apex Usage & Programming
    Replies: 9
    Last Post: 12-06-2015, 12:16
  4. Defer statement
    By neptunetac in forum Apex Classic/Apex Lite/Apex Jr
    Replies: 4
    Last Post: 03-11-2013, 18:07
  5. Defer statement
    By Shatzi in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 1
    Last Post: 01-07-2013, 20:13

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
  •