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.
Bookmarks