This document is a Quickstart guide to help install and run the Modbus TCP Server component on an XC-2 board.
Fix the XTAG into XC-2 Board. Connect the USB cable between XTAG and PC.
Find an ehternet cable and connect one end to XC-2 board and the other end to your PC.
Power up the XC-2 board with the adapter provided in the kit.
Once you have downloaded the Modbus TCP Server component, open the ‘app_modbus_tcp’ in XDE. You can indicate a static IP or a Dynamic IP configuration in main.xc file. Build and Run the project on XC-2 board.
In this application you can read the status of LED B by read_coil command and SET / CLEAR LED B using write_coil command.
Function codes can be found at Modbus Specification and Implementation Guide (http://www.modbus.org/specs.php).
Open the SimplyModbus from Start -> Programs -> SimplyModbus and adjust to following settings:
mode = TCP IP Address = user ip address provided in main.xc Port = 502 (Modbus Listening Port)
Alternatively, load the read_coil configuration file from $app_modbus_tcpsimplymodbus_configand click CONNECT.