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
xEnableBOOLTRUE: Activates the defined operationFALSE: Aborts/resets the defined operationLCon
Output
xDoneBOOLTRUE: Ready condition reachedLCon
xBusyBOOLTRUE: Operation is runningLCon
xErrorBOOLTRUE: Error condition reachedLCon
Input
itfCipDeviceICIPDeviceRemote or local adapter to read connection information from.
udiConnectionIndexUDINTThe index of the connection in the list. The index starts with 0.
usiTransportClassUSINT1
The transport class of connection to be read. The default is class 1 (I/O connection).
Output
xValidBOOLxValid 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: