- 7 -
3
Programming
3.1
Integrating the Module
At first, the program needs to get the information, what the Gateway’s IP-Address is.
This can be done by the Online_Event of the virtual Devices:
DATA_EVENT[vdvEIB]
{
ONLINE :
{
SEND_COMMAND vdvEIB,'IP=172.16.100.123'
}
}
(also see Appendix)
The Port for the Gateway has been set to 10002, which can not be edited.
The IP-Address will be set by the included gateway software.
On delivery, the Ethernet Address of the Gateway is set to 192.168.1.106.
The interface for the module, and for the communcation with the EIB-Gateway provides the virtual
device
vdvEIB.
Communication with the gateway is
ONLY
via the virtual device.
A complete documentation of available commands and string feedback is contained in chapter
„NetLinx module interface“.
The communication module (COMM module) translates between standard command interface on
NetLinx side and the protocol for EIB connection.
The communication module for EIB connection is integrated with the following source code line:
DEFINE_MODULE 'CTEIB7_mod' EIB7(
vdvEIB,
dvEIB,
lEIB_Value)
The parameters are as follows:
•
vdvEIB
- is the virtual device for communication with the module
•
dvEIB
- is the physical interface for EIB connection (gateway)
•
lEIB_Value
- is the central value array of the EIB actuators (type LONG!)
This Array hast to be defined in the section DEFINE_VARIABLE, and has to have a size of 3000:
DEFINE_VARIABLE
...
LONG lEIB_Value[3000]
...
The module also attends to the correct initialization of the serial interface, thus it is not necessary to
set the baud rate, for instance.
To access/analyze actuators on the bus, the EIB group addresses must be introduced to the program.
This is done in an external file, mapping group address, type, poll conjunction and additional features