Modbus Troubleshooting

For detailed RS-485 Troubleshooting steps, please see AN0303:
http://www.elkor.net/pdfs/AN0303-Modbus_RTU_Troubleshooting.pdf

When troubleshooting communications issues, it is best to completely simplify the system to isolate the problem. If possible, try using a stand-alone PC with Modbus Commander to ensure proper communications:
http://elkor.net/product/WattsOn-Mark_II#Software

You will require an RS-485 converter, such as this (or similar):
https://ftdichip.com/products/usb-rs485-we-1800-bt/

Detailed wiring instructions for the FTDI cable converter can be found here:
http://www.elkor.net/pdfs/ET485U_USB.pdf



Step 1) Make sure your device either has a built in RS-485 port or you are using the proper interface converter (ie: RS-232/RS-485). Elkor recommends that an interface converter with “automatic send data” control be used. This feature eliminates the need for RTS/CTS handshaking by detecting when the master is sending data and enables/disables the RS-485 output automatically. This eliminates one level of complexity, and allows the use of software that may not have a precise method of controlling the RTS/CTS line.

Step 2) Make sure your device is set up for the correct COM parameters (9600, N,8,1).

Step 3) Make sure your device is properly connected to the WattsOn. For short runs, only two wires (+/-) are required, but proper rounding should be observed over longer runs/noisy environments. Many times devices will specify the terminal connections as A/B instead of +/-. Usually the case is that A is connected to – and B is connected to +, however there may be an instance where this is reversed. Check the user manual of the PLC/converter for details.

Step 4) Make sure that each slave is assigned a unique address, and that the address of the unit in question is identical to the configuration in the master. The address configuration differs from device to device.

On the WattsOn, the DIP switch is a binary representation of the address from left to right. Do not confuse the DIP switch markings (1 through 6) with the address setting (32, 16, 8, 4, 2, 1).

Examples:
Address 1: Off, Off, Off, Off, Off, On
Address 10: Off, Off, On, Off, On, Off
Address 32: On, Off, Off, Off, Off, Off

The DOWN position is defined as "OFF"
The UP position is defined as "ON"

Step 5) Make sure your outgoing packet requests contain the correct data/syntax. Ideally some means to view the serial data (there are some freeware programs that allow viewing of incoming/outgoing serial data). A sample query/response packet is shown below (each set of brackets contains one hex digit byte).

The following query/response is from the WattsOn "Debug" (hex offset 0x85 or address 40134) register, which should always read "12345" (decimal):

Query:
[01][03][00][85][00][01][95][E3]

Response:
[01][03][02][30][39][6C][56]