| Tested Environment: |
Verify the code before buying
Colway Solutions provides a hex file so that the customer can test the code before buying the library
Modbus Slave RTU - Hex file download
Modbus Slave TCP - Hex file download
After downloading the hex file make sure you follow the steps for proper communication
1. For testing the Modbus Slave use Modbus Master (Eg: download Wintech Modscan32 http://www.win-tech.com/html/modscan32.htm which is available free or you can use any Modbus Master which you are familiar).
The below steps are written by taking Modscan as reference however configurations remains same for any Modbus Master.
2. Load and write the hex file into the Netburner terminal
3. For RTU: Open Modscan, go to Connection->Connect a dialog box appears where you need to set the following configuration
1. Baud Rate: 9600
2. Word Length: 8
3. Parity: None
4. Stop Bits: 1 as shown below
For TCP: Open Modscan, go to Connection->Connect a dialog box appears, set the following configuration
1. Choose Remote modbusTCP Server
2. Set IP address of the Modbus Slave i,e 169.254.45.90
3. Service Port: 502
Set system's IPv4 configuration 169.254.45.90, since the IP address of the Mosbus Slave is 169.454.45.91
4. After connecting, set
Length: 10 ( As we are sending 10 dummy data values from the Modbus Slave, anything beyond 10 shows 'Exception Response')
Device Id: 1
5. Now the Modbus master will be ready to communicate with the Slave.