Results 1 to 10 of 10

Thread: Why is this pump turning on with this code?

  1. #1
    Regular Vistor
    Join Date
    Jan 2013
    Location
    Plano, TX
    Posts
    43

    Why is this pump turning on with this code?

    Fallback OFF
    Set OFF
    If Time 22:00 to 22:00 Then ON
    If Swx12_3 CLOSED Then OFF


    Swx12_3 is for sure 'closed', shows as such in the dashboard. The time is not 22:00:00 to 22:00:59 ... yet, this device turns on anyway.

    What am I missing here?

  2. #2
    Regular Vistor
    Join Date
    Jan 2013
    Location
    Plano, TX
    Posts
    43
    I do see now that the 22:00 to 22:00 is probably sending a 24 hour loop, not my 1 minute time as intended. But, shouldn't the switch being closed trump that anyway, since it is the last line in the programming?


    edit: and if i am correct about this 24 hour loop with 22:00 to 22:00; is there a way to just turn the device on for one minute? I could do a 21:59 to 22:00 with a 001:00 defer ON; but seems like there should be an alternative here...?

  3. #3
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,492
    Quote Originally Posted by Spar View Post
    edit: and if i am correct about this 24 hour loop with 22:00 to 22:00; is there a way to just turn the device on for one minute? I could do a 21:59 to 22:00 with a 001:00 defer ON; but seems like there should be an alternative here...?
    You are correct that you had what you called a loop. The outlet was On for 24 hrs and 1 minute.

    An explanation is found here https://forum.neptunesystems.com/sho...l=1#post114462

    Using the Defer is one way to do what you want.

    For that 1-minute ON time, you could do this instead:

    Fallback OFF
    Set OFF
    If Time 22:00 to 22:01 Then ON
    If Time 22:01 to 21:59 Then OFF
    If Sw12_3 CLOSED Then OFF
    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.

  4. #4
    Regular Vistor
    Join Date
    Jan 2013
    Location
    Plano, TX
    Posts
    43
    Seems adding the off times is the most practical. Thanks for the tip!


    Sent from my iPhone using Tapatalk

  5. #5
    Regular Vistor
    Join Date
    Jan 2013
    Location
    Plano, TX
    Posts
    43
    If I want the device to turn on twice during the day, but I want the code to be arranged so I can easily view the ON commands in order first, does the following work?
    ​remembering that my goal here is for the outlet to turn on for only 1 minute

    Fallback OFF
    Set OFF
    If Time 02:00 to 02:01 Then ON
    If Time 14:00 to 14:01 Then ON
    If Time 02:01 to 13:59 Then OFF
    If Time 14:01 to 01:59 Then OFF
    If Swx12_3 CLOSED Then OFF

    Also, should the code work just fine if I have the OFF lines just say 02:01 to 02:01 and 14:01 to 14:01? Mainly I am wanting to confirm that ultimately the way this is written is that the 'If Swx12_3 CLOSED Then OFF' will ensure the outlet is OFF if this statement is true, regardless of any time constraints.

  6. #6
    Frequent Visitor rkpetersen's Avatar
    Join Date
    Jun 2017
    Location
    Near Seattle
    Posts
    940
    That will work.
    With that approach, making further changes could be cumbersome, and easy to make a mistake.
    Here's how to do what you want with the Defer command mentioned above.

    Fallback OFF
    Set OFF
    If Time 02:00 to 02:01 Then ON
    If Time 14:00 to 14:01 Then ON
    Defer 001:00 Then ON
    If Swx12_3 CLOSED Then OFF

  7. #7
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by rkpetersen View Post
    That will work.
    With that approach, making further changes could be cumbersome, and easy to make a mistake.
    Here's how to do what you want with the Defer command mentioned above.

    Fallback OFF
    Set OFF
    If Time 02:00 to 02:01 Then ON
    If Time 14:00 to 14:01 Then ON
    Defer 001:00 Then ON
    If Swx12_3 CLOSED Then OFF
    Slight mistake...

    Fallback OFF
    Set OFF
    If Time 01:59 to 02:00 Then ON
    If Time 13:59 to 14:00 Then ON
    Defer 001:00 Then ON
    If Swx12_3 CLOSED Then OFF

    Sent from my SM-G965U using Tapatalk

  8. #8
    Frequent Visitor rkpetersen's Avatar
    Join Date
    Jun 2017
    Location
    Near Seattle
    Posts
    940
    Oh right, of course!

  9. #9
    Regular Vistor
    Join Date
    Jan 2013
    Location
    Plano, TX
    Posts
    43
    Why don't they provide us with the ability to set time by seconds? Has NS ever touched on that? Backend programming language issue probably?

  10. #10
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Quote Originally Posted by Spar View Post
    Why don't they provide us with the ability to set time by seconds? Has NS ever touched on that? Backend programming language issue probably?
    I haven't ever seen an official response and dont know the intricate details of the system, but it's likely something like a register length issue. Defer, OSC, when, min time, etc. are all limited to 16 hours and 40 minutes, so that limitation might be related to their choice to use only hours and minutes in time statements directly without additional code.

    Sent from my SM-G965U using Tapatalk

Similar Threads

  1. ATK pump not turning pump off
    By hmansbart in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 1
    Last Post: 02-06-2020, 21:33
  2. Turning on a pump for 1 hr only by a VO?
    By derekc in forum Misc Apex Usage & Programming
    Replies: 3
    Last Post: 01-21-2019, 08:18
  3. Could this code work to utilize my DOS as an ATO pump, and How would I add the code?
    By alexx2208 in forum DŌS & DDR – Dosing and Fluid Metering System
    Replies: 4
    Last Post: 08-17-2017, 08:56
  4. pump is not turning off
    By Danyalmon in forum Misc Apex Usage & Programming
    Replies: 18
    Last Post: 04-05-2016, 07:54
  5. HELP! Dosing pump not turning on
    By Jim West in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 5
    Last Post: 03-22-2016, 08:29

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
  •