Using i!-Schedule
3
i!-Schedule
Using i!-Schedule
Little work is required to add i!-Schedule to your existing NetLinx code. i!-Schedule is
implemented as a NetLinx module so you need to add the module definition and all it’s parameters
to your code. You must also define the NetLinx events you would like to schedule.
In order to use i!-Schedule, you will need to program and define a series of events in the NetLinx
control system. The key to the scheduling engine is the virtual device,
vdvSchEvents
. You must
support the events you want scheduled using this virtual device.
Think of the virtual device,
vdvSchEvents
, as a touch panel. Normally, you would write your
NetLinx program to respond to certain push channel from a touch panel; i!-Schedule is exactly the
same. Let’s say you want the user to be able to schedule when the outdoor lights turn on and when
they turn off. Imagine you have two touch panel buttons that do these functions. You would write
code that responds to the pushes; turning the lights on and then off. (Let’s use relays for lighting
control to simplify the example):
BUTTON_EVENT[TP,1] (* Outdoor Lights On *)
{
PUSH:
{
ON[RELAY,1]
}
}
BUTTON_EVENT[TP,2] (* Outdoor Lights Off *)
{
PUSH:
{
OFF[RELAY,1]
}
}
To schedule these events using i!-Schedule, we write the same code substituting the touch panel
device for our scheduling virtual device:
BUTTON_EVENT[vdvSchEvents,1] (* Outdoor Lights On *)
{
PUSH:
{
ON[RELAY,1]
}
}
BUTTON_EVENT[vdvSchEvents,2] (* Outdoor Lights Off *)
{
PUSH:
{
OFF[RELAY,1]
}
}
When the scheduling engine detects that the user has programmed the lights on event to run at a
certain time and that schedule time has occurred, i!-Schedule will "push" the button on the virtual
device just like a user pushes a button on a touch panel. There is now only one thing left to do: tell
the user which events are which.
In order to expose an event for scheduling via i!-Schedule, you need to support the programming
for the event (as we have just seen) tell i!-Schedule what that event is. i!-Schedule allows a user to
scroll through a list of events and edit the time which it runs. In order to associate an item in the list