summaryrefslogtreecommitdiff
path: root/apps/modbus/README.txt
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-21 14:56:21 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-21 14:56:21 +0000
commitfcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3 (patch)
treea06bbe9986c21dae6763e584c9ab79394cb3b99b /apps/modbus/README.txt
parent1dc0e8b8c5b6e03fcfcdcbc89efd512f934eaca5 (diff)
downloadnuttx-fcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3.tar.gz
nuttx-fcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3.tar.bz2
nuttx-fcfd6c4d7ca3cc8d2751652a79a08d64eb8ec5a3.zip
FreeModBus is now integrated with the Nuttx configuration system
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4961 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/modbus/README.txt')
-rw-r--r--apps/modbus/README.txt54
1 files changed, 49 insertions, 5 deletions
diff --git a/apps/modbus/README.txt b/apps/modbus/README.txt
index 8ecf3f8db..da9b42fd4 100644
--- a/apps/modbus/README.txt
+++ b/apps/modbus/README.txt
@@ -1,14 +1,14 @@
apps/modbus README
==================
-This directory contains a port of last open source version of freemodbus
-(BSD license). The code in this directory is a subset of freemodbus version
+This directory contains a port of last open source version of FreeModBus
+(BSD license). The code in this directory is a subset of FreeModBus version
1.5.0 (June 6, 2010) that can be downloaded in its entirety from http://developer.berlios.de/project/showfiles.php?group_id=6120.
Directory Structure/Relation to freemodbus-v1.5.0
-------------------------------------------------
-The original freemodbus download consists of several directories. This
+The original FreeModBus download consists of several directories. This
subset takes only the contents of one directory, modbus/, that implements
the core modbus logic and integrates that directory into the NuttX build
system. The mapping between freemodbus-v1.5.0 and the nuttx directories
@@ -41,14 +41,58 @@ directory except that (1) it may include modifications for the integration
with NuttX and (2) the modbus/include directory was moved to apps/modbus.
The original, unmodified freemodbus-v1.5.0 was checked in as SVN revision
-4937
+4960.
The other directory here, nuttx/, implements the NuttX modbus interface.
It derives from the freemodbus-v1.5.0/demo/LINUX/port directory.
+Configuration Options
+=====================
+
+In the original freemodbus-v1.5.0 release, the FreeModBus configuration
+was controlled by the header file mbconfig.h. This header file was
+eliminated (post revision 4960) and the FreeModBus configuration
+was integrated into the NuttX configuration system.
+
+The NuttX-named configuration options that are available include:
+
+ CONFIG_MB_ASCII_ENABLED - Modbus ASCII support
+ CONFIG_MB_RTU_ENABLED - Modbus RTU support
+ CONFIG_MB_TCP_ENABLED - Modbus TCP support
+ CONFIG_MB_ASCII_TIMEOUT_SEC - Character timeout value for 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. Default 1
+ CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS - Timeout to wait in ASCII prior
+ to enabling transmitter. If defined the function calls
+ vMBPortSerialDelay with the argument CONFIG_MB_ASCII_TIMEOUT_WAIT_BEFORE_SEND_MS
+ to allow for a delay before the serial transmitter is enabled. This is
+ required because some targets are so fast that there is no time between
+ receiving and transmitting the frame. If the master is to slow with
+ enabling its receiver then he will not receive the response correctly.
+
+ CONFIG_MB_FUNC_HANDLERS_MAX - Maximum number of Modbus functions codes the
+ protocol stack should support. 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.
+
+ CONFIG_MB_FUNC_OTHER_REP_SLAVEID_BUF - Number of bytes which should be allocated for the Report Slave ID command. 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 CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED is set to 1.
+
+ CONFIG_MB_FUNC_OTHER_REP_SLAVEID_ENABLED - If the Report Slave ID function should be enabled.
+ CONFIG_MB_FUNC_READ_INPUT_ENABLED - If the Read Input Registers function should be enabled.
+ CONFIG_MB_FUNC_READ_HOLDING_ENABLED - If the Read Holding Registers function should be enabled.
+ CONFIG_MB_FUNC_WRITE_HOLDING_ENABLED - If the Write Single Register function should be enabled.
+ CONFIG_MB_FUNC_WRITE_MULTIPLE_HOLDING_ENABLED - If the Write Multiple registers function should be enabled.
+ CONFIG_MB_FUNC_READ_COILS_ENABLED - If the Read Coils function should be enabled.
+ CONFIG_MB_FUNC_WRITE_COIL_ENABLED - If the Write Coils function should be enabled.
+ CONFIG_MB_FUNC_WRITE_MULTIPLE_COILS_ENABLED - If the Write Multiple Coils function should be enabled.
+ CONFIG_MB_FUNC_READ_DISCRETE_INPUTS_ENABLED - If the Read Discrete Inputs function should be enabled.
+ CONFIG_MB_FUNC_READWRITE_HOLDING_ENABLED - If the Read/Write Multiple Registers function should be enabled.
+
Note
====
-The developer of freemodbus, Christian Walter, is still developing Modbus
+The developer of FreeModBus, Christian Walter, is still developing Modbus
libraries, although they are now commercial. See
http://www.embedded-solutions.at/ for further information.