Working With Systems and System Files
65
etLinx Studio (v2.4 or higher)
Sample Netlinx Code
To send a KPD file to a NetLinx Master, you must use the NetLinx DMS-IMS module, with the
following DEFINE_MODULE entry in the Master Source Code:
DEFINE_MODULE 'DMS-IMSMod' Module_Name(Virtual_Dev, Real_Dev,
strFileName, strVarTextArray)
Where:
Module_Name is a unique name. For example:
DEFINE_MODULE 'DMS-IMSMod' mdlDMS (…
or
DEFINE_MODULE 'DMS-IMSMod' mdlIMS (…
For example:
(**********************************************)
(* DEVICE NUMBER DEFINITIONS GO BELOW *)
(**********************************************)
DEFINE_DEVICE
DvVIRT = 33001:1:0
DvDMS = 6020:1:0
(**********************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(**********************************************)
DEFINE_VARIABLE
CHAR strFileName[100]
(**********************************************)
(* STARTUP CODE GOES BELOW *)
(**********************************************)
DEFINE_START
StrFileName = 'avcnt11.kpd'
(**********************************************)
(* VARIABLE DEFINITIONS GO BELOW *)
(**********************************************)
DEFINE_VARIABLE
CHAR strVarTextArray[100][40]
Where:
DVVirt
an arbitrary Virtual Device number you define (range for keypad panels =
32768 -36863).
DvDMS
the real device number of the DMS or IMS panel.
StrFileName
a string variable (CHAR array) containing the file name of the KPD file to
transfer or run.
StrVarTextArray
a two-dimensional array to store variable text in. The first dimension
should be the largest variable text string number you want to use. The
second dimension should be the maximum size of the string you want dis-
played (maximum is 40 characters).
When using two or more keypad panels, you can create a single three-
dimensional array for a keypad panels, instead of separate two-dimen-
sional arrays for each keypad panel.