We (I am not the coder) are developing a C# dotNET Windows PC application that acts as a MASTER and talks to several MODBUS TCP/IP devices in an Industrial control network. These devices are:
1. Siemens PLC talking MODBUS TCP over fixed IP.
2. MOXA Gateways connected to several MODBUS RTU RS485 devices. Each gateway has a fixed IP and the PORT numbers are translated to Device ID.
Now we need to test our software if it is talking to multiple IP ethernet MODBUS TCPs. We are currently using MODBUS/PLC simulator on 6 PCs and some virtual PCs but need to test it with 100s of connections.
How can this be done? Any tools, software.
Also if there are dotNET experts who are reading this, please suggest what would would be the most reliable way of communicating with the devices. We have rolled our own MODBUS driver and talking to devices opening multiple sockets and transferring in chunks to multiple devices. Is this safe? Are we doing it wrong? Please advise
>2. MOXA Gateways connected to several MODBUS RTU RS485
>devices. Each gateway has a fixed IP and the PORT numbers
>are translated to Device ID.
We have a free slave simulator that supports multiple device IDs.
You can use Modbus protocol tester(master application) which is available for free to download from here:
you can communicate with multiple slaves using MPT.
It is possible to simulate 100s of IP addresses on a single network adapter on a Windows PC using the netsh command.
The syntax is as follows:
netsh interface ip add address "ETHERNET_ADAPTER" IP_ADDRESS SUBNET_MASK
netsh interface ip add address "Local Area Connection" 192.168.1.100 255.255.255.0
Note that you must run this command with admin privileges. Also, you will want to clean up any IP addresses you've made with the delete command:
netsh interface ip delete address "ETHERNET_ADAPTER" IP_ADDRESS
netsh interface ip delete address "Local Area Connection" 192.168.1.100
Once you've created the additional IP addresses, you should be able to use multiple instances of a Modbus Slave Simulator Software, each bound to a different IP address. Depending on how the simulator is written, a single instance may be able to bind to all IP addresses on a single network interface.
If third-party software does not work for Modbus Slave simulation, you could always write your own .NET application that invokes cmd.exe with the netsh command as an argument and then binds to a new TCP socket for each IP address created.