Results 1 to 10 of 10

Thread: Tell me what this code is doing - please check my brain

  1. #1
    NSI Member
    Join Date
    Nov 2013
    Location
    California
    Posts
    160

    Tell me what this code is doing - please check my brain

    Just a brain check

    OSC 120:00/004:00/110:00 Then ON


    Thanks!

  2. #2
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    It is turning the output ON for 4 minutes, then OFF for 330 minutes (120 + 110), then ON again for 4 minutes, OFF for 330, etc. in a non-stop repeating manner.
    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
    NSI Member
    Join Date
    Nov 2013
    Location
    California
    Posts
    160
    Perfect. Thanks!

  4. #4
    Frequent Visitor Todd's Avatar
    Join Date
    Jan 2013
    Location
    Huntsville, AL
    Posts
    583
    Additional bit of info. The first parameter is the offset from midnight. So the cycle will begin at 2:00 am.

  5. #5
    NSI Member
    Join Date
    Nov 2013
    Location
    California
    Posts
    160
    Thanks

    Could I use
    OSC 120:00/004:00 Then ON
    instead of
    OSC 120:00/004:00/110:00 Then ON
    or does it need the third parameter?

  6. #6
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    Quote Originally Posted by Todd View Post
    Additional bit of info. The first parameter is the offset from midnight. So the cycle will begin at 2:00 am.
    Not the case here.

    OSC does not reset or restart at midnight (a common misconception) The OSC timings are based on the time which has elapsed from an epoch date/time long in the past. If an OSC’s total cycle time is evenly divisible into 1440 minutes (24 hours), then it will give the appearance of having started at midnight.

    Thale’s OSC has a total cycle time of 334 minutes, which is not evenly divisible into 1440 minutes, so it will not be predictable when it occurs other than that each subsequent run will start 334 minutes after the previous run.
    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.

  7. #7
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    Thales, yes, all three duration parameters are required.
    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.

  8. #8
    Frequent Visitor Todd's Avatar
    Join Date
    Jan 2013
    Location
    Huntsville, AL
    Posts
    583
    Thanks for the clarification. I usually do mine based on a 24hr cycle, for that very reason.

  9. #9
    Frequent Visitor
    Join Date
    Jan 2016
    Location
    Cincinnati, ohio
    Posts
    709
    Quote Originally Posted by RussM View Post
    Thales, yes, all three duration parameters are required.
    You can set either the first or third parameter to 0:00 to 'ignore' it

  10. #10
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    The real question is how long do you want it to come on for, how often you want it to occur (period), and when do you want it to start (offset)

    The first value is your offset, the second is your ON time, and the sum of the three is your period.

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

Similar Threads

  1. Help! Check my code!
    By jstross94 in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 07-28-2019, 18:05
  2. Check my ATK code
    By Dougdstecklein in forum Fluid Monitoring Module (FMM), FMK, ATK, LDK, and FMM Accessories
    Replies: 6
    Last Post: 01-30-2018, 22:22
  3. Please check my code...
    By alexkharden in forum Misc Apex Usage & Programming
    Replies: 4
    Last Post: 02-22-2016, 11:54
  4. Email code check....
    By Evilbass in forum Networking & Internet Connectivity
    Replies: 2
    Last Post: 03-25-2015, 05:49
  5. Can someone check my code?
    By Railcar79 in forum Misc Apex Usage & Programming
    Replies: 29
    Last Post: 03-31-2014, 20:05

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
  •