Example 3 - Load Configuration From File; Example 4 - Main Program - AMX NetLinx Interface NXB-KNX Operation/Reference Manual

Knx communications gateway
Hide thumbs Also See for NetLinx Interface NXB-KNX:
Table of Contents

Advertisement

Example 3 - Load Configuration from File

The configuration can be read and generated from/to a file on the master file system. The reading of the file
can for instance be started in the ONLINE section of the interface.
...
DATA_EVENT[dvKNX]
{
ONLINE :
{
SEND_COMMAND dvKNX,'LIST LOAD MyTable.txt'
}
}
...
Comments at the end of a line must be separated by at least one space and are
initiated with "//".
Only one command per line is permitted.
Leading spaces are ignored.
Lines starting with "//" are ignored.
// Table written <DATE:TIME>
// ----------------------------
// Actors / Addresses / Flags
// ----------------------------
ADD=1:Switch:1/0/1
ADD=2:Switch:1/0/2
ADD=3:Switch:1/0/3
ADD=4:Switch:1/0/11:PS
ADD=5:Switch:1/0/12:PS
ADD=6:Switch:1/0/13:PS
ADD=7:Switch:1/0/21
ADD=8:Switch:1/0/22
ADD=9:Switch:1/0/31
ADD=10:Switch:1/0/32
ADD=11:Switch:1/0/111
ADD=12:Dim4:1/0/112
ADD=13:1Byte:1/0/113
ADD=14:1Byte:1/0/114:PS
ADD=15:2Byte:1/0/201:EIS5,PS
ADD=16:1Byte:1/0/203
ADD=17:3Byte:1/0/205:Time,PS
ADD=18:3Byte:1/0/206:Date,PS
// -------------
// Polltrigger :
// -------------
WHEN=1:2
WHEN=1:3
WHEN=11:14
WHEN=12:14
WHEN=13:14
WHEN=14:11

Example 4 - Main Program

DEFINE_DEVICE
dvKNX = 13001:1:0
dvTP = 10002:1:0
DEFINE_CONSTANT
...
DEFINE_VARIABLE
VOLATILE LONG lKNX_Value[5000] // Feedback array
...
DEFINE_START
...
#INCLUDE 'KNX_Tools.axi'
#INCLUDE 'KNX_Table.axi'
NXB-KNX Operation/Reference Guide
// Light 1 On/Off
// Light 2 On/Off
// Light 3 On/Off
// Light 1 Status, poll on Start
// Light 2 Status, poll on Start
// Light 3 Status, poll on Start
// Scene 1+2
// Scene 3+4
// Blinds up/down
// Blinds shutter
// Dimmer On/Off
// Dimmer relative
// Dimmer absolute
// Dimmer read Value, poll on Start
// analog Value, poll on Start
// analog Value
// Time, poll on Start
// Date, poll on Start
// Polltrigger
// Polltrigger
// Polltrigger
// Polltrigger
// Polltrigger
// Polltrigger
NetLinx Programming
35

Advertisement

Table of Contents
loading

Table of Contents