ModTcpInfo (FB)
FUNCTION_BLOCK ModTcpInfo EXTENDS AbbLCon3
Function Block serves to read Modbus TCP/IP information
- InOut:
Scope
Name
Type
Initial
Comment
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