Modbus RTU

Protocol Emulation Settings

Basically all the settings you see here allow me to simulate peculiarities in all the modibus PLCs I needed to interface to in the real world.

The modbus RTU (Remote Terminal Unit) is the core protocol variation, the other variation is ASCII (American Standard Code 'for' Information Interchange), I'm not sure which was invented first, but the one is generally easier to read at the expense of telegram size and slightly weaker checksum. The ascii protocol can also interface over unusual transports and computing languages that may take offense to encountering null (zero) characters in the telegrams, making it easier to debug and implement ASCII than RTU. That said this simulator forgoes the ASCII implementation due to trivialization.

All right, now why are emulators so complicated? Well the emulation settings here all customise this simulator for the common modbus RTU dialects (even ASCII has 2 dialects that I know of). The first dialect is a bug, and so I called it the "clone", and it hinges around endian-ness.
You can see the "Clone" option on the main program screen.

The next variation is a well documented one, and revolves around simple cost, memory and I/O cost money and space, sometimes you only need 16 outputs, and sometimes you can only afford 4k of RAM, modicon origionally produced a numberr of models, in increasing power and capacity, but the range is all but obsolete today, however all we really need is to let you write up your own Upper limits.
Next up is PDU (Protocol Data Unit) which defines the maximum telegram length by specifying the maximum data (which excludes the message framing) length.
The MOSCAD is a mystery setting (I did say emulators are complex), it defines a variation of the protocol that breaks modbus registers up into tables, I would explain more at this point, but if MOSCAD and Motorola Radio Telemetry is your playground, this option'smeaning will be known to you already.

Modify coils/regs controls the response data to a write request, because the response to some requests also return the data in the response. Normally the PLC must handle the request, and then respond with the modified (updated) contents, but some clones don't do it this way because they are either caching the data, or there is a need to return the old values.

Disable writting
or (read-only) mode was added because some PLCs are just plain not writeable, in this mode, it is an error to send any command that might modify the PLC. Read-only mode can also be toggled from the "System" menu.

Use a separate set of registers is a simple table mapping which works like so:
In the above screen I have set an upper limit of only 30 registers in the PLC, what then happens is you will have 30 *255 registers, allocated in batches of 30 per station. It's not often you need this mode, and it is not intuitive in the way it works in the user-interface, but that's just the way it works.


You can then still see which station address you edit as below.


Comments