![background image](http://html.mh-extra.com/html/amx/nxb-knx/nxb-knx_instruction-manual_2938124036.webp)
NetLinx Programming
30
NXB-KNX KNX Communications Gateway
Sample Program
KNX Table
All actuators to be switched/set/controlled need to be provisioned on the NXB-KNX. In this example it is achieved with
the use of the KNX_Table.axi file. All provisioning commands are listed in the 'ONLINE' for the NXB-KNX device.
Other options are possible however this method is preferred. The method will guarantee that actuators will be
synchronized between the master and the NXB-KNX
Poll triggers will only be accepted by the NXB-KNX if the polling and polled addresses have already been defended.
Additionally, a snapshot of an active configuration may be saved and loaded to/from the master's internal file system.
Refer to “LIST SAVE [<Filename>]” on page 26.
Refer to “LIST LOAD [<Filename>]” on page 26.
Refer to “Example 3 - Load Configuration from File” on page 33.
Notes For Programming
Predefined functions are available for control to generate the SEND_COMMANDs for the NXB-KNX.
These functions are in the
KNX_Tools.axi
include file
(see the
KNX_Tools.axi
section on page 35).
Example 1 - Structure of KNX Table With Functions From KNX_Tools.axi
MODULE_NAME='KNX_Table_NXB_A'(DEV dvNxbKnx)
DEFINE_VARIABLE
integer counter
float waitVal
DEFINE_START
Counter=0
waitVal = .2
#INCLUDE 'KNX_Tools.axi'
DEFINE_EVENT
DATA_EVENT [dvNxbKnx]
{
ONLINE: //Start configuration upload when NXB-KNX comes online.
{
wait 10 //1 second delay
{
counter = 1
}
}
}
DEFINE_PROGRAM
WAIT waitVal
Recommendation
: Use the version with help function (example 1, see below). In this
version less typing errors will occur and the compiler can perform several checks.
Recommendation
: define poll triggers after all actors have been defined.
Recommendation: Use these functions, less typing errors will occur and the
compiler can perform several checks.