srvctes.htm

来自「串口调试工具 用于串口调 试的很方便」· HTM 代码 · 共 100 行

HTM
100 行
字号
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 2.0">
<title>Modbus Server Constants</title>
</head>

<body bgcolor="#FFFFFF">

<p align="center"><strong>Modbus Server Interface Error Constants</strong></p>

<p><strong>mbErrOk = 0 </strong></p>

<p>No Error.</p>

<p><strong>mbErrTimeOut = -2147220991 (&amp;H80040201)</strong></p>

<p>Time-out error when executing communication with a slave.</p>

<p><br>
<strong>mbErrInvResp = -2147220990 (&amp;H80040202)</strong></p>

<p>The slave returned an invalid response. </p>

<p><strong>mbErrCRC =-2147220989 (&amp;H80040203)</strong></p>

<p>Failed to check CRC of slave response.</p>

<p><strong>mbErrWrPort =-2147220984 (&amp;H80040208)</strong></p>

<p>Error when writing to a com port.</p>

<p><br>
<strong>mbErrRdPort = -2147220983 (&amp;H80040209)</strong></p>

<p>Error when reading from a com port.</p>

<p><strong>mbErrNotInit = -2147220982 (&amp;H8004020A)</strong></p>

<p>The com port was not initialized.</p>

<p><strong>mbErrExceptionCode = -2147188224 (&amp;H80048200)</strong></p>

<p>Errors <strong>&amp;H80048201 to &amp;H800482FF </strong>mean
that the slave return an Exception code where</p>

<table border="0">
    <tr>
        <td><strong>&amp;H80048201</strong></td>
        <td>Slave returned exception code 1 </td>
    </tr>
    <tr>
        <td><strong>&amp;H80048202</strong></td>
        <td>Slave returned exception code 2</td>
    </tr>
    <tr>
        <td><strong>&amp;H80048203</strong></td>
        <td>Slave returned exception code 3</td>
    </tr>
    <tr>
        <td align="center"><strong>...</strong></td>
        <td align="center"><strong>...</strong></td>
    </tr>
</table>

<p>These error are defined by modbus protocol.</p>

<p><strong>mbErrBufferOverflow</strong> = -2147219992
(&amp;H800405E8)</p>

<p>The buffer can not store a modbus message.</p>

<p><strong>mbErrReadSockError</strong> = -2147219989
(&amp;H800405EB)</p>

<p><strong>mbErrWriteSockError</strong> = -2147219990
(&amp;H800405EA)</p>

<p>Error while reading or writing using a socket api funtion.<br>
</p>

<p><strong>mbErrSocketError</strong> = -2147219991
(&amp;H800405E9)</p>

<p>Not specified socket error.<br>
</p>

<p><strong>mbErrSockNotConnected</strong> = -2147219988
(&amp;H800405EC)</p>

<p>Try to send a modbus message with disconnected socket.<br>
</p>

<p><a href="Autosrv.htm">Modbus Automation Server</a>.</p>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?