When developing applications of modbus, you need a modbus Server or Client. But not everyone has a real PLC. That's why PLC TCP simulator exists. Here are two tools introduced, both on windows. Before reading this note, I assume you already know what Modbus
is and how Modbus TCP
works.
The trial version of ModSim and ModScan has limitation but it's sufficient for testing purpose.
ModRSsim2
The feature of this tool is that it set all the 255 modbus IDs available. It's convenient for massive address testing.
This is an open source software, requires Microsoft Visual C++ Redistributable for Visual Studio 2010. If you don't have it installed, you can check them here:
Just double click the ModRSsim executable:
You can select modbus point type to display and type of modbus connection(TCP and RS232 available, RS232 is not covered in this tutorial) as highlighted below:
As described above, this tool set all the 255 modbus IDs available, listed at the bottom of the window. You can click a specific one to disable it and it will turn into red from green. Moreover, if a station(PLC ID) is reading by a modbus client, it will has a yellow border. Note that at a modbus client side, reading a disabled station(PLC ID) will only receive a exception returned from this tool.
You can double click the value of a specific address to modify it.
To view raw TCP packages, click Comms
at the right bottom corner. Click Registers
to go back to register values.
If you need a more detailed manual, press F1
in the program and it will open a web page of detailed help.
ModSim
Unzip the file and execute the exection. Yes there is only one execution ModSim64.exe
. You should see it's asking for registration information. Press the esc
untill no more prompts pop up.
Go to File
=> New
and then Connection
=> Connect
=> Modbus/TCP Svr
. Leave the Service port as default 502
. You should see a window showing address pool with coresponding values. You can also double click a value to modify it.
There are messages counts from modbus master: Connection
=> Status
Leave ModSim
opened and connected. We will read the data from ModScan
in the next step.
ModScan
Again, unzip the file and execute ModScan64.exe
. Press esc
to skip registration prompts.
To connect to the simulated device(ModSim
): Connection
=> Connect
. Set options like this(the IP Address can be set to some thing else if the modbus slave is not on the same machine):
Note that the settings of ModSim
and ModScan
should be the same. And the Length
of ModScan
should be no bigger then ModSim
's to prevent exception.
You can reapt File
=> New
to create more sections in both ModSim
and ModScan
.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing