Advanced Programming

Implementation

To interface to the AMX Lutron_H48_Comm.jar module, you must:

1.Define the device ID for the H48 to be controlled.

2.Define the virtual device ID that the Lutron_H48_Comm.jar Duet module will use to communicate with the main program and User Interface. NetLinx virtual devices start with device number 41001.

3.If a touch panel interface is needed, a touch panel file Lutron_H48.TP4 and module Lutron_H48_UI.axs have been created for testing.

4.The NetLinx Lutron_H48_Comm.jar module must be included in the program with a DEFINE_MODULE command. This command starts execution of the module and passes in the following key information: the device ID of the H48 to be controlled, and the virtual device ID for communicating to the main program.

An example of how to do this is shown below.

DEFINE_DEVICE

 

 

dvReal

=0:5:0

// The real H48 connected to the NetLinx IP port

dvTP

=128:1:0

// The touch panel used

for output

vdvLutron =41001:1:0

/* The virtual device use

for communication between

 

 

the Comm module interface and User_Interface (UI)

 

 

module interface.

 

 

 

Also used by keypad

1. */

vdvKeypd2

=41001:2:0

// Virtual device used

by keypad 2.

DEFINE_VARIABLE

 

 

VOLATILE DEV vdvArray[]={vdvLutron,vdvKeypd2}

 

//Define arrays of button channels used on your own touch panel VOLATILE integer nButtons[]={1,2,3,4,5,6,7}

DEFINE_START// Place define_module calls to the very end of the define_start section.

// Comm module

DEFINE_MODULE 'Lutron_H48_Comm' duet_code(vdvLutron, dvReal) // Touch panel module

DEFINE_MODULE 'Lutron_H48_UI' ui_code(vdvArray, dvTP, nButtons)

In order to establish a connection with the H48, the PROPERTY- command must be used to provide the Duet module with the correct IP to connect to, and the correct password needed to login. After the properties have been set, you must issue a REINIT to connect.

Upon initialization the AMX Duet module will communicate with the H48 and information will be exchanged.

 

20

ALD-H48 Lighting Controller

 

 

 

Page 26
Image 26
AMX ALD-H48 instruction manual Implementation, Definedevice