Using i!-ConnectLinx
3
i!-ConnectLinx
Using i!-ConnectLinx
Little work is required to add i!-ConnectLinx to your existing NetLinx code. i!-ConnectLinx is
implemented as a NetLinx module. Adding the module definition and all it’s parameters to your
code is all that is required.
In order to use i!-ConnectLinx, you need to program and define a series of actions in the NetLinx
Control System. The key to the i!-ConnectLinx engine is the virtual device,
vdvCLActions
, see
the
Module
section on page 11. Support the actions you want executed remotely using this virtual
device.
Think of the virtual device,
vdvCLActions
, as a touch panel. Normally, you write your NetLinx
program to respond to certain push channel from a touch panel; i!-ConnectLinx is exactly the same.
Let’s say you want the user to be able to allow the ability to play and stop a VCR. Imagine you have
two touch panel buttons that do these functions; write code that responds to the pushes:
BUTTON_EVENT[TP,1] (* VCR Play *)
{
PUSH:
{
PULSE[VCR,1]
}
}
BUTTON_EVENT[TP,2] (* VCR Stop *)
{
PUSH:
{
PULSE{VCR,2]
}
}
To expose these actions using i!-ConnectLinx, write the same code substituting the touch panel
device for your i!-ConnectLinx virtual device:
BUTTON_EVENT[vdvCLActions,1] (* VCR Play *)
{
PUSH:
{
PULSE[VCR,1]
}
}
BUTTON_EVENT[vdvCLActions,2] (* VCR Stop *)
{
PUSH:
{
PULSE{VCR,2]
}
}
When the i!-ConnectLinx engine gets a request to play the VCR, i!-ConnectLinx will "push" the
button of 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 actions are which.
In order to expose an action for execution via i!-ConnectLinx, you need to support the
programming for the action, as we have just seen, and you need to tell i!-ConnectLinx what that
action is.