From 535e696f23d7c0800f9bd4880879b34dfdf205ff Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Wed, 8 Apr 2009 08:25:50 +0200 Subject: [PATCH] New definitions for MAX_STATUS and MAX_REGISTERS --- src/modbus.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/modbus.h b/src/modbus.h index 12a79e4..1b91f29 100644 --- a/src/modbus.h +++ b/src/modbus.h @@ -55,8 +55,15 @@ extern "C" { */ #define MAX_MESSAGE_LENGTH 256 -#define MAX_STATUS 800 -#define MAX_REGISTERS 100 +/* Modbus_Application_Protocol_V1_1b.pdf (chapter 6 section 1 page 12) + * Quantity of Coils (2 bytes): 1 to 2000 (0x7D0) + */ +#define MAX_STATUS 2000 + +/* Modbus_Application_Protocol_V1_1b.pdf (chapter 6 section 3 page 15) + * Quantity of Registers (2 bytes): 1 to 125 (0x7D) + */ +#define MAX_REGISTERS 125 #define REPORT_SLAVE_ID_LENGTH 75 -- libgit2 0.21.4