Connection (FB)ΒΆ
FUNCTION_BLOCK Connection EXTENDS CBML.LCon
This function block returns diagnostic information of an EtherNet/IP connection. Call this cyclically to get the current values.
Note
Do not call outside the buscycle task.
PROGRAM PLC_PRG
VAR
udiConnectionNumber : UDINT;
FBConnection : IoDrvEtherNetIP.CIP_Object.Connection;
END_VAR
FBConnection(itfCipDevice := EtherNet_IP_Adapter, udiConnectionIndex := udiConnectionNumber, xValid => xValid);
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xEnable
BOOL
TRUE
: Activates the defined operationFALSE
: Aborts/resets the defined operationLCon
Output
xDone
BOOL
TRUE
: Ready condition reachedLCon
xBusy
BOOL
TRUE
: Operation is runningLCon
xError
BOOL
TRUE
: Error condition reachedLCon
Input
itfCipDevice
ICIPDevice
Remote or local adapter to read connection information from.
udiConnectionIndex
UDINT
The index of the connection in the list. The index starts with 0.
usiTransportClass
USINT
1
The transport class of connection to be read. The default is class 1 (I/O connection).
Output
xValid
BOOL
xValid is TRUE if the connection exists. It remains TRUE for remote adapter connections. For local adapter connections, xValid may become FALSE if the connection is disposed.
Properties:
Structure: