Combining And Un-Combining Levels - AMX NETLINX PROGRAMMING LANGUAGE Manual

Programming language
Table of Contents

Advertisement

Combining Devices, Levels, and Channels
RELEASE[VIRTUAL1,1]
{
}
RELEASE[TP1,1]
{
}

Combining and Un-Combining Levels

To approach setting up level combine and un-combine operations in NetLinx, let's first look at the way
that level combine operations are done in the Axcess language. The example below illustrates how an
Axcess program would combine three Touch Panel levels to act as one.
The code shown in the Axcess example will not work in NetLinx, due to
incompatibilities between the languages (i.e. Axcess does not allow virtual devices,
which are required for Combine/Uncombine operations in NetLinx).
DEFINE_DEVICE
TP1 = 128
TP2 = 129
TP3 = 130
DEFINE_CONNECT_LEVEL
(TP1,1, TP2,1, TP3,1)
,
TP1
TP2
on any of the three devices, Axcess sees the level coming only from the first device in the list (
Likewise, any level change sent to any device in the list will automatically be sent to all devices in the
list.
Now let's see how the code example shown above would translate into NetLinx. This is code that would
function correctly within a NetLinx system, but still uses the Axcess-based.
DEFINE_CONNECT_LEVEL
DEFINE_DEVICE
VIRTUAL1 = 33000
TP1 = 128
TP2 = 129
TP3 = 130
DEFINE_CONNECT_LEVEL
(VIRTUAL1, 1, TP1,1, TP2,1, TP3,1)
The example above combines the levels for the three touch panels:
change occurs on any of the three devices, NetLinx detects the level as coming only from
The example below illustrates the use of a device array (
devices (
TP1
combine/un-combine levels. Any input events for any device in the array will appear to the program as
82
(*Do Something*)
(*This will only see pushes when combine is NOT active*)
(*Do Something*)
, and
are devices; this example combines Level 1 on each device. If a level change occurs
TP3
,
, and
). Device arrays further simplify code and allow you to dynamically
TP2
TP3
,
and
TP1
TP2
TP3
), instead of specifying the individual
Dev[ ]
NetLinx Programming Language Reference Guide
).
TP1
. Whenever a level
.
VIRTUAL1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Netlinx studio 2

Table of Contents