Define_Start; Define_Event - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

DEFINE_START

Axcess 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]

DEFINE_EVENT

Axcess Language
Axcess does not support events.
NetLinx Programming Language Reference Guide
NetLinx Programming Overview
NetLinx Language
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]
NetLinx Language
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'
}
}
7

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents