AMX CAFE DUET STANDARD NETLINX API (SNAPI) COMPONENTS AND LISTENERS Instruction Manual page 11

Standard netlinx api (snapi) r 1.8.0 components/listeners
Table of Contents

Advertisement

Ramping Channels
Some channels in SNAPI provide ramping functionality and some provide adjust "stepping" functionality. Since ramping on a device is only provided if the device
supports ramping, a channel that causes ramping on one device may not cause ramping on another device. The following syntax can be used universally for all
ramping functionality:
BUTTON_EVENT[dvTP,1]
{
PUSH:
TO[dvDevice,VOL_UP]
HOLD[3 , REPEAT]:
ON[dvDevce,VOL_UP]
}
The PUSH: TO part of the button event causes ramping to start and continue until the button is released. If the device does not support ramping, the device adjusts
the desired parameter either up or down one step and stops. The HOLD: ON part of the button event causes the step adjustment to repeat, at a rate specified by the
HOLD repeat time, until the button is released. The HOLD: ON part of the button event has no effect if the device supports ramping.
In a future version of Duet, it is expected that all modules will support ramping natively and that this NetLinx code will not always be required. However, if the
module you are using does not support ramping, this code can be used to achieve ramping functionality.
Levels
Levels in SNAPI are used for both function and feedback. For feedback levels, the level value can be captured in a LEVEL_EVENT, with CREATE_LEVEL or
sent directly to a touch panel display bargraph using DEFINE_CONNECT_LEVEL:
LEVEL_EVENT[dvDevice,1]
{
// LEVEL.VALUE holds the new level value
}
CREATE_LEVEL dvDevice,1,nMyVariable // nMyVariable will hold the
DEFINE_CONNECT_LEVEL(dvDevice,1,dvTp,1)
Levels used for functions can be set by calling SEND_LEVEL or by connecting to a touch panel active bargraph using DEFINE_CONNECT_LEVEL:
SEND_LEVEL dvDevice,1,nNewLevelValue
DEFINE_CONNECT_LEVEL(dvDevice,1,dvTp,1)
The CREATE_LEVEL/SEND_LEVEL mechanism is recommended for use with SNAPI. While LEVEL_EVENT will work fine, you may experience problems
when a touch panel falls offline and then reconnects, which happens often with wireless panels. LEVEL_EVENT's will only fire when a change of the level value
occurs. When the panel comes online, the only way to reliably update the level is with a SEND_LEVEL.
Standard NetLinx API (SNAPI) R 1.8.0
// latest value of the level
Interfacing with Standard NetLinx API (SNAPI)
5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cafe duet

Table of Contents