Results 1 to 5 of 5

Thread: Unexpected results for 2-part dosing code

  1. #1
    Average Member don_chuwish's Avatar
    Join Date
    Jan 2013
    Location
    Southern Oregon
    Posts
    65

    Unexpected results for 2-part dosing code

    I'm having trouble keeping my 2 (BRS) dosers out of each other's way. At first I was using OSC to have them running within the same time window, but offset from one another by 1 hour:

    Alk:
    OSC 060:00/008:27/051:33 Then ON
    If Time 10:00 to 19:59 Then OFF

    Ca:
    OSC 000:00/008:27/111:33 Then ON
    If Time 10:00 to 19:59 Then OFF


    But I noticed in the logs that for some reason all went well until 04:00, when they both ran at the same time. Then they continued properly offset for the remainder of doses.

    So then I tried offsetting the window instead:

    Alk:
    OSC 000:00/008:27/111:33 Then ON
    If Time 11:00 to 20:59 Then OFF

    Ca:
    OSC 000:00/008:27/111:33 Then ON
    If Time 10:00 to 19:59 Then OFF

    Ca properly dosed at 20:00, but Alk did not go off at 21:00, instead it triggered at 22:00 - right with the 2nd Ca dose. They continued in sync all night.

    What key concept of OSC am I not getting right here?



    Thanks!
    don_chuwish
    Southern Oregon

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    The OSC is calculated from midnight regardless of what is around it. Offsetting is the way to go.

    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
    Your first code looks right. Each cycle is a total of 120 minutes, so they should not drift relative to one another. Did you change your time setting or enable/disable daylight savings time?

  4. #4
    Average Member don_chuwish's Avatar
    Join Date
    Jan 2013
    Location
    Southern Oregon
    Posts
    65
    Quote Originally Posted by Todd View Post
    Your first code looks right. Each cycle is a total of 120 minutes, so they should not drift relative to one another. Did you change your time setting or enable/disable daylight savings time?
    Thanks! I thought it looked correct too. ;-)
    No, no change to time setting or DST - it's always been set to automatically adjust for DST. I'm going to try a minor modification:

    Alk:
    OSC 060:00/008:27/051:33 Then ON
    If Time 11:09 to 19:59 Then OFF

    Ca:
    OSC 000:00/008:27/111:33 Then ON
    If Time 10:09 to 19:59 Then OFF

    Since Alk is getting a later start, I realized I need to give it an extra hour to finish an equal number of cycles. Plus, the :09 ensures the power isn't cut before 8:27 worth of dosing is done.
    don_chuwish
    Southern Oregon

  5. #5
    Average Member don_chuwish's Avatar
    Join Date
    Jan 2013
    Location
    Southern Oregon
    Posts
    65
    That seems to have done the trick. No more overlaps and equal number of dosing cycles between the two.
    don_chuwish
    Southern Oregon

Similar Threads

  1. Question: Optimised Schedule code to offset AWC and two part Dosing
    By ReefInTheDeep in forum DŌS & DDR – Dosing and Fluid Metering System
    Replies: 2
    Last Post: 05-05-2020, 17:47
  2. What is the minimum number of tests to get the best automated dosing results?
    By deputydog95 in forum Trident Marine Aquarium Water Analyzer
    Replies: 10
    Last Post: 07-03-2019, 03:07
  3. CA Reator Code - Not getting expected results
    By milonedp in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 08-20-2017, 14:17
  4. Dosing 2 Part
    By martyadamo in forum DŌS & DDR – Dosing and Fluid Metering System
    Replies: 17
    Last Post: 02-16-2016, 07:03
  5. Review My Program Another boring 2-part code
    By LobsterOfJustice in forum Apex Programming for Dosing, ATO, and AWC
    Replies: 2
    Last Post: 06-05-2013, 05:36

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
  •