Tech Note 693 Using DASMBTCP to Solve Third-Party Modbus Device Communication Problems All Tech Notes, Tech Alerts and KBCD documents and software are provided "as is" without warranty of any kind. See the Terms of Use for more information. Topic#: 002465 Created: March 2010 Introduction The MBTCP DAServer is used to communicate to Modbus Devices over Ethernet. This Tech Note describes Common communication issues between the DASMBTCP object and third-party Modbus-compliant devices. Troubleshooting tips and solutions. Note: This Tech Note assumes you have a basic understanding of DAServers. You should also be familiar with generic Modbus devices. Application Versions DASMBTCP: 1.5 SP1 and later Communication to End Device Going In and Out of Slow Poll Mode This is a common occurrence when communicating to end devices that do not support multiple outstanding messages. By default, DASMBTCP will send up to four messages to the end device without receiving an answer back. Once there are four outstanding messages, DASMBTCP will wait for the end device to answer. Below is a simplified example for the poll cycle for end devices that support this: DASMBTCP sends a poll for register 400001 through 400005. DASMBTCP sends a poll for register 000001 through 000005. DASMBTCP sends a poll for register 100001 through 100005. DASMBTCP sends a poll for register 300001 through 300005. End device sends a reply to the first poll (400001 through 400005). End device sends a reply to the second poll (000001 through 000005). End device sends a reply to the third poll (100001 through 100005). End device sends a reply to the fourth poll (300001 through 300005). Cycle starts again. Some end devices do not support this and will ignore all but the first poll message. For example: DASMBTCP sends a poll for register 400001 through 400005. DASMBTCP sends a poll for register 000001 through 000005. DASMBTCP sends a poll for register 100001 through 100005. DASMBTCP sends a poll for register 300001 through 300005. End device sends a reply to the first poll (400001 through 400005). End device ignores the remaining polls. DASMBTCP waits for the second reply. Since the PLC has ignored this poll, DASMBTCP times out and goes to slow poll mode. After the slow poll period, this process starts again. To resolve this issue, set the Maximum outstanding messages parameter to a value that the end device supports. If the end device does not specify this parameter, set Maximum outstanding messages to 1. https://wdnresource.wonderware.com/support/kbcd/html/1/t002465.htm 1/7
FIGURE 1: MAXIMUM OUTSTANDING MESSAGE CONFIGURATION Floating Point Values Are Not Displaying Correctly DASMBTCP supports the 32-bit single precision floating point data type. You can use two consecutive registers to hold a floating point value that DASMBTCP can access. Enter the first register followed by a space and the letter F. For example: 400001 F. When accessing a floating point value on some end devices, the value may be incorrect. For example, if a value of 123.45 is expected but a value of -2.7E+38 is being returned, the order of the two 16 bit registers that make up the 32-bit floating point value must be reversed. This can be done by selecting (or unselecting) the Use Concept Data Structures (Reals) option in the DASMBTCP PLC object. https://wdnresource.wonderware.com/support/kbcd/html/1/t002465.htm 2/7
FIGURE 2: CONCEPT DATA STRUCTURES SETTING FOR REAL/FLOATING POINT VALUES 32-Bit Integer Values Are Not Displaying Correctly DASMBTCP supports the 32-bit signed and unsigned integer data types. You can use two consecutive registers to hold a 32-bit integer value that DASMBTCP can access. Enter the first register followed by a space and the letter L for 32-bit signed integer values and U for 32- bit unsigned integer values. For example: 400001 L. When accessing a 32-bit integer value on some end devices, the value may be incorrect. For example, if a value of 80000 is expected but a value of 947912705 is returned, the order of the two 16-bit registers that make up the 32 bit integer value must be reversed. This can be done by selecting (or unselecting) the Use Concept Data Structures (Longs) parameter in the DASMBTCP PLC object. https://wdnresource.wonderware.com/support/kbcd/html/1/t002465.htm 3/7
FIGURE 3: CONCEPT DATA STRUCTURES SETTING FOR LONGS Block Size Issues DASMBTCP optimizes polls to the PLC by asking for blocks of data from the end device. For example, a client requests data for registers 400001 through 400200. With the default I/O block size for Register Read set to 122, DASMBTCP sends two polls to the PLC. One poll is for addresses 400001 through 400122 and another poll is for addresses 400123 through 400200. If the end device does not support a block size of 122, the end device can send back an exception error or may not answer the poll. Check your end device documentation for the supported block I/O sizes and modify the Block I/O size option in the DASMBTCP PLC object editor. https://wdnresource.wonderware.com/support/kbcd/html/1/t002465.htm 4/7
FIGURE 4: BLOCK I/O SIZE SETTINGS Unit ID Issues Modbus protocol includes a Unit ID. This corresponds to the Unit ID assigned in the end device. By default, DASMBTCP will use a Unit ID of 255 for direct Ethernet connections. DASMBTCP only allows a user configurable Unit ID when the PLC object is under a bridge object (Figure 5 below). FIGURE 5: PLC OBJECT UNDER A BRIDGE OBJECT If the end device requires a specific Unit ID, a bridge object and a PLC object can be used even if the end device has a direct Ethernet connection. This will allow you to configure a Unit ID (Figure 6 below). https://wdnresource.wonderware.com/support/kbcd/html/1/t002465.htm 5/7
FIGURE 6: PLC UNIT ID SETTING Port Issues DASMBTCP uses port 502 by default. If the end device uses a port other than 502, the logger may show the following error: DASProtFail DASMBTCP Fail to Connect to PLC port.'name of PLC object' at IP Address 'IP address of end device', error code = 10061. If the end device requires a different port, use the ModbusPLC object. This object includes a configurable port number. https://wdnresource.wonderware.com/support/kbcd/html/1/t002465.htm 6/7
FIGURE 7: CONFIGURABLE PORT NUMBER Click the following icon to view this file in.pdf format: G. Alldredge Tech Notes are published occasionally by Wonderware Technical Support. Publisher: Invensys Systems, Inc., 26561 Rancho Parkway South, Lake Forest, CA 92630. There is also technical information on our software products at Wonderware Technical Support. For technical support questions, send an e-mail to support@wonderware.com. Back to top 2013 Invensys Systems, Inc. All rights reserved. No part of the material protected by this copyright may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording, broadcasting, or by anyinformation storage and retrieval system, without permission in writing from Invensys Systems, Inc. Terms of Use. https://wdnresource.wonderware.com/support/kbcd/html/1/t002465.htm 7/7