NetLinx Programming Overview
17
NetLinx Programming Language Reference Guide
PUSH[MSP_GROUP,1] (* MSP_GROUP IS A DEV SET *)
[RELAY, 1] = ![RELAY, 1]
[MSP_GROUP, 1] = [RELAY, 1]
- or -
PUSH[MSP_PRESET1] (* MSP_PRESET1 IS A DEVCHAN SET *)
[RELAY,1] = ![RELAY, 1]
[MSP_PRESET1] = [RELAY, 1]
Conditionals & Loops
Axcess supports two types of conditional statements and three types of loops:
Conditional statements:
IF...ELSE
statements
SELECT...ACTIVE
statements
Loops:
WHILE
statements
MEDIUM_WHILE
statements
LONG_WHILE
statements
NetLinx supports:
Conditional statements:
IF...ELSE
statements
SELECT...ACTIVE
statements
SWITCH...CASE
statements
Loops:
FOR
statements
WHILE
statements
LONG_WHILE
statements
MEDIUM_WHILE
statements are obsolete in NetLinx due to eliminating the timeout of
WHILE
loops.
LONG_WHILE
loops now differ from
WHILE
loops in the way input change notifications are processed
during the programming loop.
WHILE
,
MEDIUM_WHILE
and
LONG_WHILE
statements are all still
accepted syntax to provide compatibility with existing Axcess programs.
SWITCH...CASE statements
NetLinx adds the
SWITCH...CASE
conditional statements. The
SWITCH...CASE
statements provide
selective execution of code blocks evaluated by a single condition. The value of the
SWITCH
expression
is tested against each
CASE
value (which must be a numeric constant or a string literal). If a match is
found, the statements associated with the
CASE
are executed. All other
CASE
statements are ignored. If
no match is found, the
DEFAULT
case statements (if any) are executed. The
SWITCH
expression is
evaluated only once.
The following rules apply to
SWITCH...CASE
statements:
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...