Simply Modbus Slave 8
Modbus RTU Slave and Modbus ASCII Slave Software
Windows NT, 95, 2000, XP, Windows7, Windows8
display resolution: 800 x 600 minimum
PC with serial port (built in, serial card or USB serial port)
Installation - Simply Modbus Slave 8.1.3:
Unzip the compressed files into a common folder on your hard drive.
Starting the program
Select Simply Modbus Slave 8 from the Program area of the Start Menu.
You will see the demonstration startup window.
The progress bar will take approximately 15 seconds to load the demonstration version.
After purchasing and receiving a license key by email, enter the key and press OK.
The licensed program
The demo version
The Simply Modbus Slave Window
Yellow: Controls (inputs) that can be changed by the user.
When the program is opened, the circular clock indicator spins to show that the program is running. The program monitors the chosen serial port looking for incoming bytes from a modbus master. All bytes received (and sent) are displayed in the 'Log'.
The most recent request received is displayed in the indicator labelled "Latest Request received". A lookup is done to determine if the request has a valid SlaveID, function code, data addresses, valid data if writing and valid error detection bytes (CRC or LRC.
The request must meet the following 2 conditions before a response is generated and sent:
1) The ID in the request (the first byte received) must match the entered Slave ID,
2) The CRC (if RTU mode) or LRC (if ASCII mode) at the end of the request must be correct.
The request must meet the following additional conditions before a response with data is generated and sent:
4) The requested registers or coils must exist in an enabled block. More
specifically, the request must be for register
5) When receiving function codes that request writing data, the data
size and format must be correct.
On a multi-dropped network (eg. RS485) with multiple slaves, this application will also receive responses from other slaves.
Enter the input information in the controls to match the Slave you wish to emulate.
Select RTU or ASCII mode. more info...
Select the serial port on your PC that is connected to a modbus master.
serial settings: Set these settings to match the setting of the modbus slave device connected.
The 1st byte in the Request and Response strings
When this box is checked, the program will respond to requests directed to any Slave ID.
When checked, the program will send the data high byte first
When checked, the program will apply a
random multiplier to the values found in the tables
Context help is available by pressing
Ctrl-H while in the program.
Byte History Log
All bytes sent and received are added to the byte history log with date/time stamps.
Displays a 'Save As..' dialog box to allow the log contents to be saved to a text file.
Empties the log contents.
Uncheck this box to keep the log from scrolling when new data is added.
Displays information about the program including the program version.
Press the Close box 'X' in the top corner to Exit the program.
Data Table Setup Details:
Press the button to display and change the register and coil tables.
Six data tables can be setup that contain the blocks of data for the slave to respond with.
Blocks 1 to 4 are registers for storing numerical data
Each block can be set to enabled or disabled.
Each register block is set to respond to either FC03 or FC04 read register requests.
Each block can be set as read only to accept the only the function code above,
Each register block can be set as 16bit registers (typical for standard modbus),
This control selects the data type for the table. more info...
Sets the register or coil numbers for the block.
Sets the difference between the register number and the hex number used in the commands for each block.
This sets how many registers or coils are in each block.
A read-only indicator displaying the register or coil numbers as set above.
A read-only indicator displaying the hexadecimal equivalent of register or coil numbers minus the offset.
This is where the data values are entered.
Press OK to accept the changes entered.
Press CANCEL to leave the data unchanged.
Save and Restore Configurations
Displays a 'Save As..' dialog box to allow saving the current settings to a text file.
Displays a 'Open File' dialog box to allow selecting a previously saved settings file to load.
The configuration file is saved in tabbed text format (tab separated values) and appears like this in notepad...
The preset tabs in Notepad cause the cells with long
labels to push the other columns over.
Columns A & B contain the setting descriptions and their values.
The data can be saved and edited within a spreadsheet and then loaded into the program with the RESTORE CFG button.
To receive requests from a modbus master before sending a message, the serial port needs to be physically connected to a modbus master device. The simplest connection is RS232C on a single serial cable.
DTE masters (PC serial ports) have DB9 male connectors which transmits on pin3, receives pin2 and grounds on pin5. A DCE slave will have a DB9 Female connector which will allow the use of a straight through cable. A DTE slave will have a DB9 Male connector and will require the use of a null modem cable.
The RS232 specification states a maximum distance of 50 feet at 20kbaud. Slightly longer connections are possible at slower baud rates depending on cable quality and noise in the area.
Modems and radios are used to transmit longer distances. These are typically DCE devices so straight through cables can be used. Some MDS non-spread spectrum radios require RTS Delay to be used so a 4th conductor is needed on pin 4.
RS485 converters can be used to extend the distance up to 4000 feet at 100kbaud. This can be a 4 wire or 2 wire system, depending on the converter. This also allows multi-dropping up to 32 devices on one pair of wires.
Once the correct input data is entered, the program operates by itself.
When bytes are read on the serial port, they are displayed here.
The first byte of the request is shown in 'ID'. This is the Slave Address that the Master is requesting a response from.
The second byte of the request is shown in 'fc'. This is the Function code indicating which table to read from.
The 3rd and 4th bytes of the request are shown in '1st register req'. This is the register address of first register to read.
The 5th and 6th bytes of the request are shown in 'number of regs'. This is the number of registers to read.
The 7th and 8th bytes of the request are shown in 'CRC' (or 'LRC' if in ASCII mode).
crc The last 2 bytes of a modbus RTU message are the cyclic redundancy check. These are error detection bytes more info...
lrc ASCII Mode messages are preceded with a colon and the crc is replaced with an lrc (longitudinal redundancy check), carriage return and line feed characters. more info...
If the 'ID match', 'fc okay', 'data found' and ' crc ok' indicators
all turn green, a response with data will be generated.
A breakdown of the response is shown in the registers table
The columns show the register number (including the offset), its value in hex,
the decimal value of the data and this value in hex.
The bytes in the above data response are explained here:
0A The Slave ID responding
03 The function code
06 The number of data bytes to follow
00 1E 00 28 00 32 00 46 00 50 The data bytes representing the values in the requested registers.
E4 71 The CRC (or 'LRC' if in ASCII mode).
If the 'ID match' and ' crc ok' indicators both turn green, but the function code found is not supported, a response is generated with exception code '01'.
If the 'ID match' and ' crc ok' indicators both turn green, but the data is not found in the table, a response is generated with exception code '02'.
If the 'ID match' and ' crc ok' indicators both turn green, and a 'write data' function code 05, 06, 15, or 16 is found followed by valid data, the data is written to the tables and an appropriate response is generated.
If the 'ID match' and ' crc ok' indicators both turn green, and a 'write data' function code 05, 06, 15, or 16 is found followed by invalid or missing data, a response is generated with exception code '03'.
Check the physical connection to make sure the correct conductors are on the correct pins and the correct serial port.
Check the serial settings in the master device to make sure they match the settings in the slave.
Copyright © 2020 Simply Modbus. All rights reserved