Interfacing with Standard NetLinx API (SNAPI)
5
Standard NetLinx API (SNAPI) R 1.7.0
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
// latest value of the level
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.
Summary of Contents for CAFE DUET
Page 16: ...Standard NetLinx API SNAPI R 1 8 0 12 ...
Page 28: ...Standard NetLinx API SNAPI R 1 8 0 24 ...
Page 34: ...Standard NetLinx API SNAPI R 1 8 0 30 ...
Page 40: ...Standard NetLinx API SNAPI R 1 8 0 36 ...
Page 46: ...Standard NetLinx API SNAPI R 1 8 0 42 ...
Page 52: ...Standard NetLinx API SNAPI R 1 8 0 48 ...
Page 58: ...Standard NetLinx API SNAPI R 1 8 0 54 ...
Page 142: ...Standard NetLinx API SNAPI R 1 8 0 138 ...
Page 148: ...Standard NetLinx API SNAPI R 1 8 0 144 ...
Page 156: ...Standard NetLinx API SNAPI R 1 8 0 152 ...
Page 172: ...Standard NetLinx API SNAPI R 1 8 0 168 ...
Page 184: ...Standard NetLinx API SNAPI R 1 8 0 180 ...
Page 192: ...Standard NetLinx API SNAPI R 1 8 0 188 ...
Page 206: ...Standard NetLinx API SNAPI R 1 8 0 202 ...
Page 226: ...Standard NetLinx API SNAPI R 1 8 0 222 ...
Page 240: ...Standard NetLinx API SNAPI R 1 8 0 236 ...
Page 244: ...Standard NetLinx API SNAPI R 1 8 0 240 ...
Page 252: ...Standard NetLinx API SNAPI R 1 8 0 248 ...
Page 268: ...Standard NetLinx API SNAPI R 1 8 0 264 ...
Page 302: ...Standard NetLinx API SNAPI R 1 8 0 298 ...
Page 328: ...Standard NetLinx API SNAPI R 1 8 0 324 ...
Page 343: ...Standard NetLinx API SNAPI Devices 339 Standard NetLinx API SNAPI R 1 7 0 ...