Results 1 to 9 of 9

Thread: Lighting program with seasonal table

  1. #1
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,257

    Lighting program with seasonal table

    I have read a ton of threads and discussion on the use of the seasonal tables and the If Sun/ If Moon functions for the Apex. What I can't find is anyone explaining in detail the actual specifics of the commands as well as what the limits are.

    For instance what is the largest value allowed for sunrise and sunset offset times? is it 999 due to the three digits or something smaller? I see a ton of examples using 360 or 600 but can these go higher?

    What if I don't want to modify the default season table and just want to make my code work with it with longer offsets?

    I found the limit on the ramp time value by accident. I was trying to do a very long and slow ramp and tried to enter something over 255. When I updated the outlet is changed the value to (value - 255).

    Also why does the sunset statement come before the daytime statement?

    What is the relationship between the three statements?

    For instance:
    Wht_LED (varspd outlet. Use for both white channels)
    Fallback OFF
    Set OFF
    If Sun 240/-120 Then Wht_Up This starts the profile 4 hours after sunrise and ramps down 2 hours before sunset. but why do we need to specify a rampdown setting if the next profile is going to run before the ramp down?
    If Sun 600/180 Then Wht_Down This starts the profile 10 hours after sunrise and ramps down 3 hours after sunset. Is the sunset ramp down time derived from the ramp time in the Profile?. is 10 hours after sunrise the same as sunset equal to 000 as seen in the Daytime statement below?
    If Sun 360/000 Then Wht_Day This starts the profile 6 hours after sunrise and ramps down at sunset. Is the 360 number a combination of the Wht_Up sunrise offset + the ramp time of Wht_Up?

    If my morning ramp up time and night ramp down time are the same does that mean that I could complete this same effect using two statements? Like below?

    If Sun 240/180 Then Wht_Up
    If Sun 360/000 Then Wht_Day

    Are all of these details posted or written somewhere that I haven't found? There has to be more to it than just copying the examples on the forum or using the calculator on reeftronics (which didn't work for me because I wanted longer ramp times and not knowing I couldn't do more than 255). Help! Krazie

  2. #2
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    All of the details are located in the comprehensive users manual. I believe the limit is 999, but the CRM will say for certain.

    This is how the if sun statement works

    If Sun XXX/YYY Then Profile

    means run the profile "Profile" from XXX minutes after current sunrise time to YYY minutes after the current sunset time.


    You cant combine a sunrise and sunset into one line and profile. The reason is that the sunrise profile goes from a low intensity to a high intensity, whereas the sunset profile goes from a high value to a low value. That requires two seperate profiles: one that ramps up and another that ramps down.

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

  3. #3
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,257
    I combed through the CRM multiple times and have not found anything on limits or relationships. I would have thought the ramp limit was 999 as well but it's 255 and that is not in the CRM either.

    So if the profile is a ramp up then what is the point of the sunset number in the statement? What does it actually do?

    What about the relationships with the numbers between the statements? How are they derived?

    Krazie

  4. #4
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    The thing to remember is that the apex executes statements one at a time, and the last one to be true is the one that "sticks" that particular second. The trick is to overlap them in a way that turns on the particular profile only during the time you want it active.

    For example
    Set OFF
    If Sun 000/-360 Then Up
    If Sun 360/000 Then Down
    If Sun 180/-90 Then Day

    From sunset to sunrise, none of the if sun statement are true, so it would be off. From sunrise to 180 after sunrise, only the first statement is true, so the Up profile is used. From 180 after sunrise to 360 before sunset, both the first and third are true. Since the third is evaluated last, it has priority over the first and the Day profile is used. Etc. The graphic below should help.




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

  5. #5
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,257
    So let me see if I am grasping this. I made a nice graphic (which of course work is blocking me from uploading) so let me see if I can describe it all in text.

    Sunrise time 07:00
    Sunset time 19:00

    RampUp Start time 08:00
    RampUp End time 14:00
    RampUp Profile time 255

    RampDn Start time 17:30
    RampDn End time 20:30
    RampDn Profile time 180

    Day Start time 14:00
    Day End time 17:30
    Day Profile time 1

    So based on all of that my outlet code should look like this?
    Set OFF
    If Sun 060/-300 Then RampUp
    If Sun 630/090 Then RampDn
    If Sun 420/-090 Then Day

    Correct? Do I nee to overlap the times at all to account for the shifting times in the season table?

    Thanks a ton for your help so far Zombie. This just isn't clear from the CRM or the info that I found on the forum. I really appreciate your help! Krazie

  6. #6
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Your thought process was dead on, but In your case, since you want a 6 hour ramp and it limits you to 255 minutes for each ramp, I would do this instead

    RampUp1
    Time: 180
    Start intensity: 0
    End intensity: (half of what you have now)

    RampUp2
    Ramp time: 180
    Start intensity: (same as end from Up1)
    End intensity: (what you have now)

    Set OFF
    If Sun 060/-300 Then RampUp1
    If Sun 240/-300 Then RampUp2
    If Sun 480/090 Then RampDn
    If Sun 420/-090 Then Day

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

  7. #7
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,257
    I thought about that already and will probably do that but wanted to get the whole seasonal thing figured out first. That would also let me have more of a ramp up curve instead of a linear ramp as well. I thought about breaking it up into points kinda like the Fusion graphs do and using up all my profiles. LOL

    Why is your start time for RampDn at 480 instead of 630 like I calculated?

    Krazie

  8. #8
    Frequent Contributor zombie's Avatar
    Join Date
    Dec 2013
    Location
    Denver, CO
    Posts
    13,176
    Just cause it didnt need to be that high. Russ picked 360 and -360 arbitrarily so that they would work in the majority of cases. 630 would also work. As long as the number is higher than sunrise, it will overlap the same way.

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

  9. #9
    NSI Member Krazie4Acans's Avatar
    Join Date
    Nov 2013
    Location
    US, Mountain Time
    Posts
    1,257
    Cool. So is some overlap preferred over a point to point start stop? I'm guessing that would just be for changes in the light period based off of the seasonal table? Is it best to plan the schedule for the longest daytime day of the year? Any other tips? Krazie

Similar Threads

  1. Review My Program Kessills on Seasonal Table with 6500K supplemental lighting
    By netsequent in forum Misc Apex Usage & Programming
    Replies: 0
    Last Post: 08-25-2017, 12:19
  2. Review My Program Two Heater Program using Seasonal Table
    By jmheron in forum Apex Programming for Heaters and Chillers
    Replies: 0
    Last Post: 12-21-2016, 11:55
  3. Trying to program my Temperature using Seasonal Table
    By hcyplr29 in forum Misc Apex Usage & Programming
    Replies: 3
    Last Post: 07-29-2014, 16:42
  4. AWM Vegas & Seasonal table lighting
    By SteveW25561 in forum Apex Programming for Lighting
    Replies: 20
    Last Post: 01-20-2014, 23:22
  5. Help! Program to control pump using seasonal table
    By chase888 in forum Misc Apex Usage & Programming
    Replies: 2
    Last Post: 01-07-2014, 22:24

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
  •