Programming - AMX CAFE DUET STANDARD NETLINX API (SNAPI) DEVICES Instruction Manual

Standard netlinx api (snapi) r 1.8.0 devices
Table of Contents

Advertisement

Interfacing with Standard NetLinx API (SNAPI)

Programming

Channels
Input function channels are used for response type functions. For instance, channel 1 notifies your program of a button push in the KeypadComponent. When your
program receives a PUSH, the button is pushed. When your program receives a RELEASE, the button is released. You should use BUTTON_EVENT's to capture
the changes of an Input function channel:
BUTTON_EVENT[dvDevice, KEYPAD_BTN]
{
PUSH:
// Button was pushed
{
}
RELEASE: // Button was released
{
}
}
Momentary function channels are used to activate functions when the channels change from an OFF state to an ON state. For instance, channel 9 or the constant
POWER cycles the state of the power on the device when it turns on. No change occurs when the channels change from an ON state to an OFF state. You should
activate Momentary function channels using the PULSE, TO or MIN_TO keywords:
PULSE[dvDevice,POWER]// Cycle the state of power
TO[dvDevice,POWER]// Cycle the state of power
MIN_TO[dvDevice,POWER]// Cycle the state of power
Discrete function channels are used to activate functions when the channel changes from an OFF state to an ON state and from an ON to an OFF state. For
instance, channel 255 or the constant POWER_ON sets the state of the power on the device when it turns on and off. You should activate discrete function channels
using the ON and OFF keywords, or any syntax that changes the state of the channel such as a feedback assignment:
ON[dvDevice,POWER_ON]
// Turn the power on
OFF[dvDevice,POWER_ON]
// Turn the power off
[dvDevice,POWER_ON] = ![dvDevice,POWER_ON]
Feedback channels do not active function and should only be used for feedback. These channels can be used in CHANNEL_EVENTs or feedback assignment
statements to read the status of the channel:
bCommunicationActive = [dvDevce,DEVICE_COMMUNICATING]
CHANNEL_EVENT[dvDevice,DEVICE_COMMUNICATING]
{
ON:
ON[bCommunicationActive]
OFF:
OFF[bCommunicationActive]
}
4
// Cycle the state of power
Standard NetLinx API (SNAPI) R 1.7.0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cafe duet

Table of Contents