Reserved Identifiers
115
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
DEFINE_MUTUALLY_
EXCLUSIVE
When a channel is turned on in a mutually exclusive set, it activates its physical
output as long as the button is pressed. When the button is released, the phys-
ical output stops. Even after the physical output stops, the feedback still indi-
cates the channel is on until another channel in the mutually exclusive set is
activated. The status remains on to indicate which channel in the set was acti-
vated last (last button pushed feedback). When a channel or variable in a mutu-
ally exclusive set is activated, all other members of the set are turned off
beforehand (break before make logic).
Members of a mutually exclusive set are placed in parentheses underneath the
DEFINE_MUTUALLY_EXCLUSIVE
keyword. The double period (
..
) specifies a
range of channels on the particular device to be defined as mutually exclusive.
DEFINE_MUTUALLY_EXCLUSIVE
([RELAY,SCREEN_UP], [RELAY,SCREEN_DOWN])
DEFINE_TOGGLING
[RELAY,SCREEN_UP][RELAY,SCREEN_DOWN]
The last entry specifies a set of mutually exclusive variables -
VCR_SELECT
,
CD_SELECT
, and
CASS_SELECT
. If any one of the three variables is turned on
(e.g.,
"ON [VCR_SELECT]"
) the other two are turned off.
If a channel is defined to be both mutually exclusive and latching, it has the
same behavior described above except that the channel stays on even after the
button that activated it is released. Theoretically, a channel in a mutually exclu-
sive latching set cannot be turned off without activating another channel in the
same set. In NetLinx, you can bypass this rule by using
TOTAL_OFF
. The
TOTAL_OFF
function turns a channel or variable off. Unlike
OFF
,
TOTAL_OFF
turns off the status of a channel or variable that is in a mutually exclusive set.
DEFINE_PROGRAM
This keyword defines the mainline code, which is executed continuously to pro-
cess input and to provide device feedback.
See the
Mainline
section on page 97 for more information.
DEFINE_START
This keyword contains instructions that are executed once at program startup;
in other words, at power-up or after a system reset.
DEFINE_TOGGLING
When a channel is defined as mutually exclusive and latching, there is no way
to turn off the channel without activating another. Mutually exclusive toggling
allows a channel to be turned on or off by successive presses of the same but-
ton, like a normal latching channel. The channel is still affected by its mutually
exclusive characteristics; if the channel is on, it can be turned off by activating
another channel in the set. The status of a mutually exclusive toggling button
operates the same way as a mutually exclusive latching button.
In order to make a channel toggling, it must be defined as both mutually exclu-
sive and toggling, as shown below:
DEFINE_MUTUALLY_EXCLUSIVE([RELAY, SCREEN_UP], [RELAY,
SCREEN_DOWN])DEFINE_TOGGLING[RELAY, SCREEN_UP][RELAY,
SCREEN_DOWN]
DEFINE_TYPE
This keyword section defines custom data types such as structures and arrays.
An example
DEFINE_TYPE
section is shown below.
DEFINE_TYPE
STRUCTURE MyStruct
{
LONG Num
CHAR Name[30]
}
See the
Data Types
section on page 10 for a discussion of structures.
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...