ModTcpInfo (FB)
FUNCTION_BLOCK ModTcpInfo EXTENDS AbbLCon3
Function Block serves to read Modbus TCP/IP information
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts a single operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation, if BUSY=TRUE (Note: During Aborting the Busy is still TRUE). Afterwards all outputs will be reset. For executing another operation the Enable input needs to be retriggered by another rising edge!
AbbLCon3
Output
DoneBOOLFALSE
Operation is completed without error (while outputs Busy and Error are FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE.
AbbLCon3
BusyBOOLFALSE
Operation is running (while outputs Done and Error are FALSE)
AbbLCon3
ErrorBOOLFALSE
Operation is stopped with error (while outputs Busy and Done are FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLCon3
Input
EthBYTEETH1
Index number of the assigned Ethernet interface - input is ignored, existing for compatibility reasons only
Output
ErrorIDERROR_ID.NO_ERROR
Code of error occured during executionNO_ERROR - Execution successfully completedERR_NOT_CONFIGURED - Modbus TCP not configuredERR_INTERNAL_ILLEGAL_ARGUMENT - Stack reports illegal argument (internal error)ERR_UNKNOWN - Undefined errorNumSrvBYTE0
Maximum number of supported Server connections (PLC as Modbus TCP Server)
RdyBOOLFALSE
OpenModbus on TCP/IP processing ready
StatWORD0
Status of OpenModbus on TCP/IP processing. Set to 0 in any case, output left for compatibility reasons only
NumErrsDWORD0
Number of errors occured. Does not cover TCP/IP issues like ‘failed to connect’, Modbus errors on established connections only
LastErrWORD0
Code of last error occured. Set to 0 in any case, output left for compatibility reasons only