Issue
What Techniques can be used to troubleshoot Modbus TCP/IP X Driver?
Product Line
Andover Continuum
Environment
Continuum Modbus TCP/IP X Driver
Cause
Advice/ tips required to help isolate & determine Modbus IP communications problems.
Resolution
The first thing to check is that you are using the latest release of the driver and manual, also that it is the correct one for the controller model you are using, currently V2.00002 for the 1st Generation controllers (e.g. Netcontroller CX9900 etc) and V2.00018 for the 2nd Generation controllers (e.g. Netcontroller II and bCX1). Download Modbus TCP/IP xDriver.
Ensure you are using only 1 XDriver for all your Modbus IP comms, if say you are using Comm1 as your X Driver enabled port then all of the Modbus IP points must be under Comm1, you cannot have 2 X Driver ports loaded with this X Driver (See Can multiple Modbus TCP/IP XDrivers be installed on a single 2nd Generation NetController?).
The following points should be checked with reference to the Modbus TCP/IP X Driver Manual downloaded with the software:
- Set the X Driver accordingly for Client or Server mode (Client mode and will be polling the 3rd party devices, server mode responds to requests for data).
- Check that your Configuration point has been setup correctly as a Infinity String and the parameters are correct for the mode you are using. For Client mode check that Param 1 is set to a polling rate that the 3rd party devices can cope with also that Param 3 is long enough for the devices to respond between 20 and 60 seconds.
- Use Parameter 4 to enable the error logging in an appropriate date format, this will then put the errors into the String array behind this point, ensure you have set the log size to say 50, automatic log and the interval to be 0 (a semi automatic log See How to log data only when a point changes). This will then log the error in the string each time they occur, you can view these errors with a function that loops for the log size printing out each line to the Message Window, or put a number of lines of the error log array lines on a graphic as lines of text.
- Create a Remote Device Status point to monitor the state of the remotely connected Modbus IP servers, again this can be put on a graphic to show which devices are on/offline.
By selectively disabling or removing some of the X Driver points you can limit the polling to certain devices, that way each device can be tested in turn.
Another tool that can help debugging Modbus IP comms is Wireshark as it allows you to monitor the IP comms between the Client and the Servers. Check the correct addressing and function codes are used in the polls and that the servers are responding correctly.
As per the Compatibility Matrix check that your NCII has a compatible firmware loaded for the Cyberstation software used (2.0x or 2.1x)
In Client Mode, ensure the 3rd party system does not poll the driver too fast, see Typical data throughput rates for Modbus XDrivers.
Ensure the Xdriver Objects (usually Numerics) have correct details within the Parameter Fields. An incorrectly formatted IP address can cause the Controller to Cold Start following a download.
The quickest way to check the Parameters is to load the Controllers with all the objects apart from the Xdriver Configuration String, then create a listview with parameters 1 to 6.