Commands and functions
P.
235 of 349
Network functions
Activation codes
Name resolution
Standard-Ports
UDP telegrams
UDP Ports
Readudp
To use the network functions of this chapter, the option NP must be activated in the Enertex
®
EibPC.
You have to know the serial number of your Enertex
®
EibPC and have to acquire the respective
additional package. The activation code is linked to the serial number of a single device and cannot
be used for other devices.
To transfer a valid activation code to the Enertex
®
EibPC, choose the menu E
IB
PC → T
RANSFER
A
CTIVATION
C
ODE
... and follow the instructions.
For some network functions (
sendmail
,
resolve
), the Enertex
®
EibPC requires a connection to a DNS
server. Information about the configuration or function test of a DNS server can be found on page
137.
The ports via which the Enertex® EibPC communicates can be changed via the Options / Ports
menu. This menu generates a [
Ports
] section, which then receives the following entries
[Ports]
///UDP InPort
12600
// UDP OutPort
3245
// TCP Port
23456
//Modbus Port
5901
The Enertex
®
EibPC itself sends the data of a UDP transfer always from its port 4807, whereas the
receiver's port can be chosen arbitrarily.
The Enertex
®
EibPC receives the data of a UDP transfer always from its port 4806. Therefore, the
transmitter must use this port as destination. The port the transmitter send its data from can be
determined by the Enertex
®
EibPC.
Definition
●
Function
readudp
(
port, ip, arg 1
[
, arg2, ... argN
])
Arguments
●
Argument
port
of data type u16 (the transmitter's outbound port; the transmitter's
destination port must always be port 4806).
●
Argument
ip
of data type u32 (the transmitter's address in the usual notation, e.g.
192.168.22.100)
●
arg2
to
argN
of arbitrary data type
Effect
●
Received “user data” start with the 3rd argument. Their number and data type is arbitrary.
●
If a UDP telegram is sent to the Enertex
®
EibPC, every function
readudp
updates its
respective arguments. The arguments of the
readudp
function are filled with data up to the
length of its arguments. In any case, the variables
port
and
ip
of the function
readudp
are
overwritten with the current data of the transmitter every time a UDP telegram is received.
●
The IP address (variable
ip
) is defined in the usual notation (xxx.xxx.xxx.xxx with xxx:
number between 0 and 255).
●
If your LAN device can be addressed by a name and DNS, the function
resolve
can
replace an explicit IP address.
●
To detect incoming telegrams, the function
event
can be applied to
readudp
. This will
become necessary if telegrams with identical content have to be evaluated (see below).
●
The Enertex
®
EibPC always receives from port 4806. This port cannot be changed and
must be taken into consideration by a UDP transmitter.
Data type result (Return)
●
none
Example: Write data received from UDP telegrams to the KNX
TM
bus
A UDP telegram is sent by the transmitter 122.32.22.1 to the Enertex
®
EibPC via the
transmitter's port 2243u16. The user data consist of three u08 values and shall be sent to the
group addresses 3/4/0,3/4/1,3/4/2 whenever a UDP telegram arrives.
HandbuchEibPC_USA-30.odt, 2017-05-11
Enertex
®
Bayern GmbH - Erlachstraße 13 - 91301 Forchheim - [email protected]