MasterUDP
MasterUDP (FB)
MasterUDP (FB)FUNCTION_BLOCK MasterUDP IMPLEMENTS IKnxConnector
Overview
The MasterUDP function block serves as a KNX driver for communication with a KNX Net/IP gateway. It processes telegrams and coordinates communication with slave function blocks.
Inputs
xEnable
TRUE
Enable/disable the function block
sIPAddressKNXInterface
''
IP address of the KNX interface
uiPortKNXInterface
gc_LibPara.gc_uiPort
Port number of the KNX interface
itfNetworkInterface
-
Network interface for communication
uiPortPLC
gc_LibPara.gc_uiPortLocal
Port number of the PLC
xResError
FALSE
Error reset flag
tResponseTimeout
gc_LibPara.gc_tResponseTimeout
Timeout duration for requests
Outputs
xConnected(BOOL): Connection statusitfKnxConnector(IKnxConnector): Interface for slave blocksudiConnectedSlaves(UDINT): Number of connected moduleseStatus(KnxStatus): Current KNX connection statusstDeviceInfo(DeviceInfo): Device informationstKnxData(KnxData): KNX data structurebChannel(BYTE): Communication channel identifiereError(ErrorKnx): Current error statuseLastError(ErrorKnx): Last error
Usage
Configure the KNX interface with
sIPAddressKNXInterfaceanduiPortKNXInterface.Set
uiPortPLCaccording to your PLC configuration.Enable the block with
xEnable = TRUE.Monitor
xConnectedfor the connection status.Use
itfKnxConnectorto interact with slave function blocks.Check
eStatusandeErrorregularly.Use
xResErrorto reset error states.
Notes
Ensure correct network settings (
itfNetworkInterface) are set.Adjust
tResponseTimeoutadjust for network latency if needed.
InOut:
Input
xEnable
BOOL
TRUE
On/Off
Input
sIPAddressKNXInterface
STRING
‘’
IP of the peer e.g. IP/Knx
Input
uiPortKNXInterface
UINT
gc_LibPara.gc_uiPort
Port of the peer e.g. KNX GW
Input
itfNetworkInterface
IIoDrvEthernet.INetworkInterface
Input
uiPortPLC
UINT
gc_LibPara.gc_uiPortLocal
Port of the controller
Input
xResError
BOOL
FALSE
Error reset
Input Const
tResponseTimeout
TIME
gc_LibPara.gc_tResponseTimeout
Timeout time for request
Output
xConnected
BOOL
Output
itfKnxConnector
IKnxConnector
THIS^
IF for comm. module FBs
Output
udiConnectedSlaves
UDINT
Number of modules
Output
eStatus
KnxStatus
Output
stDeviceInfo
DeviceInfo
Output
stKnxData
KnxData
Output
bChannel
BYTE
Output
eError
ErrorKnx
Output
eLastError
ErrorKnx
Last updated

