Results 1 to 4 of 4

Thread: Using the Season Table for primary and moon lighting with Acan Prism LEDs, including Weather events

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

    Using the Season Table for primary and moon lighting with Acan Prism LEDs, including Weather events

    This advanced sample code is intended for use with Acan Lighting's Prism LED fixtures. These fixtures are Apex-Ready+, and can be fully controlled by an Apex via the AI interface on the VDM. This sticky was further revised in Dec 2013 - Apex firmware 4.31 or greater is now required; this programming will NOT work with 4.30 or earlier firmware.

    Weather profiles are used for both cloudy and stormy periods. Periods of weather are only permitted during afternoon/early evening hours - in this code, weather events are allowed between 1400 and 1930 (easily modified as desired) . By using a combination of DoW statements and some psuedo-randomization, some days will have a cloudy period, some days will have a stormy period, and some days will have neither; the time of the weather events will vary within the allowed window too. I chose to keep weather events relatively short in duration (in my example, 37 minutes), but this is easily adjusted to suit individual preferences.
    There are also overrides that can be used to turn on the lights at 20% and 60% intensity whenever desired simply by manually turning on a VO.

    A tip for less-experienced users: If you want to use this programming, do it in the following order:


    • Rename and configure the necessary profiles FIRST
    • Create and rename virtual outputs SECOND
    • Program all of the applicable virtual outputs THIRD
    • Rename and program all EB and VDM outputs LAST

    Although not required, I strongly recommend that everyone using the Season Table for lighting should customize the Season Table for their geographic location. See this sticky: http://forum.neptunesystems.com/show...e-Season-Table



    PROFILES

    [ BL_Rise ]
    Ramp Time: 60
    Start Intensity: 0
    End Intensity: 100

    [ WH_Rise ]
    Ramp Time: 60
    Start Intensity: 0
    End Intensity: 100

    [ BL_Set ]
    Ramp Time: 60
    Start Intensity: 100
    End Intensity: 0

    [ WH_Set ]
    Ramp Time: 60
    Start Intensity: 100
    End Intensity: 0

    [ BL_Day ]
    Ramp Time: 1
    Start Intensity: 100
    End Intensity: 100

    [ WH_Day ]
    Ramp Time: 1
    Start Intensity: 100
    End Intensity: 100

    [ Stormy ]
    Light Maximum Intensity: 25
    Cloudy Light Intensity: 8
    Cloud Duration: 7
    Cloudy Time: 75
    Probability of Lightning: 45
    Lightning Intensity: 70

    [ Cloudy ]
    Light Maximum Intensity: 25
    Cloudy Light Intensity: 8
    Cloud Duration: 5
    Cloudy Time: 75
    Probability of Lightning: 0
    Lightning Intensity: 0

    [ MoonUp ]
    Ramp Time: 1
    Start Intensity: 3
    End Intensity: 3

    [ Steady20 ]
    Ramp Time: 1
    Start Intensity: 20
    End Intensity: 20

    [ Steady60 ]
    Ramp Time: 1
    Start Intensity: 60
    End Intensity: 60[/FONT]

    PROGRAM

    [ Moonlight ] ( Virtual output )
    Set OFF
    If Moon 000/000 Then ON

    [ Storms ] ( Virtual Outlet )
    OSC 000:00/037:00/636:00 Then ON
    If Time 19:30 to 13:59 Then OFF
    Min Time 037:00 Then ON
    If DoW S-T-T-S Then OFF

    [ Clouds ] ( Virtual Outlet )
    OSC 000:00/037:00/636:00 Then ON
    If Time 19:30 to 13:59 Then OFF
    Min Time 037:00 Then ON
    If DoW -M-W-F- Then OFF

    [ Sol-On-20 ] ( Virtual Outlet )
    Set OFF

    [ Sol-On-60 ] ( Virtual Outlet )
    Set OFF

    [ Prism_Blue ] ( VDM Outlet )
    Set OFF
    If Sun 000/-360 Then BL_Rise
    If Sun 360/000 Then BL_Set
    If Sun 060/-060 Then BL_Day
    If Outlet Clouds = ON Then Cloudy
    If Outlet Storms = ON Then Stormy
    If Outlet Prism-On-20 = ON Then Steady20
    If Outlet Prism-On-60 = ON Then Steady60

    [ Prism_White ] ( VDM Outlet )
    Set OFF
    If Sun 000/-360 Then WH_Rise
    If Sun 360/000 Then WH_Set
    If Sun 060/-060 Then WH_Day
    If Outlet Clouds = ON Then Cloudy
    If Outlet Storms = ON Then Stormy
    If Outlet Prism-On-20 = ON Then Steady20
    If Outlet Prism-On-60 = ON Then Steady60

    [ Prism_Moon ] ( VDM Outlet )
    Set OFF
    If Outlet Moonlight = ON Then MoonUp

    The order of the statements in the above three VDM outputs is critical!

    [ Prism_Power ] ( EB Outlet - NOTE: the use of an EB output is optional)
    Fallback OFF
    Set OFF
    If Outlet Prism_Blue = ON Then ON
    If Outlet Prism_White = ON Then ON
    If Outlet Prism_Moon = ON Then ON
    Defer 000:05 Then ON
    Defer 000:05 Then OFF



    A few additional notes:

    In the Clouds and Storms outputs, the Min Time statement causes the weather event to run the full duration, even if it starts close to the end of the allowed period. In the posted code, weather events are allowed from 1400 to 1930. Example: If the randomization (OSC) code starts a weather event at 1925, the Min Time prevents that event from getting cut short 5 minutes later at 1930.

    To vary the frequency of weather events, adjust the OSC statements in the Clouds and Storms outputs. A greater 3rd value will increase the probability that no weather event occurs on a particular day:

    OSC 000:00/037:00/636:00 Then ON

    To change the duration of weather events, change the second OSC value and the Min Time value in the Clouds and Storms outputs:

    OSC 000:00/037:00/636:00 Then ON
    If Time 19:30 to 13:59 Then OFF
    Min Time 037:00 Then ON


    Modify the If Time statement to change the period of time in which weather events are *not* desired.
    Last edited by RussM; 03-08-2014 at 18:31.

  2. #2
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    Here's an example of how the code would change to make the lighting period occur two hours later - a common desire to make more viewing time in the evening.

    Note where I've highlighted the changes in red - each indicated offset value has had 120 added. The ramp up and ramp down times remain at 60 minutes. Follow the same concept for the White VDM output.

    Example code Shifted by 2 hours (later)
    [ Prism_Blue ] ( VDM Outlet )
    Set OFF
    If Sun 000/-360 Then BL_Rise
    If Sun 360/000 Then BL_Set
    If Sun 060/-060 Then BL_Day
    [ Prism_Blue ] ( VDM Output )
    Set OFF
    If Sun 120/-360 Then BL_Rise
    If Sun 360/120 Then BL_Set
    If Sun 180/060 Then BL_Day
    Last edited by RussM; 12-30-2013 at 19:33.

  3. #3
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    THIS STICKY HAS BEEN TOTALLY REVISED as of Dec 30 2013

    The programming examples in this sticky have been overhauled to capitalize on Apex firmware 4.31, which introduced changes in the behavior of If Moon and If Sun commands. The result is advanced lighting programming which is much simpler. Consequently, these examples will not work with Firmware Version 4.30 or older.
    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
    Master Control Freak RussM's Avatar
    Join Date
    Dec 2012
    Location
    California - US Pacific
    Posts
    22,463
    The programming illustrated here and in the other two similar stickies has proven to be quite popular. It's a framework, meant to be modified to suit personal preferences and such. Many people over the last year or so have asked for assistance in modifying it to use different offsets from the times in the Apex Season Table, use different ramp up and ramp down times, etc. To make that process easier, I've developed a web page to complement this sticky:

    http://www.reeftronics.net/support/if-sun-calc.php
    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.

Similar Threads

  1. Replies: 11
    Last Post: 12-21-2015, 06:37
  2. Replies: 23
    Last Post: 08-19-2014, 16:25
  3. Replies: 6
    Last Post: 07-16-2014, 06:08
  4. Replies: 3
    Last Post: 07-16-2014, 06:07
  5. Season table primary lighting AI Sol Standard without royalblue?
    By milkit in forum Apex Programming for Lighting
    Replies: 1
    Last Post: 02-01-2014, 22:28

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
  •