ModSlaveSim help v3.04 - 1.5. Setting up ModSlaveSim
Download manual: HTML
This section gives an overview of how to set up and run ModSlaveSim. If you have an error you might find the online troubleshooting facility useful (see Troubleshooting ).
To configure and run ModSlaveSim perform the following steps:
Add Modbus Slave. Select Add Slave and enter the Slave Id to which ModSlaveSim should respond (see Add Slave). ModSlaveSim will also act on (but not reply to) write requests using a zero slave identifier (i.e. broadcasts). Requests using any other slave identifier will be ignored.
Configure the interface to the master. Select Edit Interface to configure the serial or socket interface to the Modbus master(s) (see Interface: Edit Interface to Master).
Optional step: Map Modbus Addresses. If you want to use coils or discrete inputs, or you want to use register addresses that differ from the addresses sent in messages, configure the address mapping by selecting Map Addresses (see Map Addresses).
Optional step: Handle Big Values. If you want to use 32-bit or 64-bit values, select Set 32/64-bit Values to configure the handling of these (see Set 32/64-bit Values).
Add Modbus Registers. Note that you can quickly import registers to a slave from a CSV file by selecting Import CSV... ). If you are unable to do this, select Add Register to define the registers that you want to model (see Add Register). Note that registers that you want masters to be able to write to should have the write flag set. Registers whose values you want to change independently of a master should have an appropriate statement entered - this can be done when adding a register or later on in the Edit Register Statement panel. A quick guide to the language that you use to enter the statement is provided in Language: Quick Start Guide followed by some practical simulations and techniques. All register features except for the address may be modified later. Note that once you have entered registers for a slave, they can be copied to another slave by exporting them to a CSV file, then importing them to the appropriate slave (sections Export CSV... and Import CSV... ).→ from the menu bar in the main window (see
In the main dialog:
Presson the toolbar, or type , to start the computation of the register values (if you defined statements to compute them). The simulation may also be started from → . To stop the simulation, press or type again.
Presson the toolbar, or type , to open the interface to the master and start listening for requests. This may also be started from → . To stop servicing requests and close the interface press or type again.
ModSlaveSim will update its display of the register values in the main window as they change.