AMX NETLINX PROGRAMMING LANGUAGE Manual page 96

Programming language
Table of Contents

Advertisement

Combining Devices, Levels, and Channels
devices in the list. This includes level changes. For example, the statement
channel 50 for all three devices in the list.
Now let's see how the code example shown above would translate into NetLinx.
DEFINE_COMBINE
DEFINE_DEVICE
VIRTUAL1 = 33000
TP1 = 128
TP2 = 129
TP3 = 130
DEFINE_COMBINE
(VIRTUAL1, TP1, TP2, TP3)
DEFINE_PROGRAM
RELEASE[VIRTUAL1,1]
{
}
Note the use of the virtual device (
require that the first device in the list (the primary device) must be a virtual device. By specifying a
virtual device as the primary device in a
targeting the virtual device, but effectively operating on each physical device. Furthermore, since a
virtual device is not an actual physical device, the primary device cannot be taken off-line or removed
from the system (which avoids the potential problems that occurred in Axcess).
The virtual device's address number must be in the range of 32768 to 36863.
The example above combines the three touch panel devices:
change occurs on any of the three devices, NetLinx detects the input as coming only from
For example, if button
result of the combination.
Output changes (including level changes) sent to any device in the list will automatically be sent to all
devices in the list. For instance, the statement:
panels and
The example below illustrates the use of a device array (
devices (
TP1
dynamically combine/un-combine devices. Any input events for any device in the array will appear to
the program as coming from the virtual device. Output changes, directed to the virtual device or any
device in the array, are sent to all devices in the array. Here's a syntax example:
COMBINE_DEVICES (VIRTUAL1, TP1, TP2, TP3)
In addition to virtual devices and device arrays, the NetLinx language contains several new keywords for
combine and un-combine operations:
80
(*Do Something*)
VIRTUAL1
is pressed, NetLinx sees input coming from
[TP3, 5]
turns off channel 10 on all three panels.
OFF [VIRTUAL1, 10]
,
, and
). Device arrays can further simplify your code and allow you to
TP2
TP3
COMBINE_DEVICES, UNCOMBINE_DEVICES
COMBINE_LEVELS, UNCOMBINE_LEVELS
COMBINE_CHANNELS, UNCOMBINE_CHANNELS
) in the above example. Combine operations in NetLinx
statement, NetLinx code can be written
DEFINE_COMBINE
,
TP1
TP2
ON [VIRTUAL1, 50]
), instead of specifying the individual
Dev[ ]
NetLinx Programming Language Reference Guide
will turn on
ON [TP1,5Ø]
and
. Whenever an input
TP3
VIRTUAL1
as a
[VIRTUAL1, 5]
turns on channel 50 on all three
.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents