NetLinx Programming
35
NXB-KNX KNX Communications Gateway
KNX_Tools.axi
We recommend not to use the send commands directly, but always use the functions of this include file. The compiler has
the opportunity to avoid typing errors already during compiling. Additional typing is avoided. This file also provides
absolute terms for relative dimming and blinds control:
// Constants for dimming Lights
KNX_DIM_UP = 9 //Brighter
KNX_DIM_DN = 1 //Darker
KNX_DIM_SP = 0 //Dimming Stop
// Constants for blind control
KNX_DIR_UP = 1 //UP
KNX_DIR_DOWN = 9 //Down
KNX_DIR_STOP = 0 //Stop
Functions Available In KNX_Tools.axi
The following functions are available in file KNX_Tools.axi for programming:
Functions Available In KNX_Tools.axi
Function
Description
KNXSet
Sets actuator <actor No> to <Value>.
Syntax:
KNXSet (<NXB-KNX Device >,<actor No>,<Value>)
Note: The module limits the value range automatically to the maximum range of the selected
actuator type.
Example:
KNXSet (dvKNX,13,1)
KNXGet
Gets the value of actuator <actor No> to <Value> stored in module.
Syntax:
KNXGet (<NXB-KNX Device>,<actor No>)
Example:
nVAL = KNXGet (dvKNX,13)
KNXPoll
Polls the actuator <actor No>
Syntax:
KNXPoll (<NXB-KNX Device>,<actor No>)
Example:
KNXPoll (dvKNX,13)
KNXAdd
Adds entry to KNX table (description of parameters see above).
Syntax:
KNXAdd (<NXB-KNX Device>,<actor No>,<Type>,<Group Address>,<Flags>)
Example:
KNXAdd (dvKNX,13,KNX2Byte,'1/0/206',"knxPollstart")
KNXWhenPoll
Adds a poll trigger.
Syntax:
KNXWhenPoll (<NXB-KNX Device>,<actor No1>,<actor No2>)
Note: Value report from <actor No1> triggers polling on <actor No2>.
Example:
KNXWhenPoll (dvKNX,13,20)
KNXString2Array
Converts comma separated Feedback from 14 Byte Hex into Integer Array with 14 chars.
Syntax:
KNXString2Array (<CHAR sArray[]>)
Example:
nArray = KNXString2Array (sArray)
KNXArray2String
Converts Integer arrays with 14 chars to comma separated Array for 14 Byte Hex Type.
Syntax:
KNXArray2String (<Integer nArray[]>)
Example:
sArray = KNXArray2String (nArray)