
Reserved Identifiers
142
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
MOD (%)
This keyword is used to generate the remainder of a division function.
Note
: You cannot take the mod of an integer without first loading the value into
a variable. For example:
VRAM_LSB = ((2 % 16)+$30) (* does not work *)
However,
ID = 2
OTHER = 16
VRAM_LSB = ((ID % OTHER) + $30) (* works *)
MODULE_NAME
This keyword introduces the definition of a module. It must appear on the first
line of the module implementation file.
MODULE_NAME = '<module name>' (<parameter list>)
See
DEFINE_MODULE
, on page 142, for more information.
NOT (!)
This keyword is used to negate a given expression.
IF (NOT (X > 10))
{
// statements to execute if X <= 10
}
NON_VOLATILE
A variable declared with the
NON_VOLATILE
keyword is stored in non-volatile
memory. It retains its value in the event of a system power-down, but is reset to
zero if the program is reloaded. Unless specified otherwise, all variables are
stored in non-volatile memory.
OFF
This keyword is used to turn a channel or variable off. If used with a variable,
OFF
sets it to zero.
OFF[DEVICE,CHANNEL]
OFF[(DEVCHAN[ ])]
OFF[Variable]
OFFLINE
This keyword defines a section in a
DATA
event handler for processing
OFFLINE
notifications. This is one of the important aspects of the
DATA_EVENT
that is triggered when the master recognizes that a device has
been dropped off the bus.
ON
This keyword is used to turn a channel or variable on. If used with a variable,
ON
sets it to 1.
ON[DEVICE,CHANNEL]
ON[(DEVCHAN[ ])]
ON[Variable]
ONERROR
This keyword defines a section in a
DATA
event handler for processing
ONERROR
notifications. Any error triggers an
ONERROR
event.
ONLINE
This keyword defines a section in a
DATA
event handler for processing
ONLINE
notifications. This is one aspect of
DATA_EVENT
that is triggered when the
master recognizes that a device has been added to the bus. In NetLinx, every
device triggers an
ONLINE
event when the master is reset. This ensures that
the device is initialized on startup and that the device is initialized any time the
device comes online.
OR (||)
This keyword evaluates two conditions. If one or both conditions are true, the
entire expression evaluates to true.
PAUSE_ALL_WAIT
This keyword suspends all
WAIT
s currently in effect.
PAUSE_WAIT
This keyword suspends the specified (named)
WAIT
until a
RESTART_WAIT
,
RESTART_ALL_WAIT
,
CANCEL_WAIT
, or
CANCEL_ALL_WAIT
command is
issued.
PAUSE_WAIT '<wait name>'
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...