- Q: What is a MODBUS RTU?
A: It's a PLC (Programmable Logic Controller), if that does not make sense, visit www.modicon.com .
- Q: Where do I get the protocol documentation?
- A: Visit www.modicon.com, and search for PI-MBUS 300. The docs are copyright, but free, hence I do not publish them.
- Q: I found a bug.
- A: Please go to my Support page, and log it. If you do not, I cannot fix it and this program will loose your valuable input.
- Q: How do I do XYZ?
- A: Some program features are not documented at this time, look around. If you get stuck, e-mail me.
- Q: MODBUS function 5 returns the old register's value
- A: There
is however one variation on the MODBUS documentation, for function
force single coil 0x05 -the simulator responds with the value before
modifying the actual coil, not after modifying the coil. This was
wrong, but was easiest to implement, and there is now a setting for
this. (See Emulation settings - Hotkey <CTRL>-M)
- Q: Where is the help file?
- A: The help-file is all in HTML, Just press F1 anywhere, and your browser will open a built-in generated help-file.
- Q: How do I go about using Matlab's modbus driver with the simulator?
- A: The Matlab driver starts at address 1, not 40001, so Holding registers 1,2,3 in Matlab are modbus registers 1,2,3.
- Q: Can the simulator work as a Master?
- A:
No it does not simulate modbus masters, there are plans for a master
which can be used to certify a slave-controller in the future. This
development is going to depend on a separate licensed system if it ever
is released. I do get this question quite often, and the proper answer
is very complicated indeed because a master requires quite a lot of
configuration before it will poll slaves in a useful fashion. I
believe that may explain why I never wrote a full master and only have
a master that implements integration-tests at the moment.
- Q: What language is the simulator written in?
- A: C++, and using the MFC framework. To make any substantial changes you will need to have quite a bit of MFC background.
- Q: Where is the Source Code?
- A: From the SVN repository on Sourceforge, here's how : if you have a client already, skip step 1.
1. Install subversion client from http://subversion.tigris.org/, select your operating system and install the client
2. Open command prompt, and go to folder you want to retrieve source to
3. Paste the next line into the prompt and hit enter
svn co https://modrssim.svn.sourceforge.net/svnroot/modrssim modrssim
It will open and compile under Visual Studio 6 or 9.
- Q: Why does the simulator not allow me to connect over TCP after 10 retries?
- A: This was a simulation option emulating non-graceful socket close (no FIN-ACK) to simulate broken WANs, if I can get funding I may make this a settable option.
- Q: Why did you publish this program?
- A: People tell you nothing is free, well, knowledge is. Largely I
believe it sux how we often pay for some things that other people get
for free, so here is something for free.
- Q: Why is my nick Zaphodikus?
- A: Because I read Douglas Adams when I was young, and it kind of stuck.
Terminology- SCADA is an acronym for Supervisory Control And Data Acquisition
- HMI stands for Human Machine interface
(scratchpad.... TODO:)
The simulator surpasses the limitations in other programs we have found in the past by:
- Simulate more than one RTU at once. (register values shared for all RTUs).
- Allows editing and display of all the registers.
- Allow scanning of registers not actually in the display.
- Running
on >1 comm ports (You have to run two copies of the program.). You
need to run the first copy; then, when you run it again, it defaults to
use the next free RS-232 port. All copies will use the same settings
though.
- A way of disabling just certain stations. (Just click on the boxes at the bottom.)
- Load
and save values you type into each register (the file is saved in the
same folder) as well as simulate changes in the values. Hotkey
<CTRL>-L =Load and <CTRL>-A for sAve.
- You can
specify the MODBUS PDU length (Protocol Data Unit) to simulate RTU's
with different internal telegram buffer sizes. Hotkey <CTRL>-M
- Display values in different formats hex/dec etc.
- Specify responsiveness of the simulator to simulate slow hardware. Hotkey <CTRL>-S .
- Simulate certain types of comms errors that would be hard to do in a "lab" situation.
- A basic comms debugger showing request/response. Hotkey : <CTRL>-C.
- Emulation to simulate MODBUS MOSCAD RTU on modbus. Hotkey <CTRL>-S or <CTRL>-M .
- Simulate noisy comms lines. Hotkey <CTRL>-N.
- It does check the CRC of all messages.
- It does handle flakey comms properly.
- Almost totally free, just mail the author for a key (or compile your own).
Not supported
- MODBUS ASCII protocol support :-(.
- This
application is not intended as a full implementation of MODBUS RTU nor
TCP/IP nor Allen-Bradley DF1, it is not commercially supported and no
liability is held for any damage or application changes made as a
result of it's use.
This is not the only simulator out there NModbus is also a good example of a C# simulator for modbus TCP/IP. Visit the Links page for additional resources and links. |
|