
Working with System Files
58
NetLinx Studio - Instruction Manual
Including a NetLinx Module in Your Program
To include a module in your NetLinx program, use the following module line:
DEFINE_MODULE 'DMS-IMSMod' Module_Name(Virtual_Dev, Real_Dev, strFileName, strVarTextArray)
Where:
For example, a NetLinx module for a DMS keypad would look like:
DEFINE_MODULE "DMS-IMSMod" mdlDMS (dvDMS, dvDMS_R, strFILE_NAME, StrVartextArray)
Where:
Sample NetLinx Code - DMS-IMS Module
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]
Module_Name
DMS-IMSMod.tko
Virtual_Dev
A virtual device you define.
Real_Dev
The device number of the DMS or IMS panel.
StrFileName
A string variable (CHAR array) containing the file name of the KPD file to run.
StrVarTextArray
A 2-dimensional array for storing store variable text. The first dimension should be the largest
variable text number you want to use. The second dimension should be the maximum size of
the string you want displayed (maximum is 40 characters).
DMS-IMSMod
The name of the compiled TKO file.
MdlDMS
The module name.
DvDMS
The module ID device number (ex 32768).
DvDMS_R
The device number of the keypad.
StrFILE_NAME
Exact name of the KPD file.
StrVarText Array
Description of the parameters for the variable text buffer.
Содержание NetLinx Studio
Страница 40: ...Working with Projects 28 NetLinx Studio Instruction Manual...
Страница 148: ...Communication Settings 136 NetLinx Studio Instruction Manual...
Страница 160: ...Working with Online Devices 148 NetLinx Studio Instruction Manual...
Страница 178: ...File Transfer Operations 166 NetLinx Studio Instruction Manual...
Страница 208: ...Tools Menu Options 196 NetLinx Studio Instruction Manual...
Страница 229: ...Setting Program Preferences 217 NetLinx Studio Instruction Manual...