<< Click to Display Table of Contents >> Navigation: Modbus Universal MasterOPC Server > Description of the Mod_RSSim Simulator > Use of the Simulator together with Modbus Universal MasterOPC > Operation via the Modbus RTU Protocol |
Using the ModRSSim simulator, you could check and debug configurations of Modbus Universal MasterOPC without real devices. To debug devices via the Modbus RTU protocol, COM0COM is required to be installed previously (see Installation of com0com), and a virtual pair of COM ports is required to be created and configured as well (see com0com Configurator).
Assume that you create ports 13 and 14 in the COM0COM configurator.
Modbus Universal MasterOPC needs to be connected to one COM port of the pair, and ModRSSim, to another COM port of the pair, In this case, applications can exchange with data.
Using the shortcut, launch ModRSSim.
Automatic switching to the first COM port in the system takes place. If that port does not correspond to a port from the virtual pair, change it, pressing the button.
In the window displayed next, select the required COM port. If required, you can change port parameters (rate, parity, etc), see RS-232 Configuration for details.
Parameters are displayed in the window title.
Now let's configure the OPC server,
Add the communication node:
Set in the settings the follows: a node type - COM, a port - the second COM port of the virtual pair (14 in our case), connection parameters - similar to parameters that are set in ModRSSim.
Add the device to the node created.
ModRSSim emulates all of Modbus addresses, therefore set any address - for instance, remain 1.
Now you can add tags to the device.
It is possible to remain all default parameters - address 0 of the Holding Registers region will be polled.
Now it is possible to switch the OPC server to the run-time mode (press the Start button).
Poll of the simulator register starts.
If a value in the register 0 of the Holding Registers region in ModRSSim changes, the OPC server displays this. To change a value of a register in ModRSSim, double click a value.
See also Operation via the Modbus TCP Protocol