
NetLinx Programming Overview
7
NetLinx Programming Language Reference Guide
DEFINE_START
DEFINE_EVENT
Axcess Language
NetLinx Language
DEFINE_START
sets the initialization parameters for
the Axcess program. This section defines buffers,
levels, sets communication settings, and initializes
variables.
DEFINE_START
is run once when the program is
loaded or the system is reset.
DEFINE_START
CREATE_BUFFER TP, TP_BUFFER
CREATE_LEVEL VOL, 1, VOL_LEVEL1
SEND_COMMAND SWT,
'SET BAUD 9600,N,8,1,DISABLE'
ON[CLEAR_TO_SEND]
There is no difference between the way Axcess and
NetLinx handle the
DEFINE_START
section of the pro-
gram; however, the role of the
DEFINE_START
section
is greatly reduced. Variable initializations are handled in
the
DEFINE_VARIABLE
section. Device initializations
are handled with a
DATA_EVENT
in the
DEFINE_EVENT
section.
DEFINE_START
ON[CLEAR_TO_SEND]
Axcess Language
NetLinx Language
Axcess does not support events.
Events are a new process in NetLinx. The events thread
runs parallel to the mainline thread. Events describe cer-
tain types of conditions within the control system. If the
conditions are defined as a
DEFINE_EVENT
, the event
code is run and mainline is bypassed.
There are five different types of events: Button Events,
Channel Events, Data Events, Level Events, and Time-
line Events.
DEFINE_EVENT
BUTTON_EVENT[TP,21]
(* KC REPEAT 'A' *)
{
PUSH:
{SEND_STRING KC, 'A'
}
RELEASE:
{
}
HOLD[5,REPEAT]:
{
SEND_STRING KC, 'A'
}
}
Summary of Contents for NETLINX PROGRAMMING LANGUAGE
Page 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Page 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Page 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Page 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Page 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Page 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Page 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Page 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Page 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Page 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...