Results 1 to 22 of 22

Thread: Power head off from 09:30 am to 05:45 pm from Monday to Saturday and on all day Sunday

  1. #1
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32

    Power head off from 09:30 am to 05:45 pm from Monday to Saturday and on all day Sunday

    Trying to figure out order of precedence of statements.

    I am trying to get my power head to turn off between 09:30 am and 05:45 pm and, to run all day Sunday !

    Can anyone gimme that code ?

  2. #2
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463

    Power head off from 09:30 am to 05:45 pm from Monday to Saturday and on all day Sunday

    Set ON
    If Time 09:30 to 17:44 Then OFF
    If DoW S——-Then ON

    (That’s 6 dashes after the S; my phone seems to be showing them run together)
    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.

  3. #3
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Of it is the reverse order that I thought. Corrected of time to 17:44 :-P

    Thank you RussM

  4. #4
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    Oops! Typo corrected.
    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
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Lets say I would like to keep the same program but, turn the power head back on at 16:45 on saturday only ?

    Sent from my SM-G950W using Tapatalk

  6. #6
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by Mobidoy View Post
    Lets say I would like to keep the same program but, turn the power head back on at 16:45 on saturday only ?

    Sent from my SM-G950W using Tapatalk
    You need virtual outlets for that.

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

  7. #7
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Quote Originally Posted by zombie View Post
    You need virtual outlets for that.

    You might be an engineer if...You have no life and can prove it mathematically.
    I did create a Virtual outlet and named it GyreSat which has the following code:

    Set Off
    IF Time 16:44 TO 17:44 Then ON
    IF DoW -MTWTF- Then OFF

    When I add this code in my main outlet (Gyre):

    Set ON
    If Time 09:30 to 17:44 Then OFF
    If GyreSat = ON Then On
    If DoW S------ Then ON

    I get this error message:

    /Error: line 3 - Valid keywords following If are Temp, pH, ORP, DO, Cond, Salt, Par, Feed, SwX, FLx, Error, Power, Sun, or Moon // If GyreSat = ON Then On

  8. #8
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    If Outlet GyreSat = ON Then ON


    ...forgot outlet.

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

  9. #9
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Great thank you. Wish it was Java or Python lol.

    Still learning the specifics of that rudimentary language.

    Zombie, if you read my code with the virtual outlet one, can you tell me what it will do so I can confirm my logic ?

    Sent from my SM-G950W using Tapatalk

  10. #10
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    The virtual outlet you have says turn on from 16:44 to 17:44 on Saturday and Sunday.

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

  11. #11
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Which of the 2 ? The one in the virtual outlet or the one for the main outlet.

    The Schedule I am trying to recreate is

    Monday to Friday:

    Gyre off from 9:30am to 5:44pm

    Saturday:

    Gyre off from 9:30am to 4:44pm

    Sunday:

    Run all day.

  12. #12
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Quote Originally Posted by zombie View Post
    The virtual outlet you have says turn on from 16:44 to 17:44 on Saturday and Sunday.

    You might be an engineer if...You have no life and can prove it mathematically.
    I did not bother to exclude Sunday in the virtual outlet DoW statement has the DoW statement of the main already turn it on all day Sunday.

  13. #13
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    I wpuld do this for that schedule.

    GyreSat
    Set OFF
    IF Time 16:45 TO 09:30 Then ON
    IF DoW SMTWTF- Then OFF

    Set OFF
    If Time 17:45 to 09:30 Then ON
    If DOW S-----S Then OFF
    If GyreSat = ON Then ON
    If DoW S------ Then ON

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

  14. #14
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Quote Originally Posted by zombie View Post
    I wpuld do this for that schedule.

    GyreSat
    Set OFF
    IF Time 16:45 TO 09:30 Then ON
    IF DoW SMTWTF- Then OFF

    Set OFF
    If Time 17:45 to 09:30 Then ON
    If DOW S-----S Then OFF
    If GyreSat = ON Then ON
    If DoW S------ Then ON

    You might be an engineer if...You have no life and can prove it mathematically.
    I will have to make a truth table for your code.

    At first look, it does not seem to achieve my goal

    Sent from my SM-G950W using Tapatalk

  15. #15
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    There is something wrong with the line

    If Outlet GyreSat = ON Then ON

    This virtual outlet seem to always evaluate to ON.

    I did remove everything out of it, only left the line Set OFF but, Gyre is turning on no matter what.

    If I remove The line

    If Outlet GyreSat = ON Then ON

    If turns OFF has it should.

    Anyone can figure out why ?

  16. #16
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Found it, well I think.

    no =

    If I put the equal sign it soes not work.

    but the line:

    If Outlet GyreSat OFF Then OFF works !

  17. #17
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    It still does not work.

    I Have simplified it to see what is wrong

    <Virtual Outlet GyreSat>

    Set Off
    If Time 16:45 To 17:45 Then ON
    IF DoW -MTWTF- Then OFF

    < Main Outlet GYRE >
    Set ON
    If Time 09:30 to 17:44 Then OFF
    If Outlet GyreSat = ON Then ON
    If Time 17:45 to 09:29 Then ON
    If DoW S------ Then ON

    So, Lets make evaluate all the lines one by one:

    Testing done Monday at 16:30

    Set ON ( So It should be ON )
    If Time 09:30 to 17:44 Then OFF (It is 16:30 so it should be OFF)
    If Outlet GyreSat = ON Then ON (OFF See line by line below)
    If Time 17:45 to 09:29 Then ON (It is 16:30 so, it stays OFF)
    If DoW S------ Then ON (Monday so, this should stay OFF)


    <Virtual Outlet GyreSat>

    Set Off (Virtual Outlet is OFF)
    If Time 16:45 To 17:45 Then ON ( It is 16:30 so it should stay OFF )
    IF DoW -MTWTF- Then OFF (We are Monday so it should be OFF )

    So final result is an OFF State but, the gyre outlet is on no mather what. Yes it is set on auto. If I Remove the line:

    If Outlet GyreSat = ON Then ON

    from the actual outlet (gyre) code, it stays off has it should be. Another thing I did notice is that when I save the code, it change the Outlet GyreSat for Output Gyresat

  18. #18
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Try my code in post 13. Note I changed the logic around in the main gyre code.

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

  19. #19
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Quote Originally Posted by zombie View Post
    Try my code in post 13. Note I changed the logic around in the main gyre code.

    You might be an engineer if...You have no life and can prove it mathematically.
    Yup. I went thru your code and it looks like what I am trying to achieve.

    Thank you

    Sent from my SM-G950W using Tapatalk

  20. #20
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Still having the same issue with your code or my code.

    If GyreSat = ON Then ON

    (I have fixed it to )

    It always evaluate to ON

    So. Tuesday 10:30 and the gyre is on when it should be off

    If I remove that line, it turns off as it should

  21. #21
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Is the gyre sat in auto? Copy paste the code here.

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

  22. #22
    Regular Vistor
    Join Date
    May 2017
    Location
    US, East
    Posts
    32
    Quote Originally Posted by zombie View Post
    Is the gyre sat in auto? Copy paste the code here.

    You might be an engineer if...You have no life and can prove it mathematically.
    Sorry never replied back. Yup it was the gyre sat that was not on auto

    Sent from my SM-G950W using Tapatalk

Similar Threads

  1. Question: Calendar every last Saturday
    By mfcphil in forum Misc Apex Usage & Programming
    Replies: 1
    Last Post: 04-03-2022, 07:38
  2. Power head programming
    By erroldejesus in forum Apex Classic/Apex Lite/Apex Jr
    Replies: 2
    Last Post: 04-04-2020, 13:40
  3. Question: Coordinate power head to turn on with DoS head
    By Nep16 in forum DŌS & DDR – Dosing and Fluid Metering System
    Replies: 3
    Last Post: 12-11-2018, 15:43
  4. Review My Program Early Sunday lighting program
    By Garron in forum Apex Programming for Lighting
    Replies: 3
    Last Post: 04-18-2016, 11:58
  5. Power Head Programming
    By tterrag24 in forum APEX Fusion
    Replies: 1
    Last Post: 11-01-2015, 07:56

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
  •