AMX ALD-H48 instruction manual Implementation, Definedevice

Page 26

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

 

 

 

Image 26
Contents ALD-H48 AMX Limited Warranty and Disclaimer Software License and Warranty Agreement Page Table of Contents Via Via Ethernet Overview Overview Downloading The ALD-H48 Workspace Setting The ALD-H48 IP AddressGetting Started Opening The ALD-H48 WorkspaceTransferring The ALD-H48 Project to a NetLinx Master Click Select AllUsing The Web Interface Addressing The Dimmers via The Web InterfaceDimmer Address Controlling Dimmers via The Web Dimmer ControlEstablishing And Modifying Scenes SceneModify Scene Establishing And Modifying Groups Modify GroupUsing The Touch Panel Pages Touch Panel MainDimmer Light Adjustment Setup SetupGroups Addressing DimmersCreating a Group Scenes ScenesCreating a Lighting Scene Using The Touch Panel Pages Overview Advanced ProgrammingIntroduction Implementation DefinedevicePort Mapping Channel Assignment and FeedbackChannel Assignment and Feedback Command Interface ?FWVERSION KEYPADENABLE-1 KEYPADENABLE-2=STOP ?KEYPADADDR-1KEYPADREMOVEIDX-1 KEYPADREMOVEADDR-151?LIGHTADDR-1 LIGHTRAMP-1,UP LIGHTRAMP-1,STOP LIGHTLEVEL-1,102?LIGHTLEVEL-1 LIGHTREMOVEIDX-2 Lightremoveaddr?LIGHTSTATE-1 Reinit?VERSION Command Feedback KEYPADENABLE-1 KEYPADBTN-1,DOUBLECLICKLIGHTSTATE-1,ON Device Notes Programming Notes 14111 14112 11411114112 Commands to The Device Adding Functions to ModulesVia Ethernet Updating The ALD-H48 FirmwareVia RevisionLast05/11/05