TCP_Server (FB)¶
FUNCTION_BLOCK TCP_Server EXTENDS CBM.LTrig IMPLEMENTS ITCPServer
Sets up a server over the ip and port specified in ipAddr
and uiPort
. A server can handle several
connections. The output handle hServer
of these function block can be used to establish a
connection via TCP_Connection.
The output``xDone`` has no meaning.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xEnable
BOOL
TRUE
: Action startsFALSE
: Action stops, outputsxDone
,xBusy
,xError
are resettedLTrig
Output
xDone
BOOL
TRUE
: Action successfully completedLTrig
xBusy
BOOL
TRUE
: Function block activeLTrig
xError
BOOL
TRUE
: Error occurred, function block aborts actionFALSE
: No errorLTrig
Input
ipAddr
STRUCT(sAddr := ‘0.0.0.0’)
uiPort
UINT
Output
eError
hServer
CAA.HANDLE