Most modules in the protocol stack are completly optional and can be excluded. This is specially important if target resources are very small and program memory space should be saved.
All of these settings are available in the file mbconfig.h
协议栈中大多数模块是可选的并且可以被包含。这对于目标资源有限的应用非常重要,在这种应用中,需要节省程序存储空间。
所有的这些设置都在mbconfig.h中进行。
| |
Defines定义 | |
#define | MB_ASCII_ENABLED ( 1 ) |
#define | MB_RTU_ENABLED ( 1 ) |
#define | MB_TCP_ENABLED ( 0 ) |
#define | MB_ASCII_TIMEOUT_SEC ( 1 ) |
#define | MB_FUNC_HANDLERS_MAX ( 16 ) |
#define | |
#define | |
#define | |
#define | |
#define | |
#define | |
#define | |
#define | |
#define | |
#define | |
#define |
|
| If Modbus ASCII support is enabled. Modbus ASCII 协议支持 |
|
| The character timeout value for Modbus ASCII. Modbus ASCII协议中字符超时值 The character timeout value is not fixed for Modbus ASCII and is therefore a configuration option. It should be set to the maximum expected delay time of the network. Modbus ASCII协议中的字符超时时间不是一个固定值,因此是一个可以配置的值。这个值可设置为网络中的最大的延迟时间。 |
|
| Maximum number of Modbus functions codes the protocol stack should support. Modbus协议栈支持的功能码的最多值 The maximum number of supported Modbus functions must be greater than the sum of all enabled functions in this file and custom function handlers. If set to small adding more functions will fail. 这个最大值要大于所有使能的功能函数和用户功能处理函数的总和。如果值设小了,如果增加功能处理就会失败。 |
|
| Number of bytes which should be allocated for the Report Slave ID command. 为Report Slave ID命令分配的字节数目 This number limits the maximum size of the additional segment in the report slave id function. See eMBSetSlaveID( ) for more information on how to set this value. It is only used if MB_FUNC_OTHER_REP_SLAVEID_ENABLED is set to 这个数值限制了在执行report slave ID时候附加信息的长度。参考eMBSetSlaveID( )获取信息来确定需要如何设置这个值。 |
|
| If the Report Slave ID function should be enabled. Report Slave ID 功能使能 |
|
| If the Read Coils function should be enabled. 读线圈状态功能使能 |
|
| If the Read Discrete Inputs function should be enabled. 读离散输入功能使能 |
|
| If the Read Holding Registers function should be enabled. 读保持寄存器功能使能 |
|
| If the Read Input Registers function should be enabled. 读输入寄存器功能使能 |
|
| If the Read/Write Multiple Registers function should be enabled. 读写多个寄存器功能使能 |
|
| If the Write Coils function should be enabled. 写线圈状态功能使能 |
|
| If the Write Single Register function should be enabled. 写单个寄存器功能使能 |
|
| If the Write Multiple Coils function should be enabled. 写多高线圈功能使能 |
|
| If the Write Multiple registers function should be enabled. 写多高寄存器功能使能 |
|
| If Modbus RTU support is enabled. Modbus RTU支持使能 |
|
| If Modbus TCP support is enabled. Modbus TCP支持使能 |
cnchip_906380433 2008-8-24 01:36
用户162249 2008-7-14 18:12
用户135729 2007-12-25 10:45
我们老师出的题目是:某某微角度测量仪的设计
请问我应怎么写啊?
用户109362 2007-9-5 21:41
不好意思,我没有。