Testing a 32-Input module with Modbus Master Sim & Arduino, beginner advice needed

This seems somewhat straightforward, but maybe it is not.
I'm experimenting with a 32-digital Input module, said to have "MODBUS RTU 03 06 command control mode". See attached.

I have it working (somewhat) using a simple Arduino sketch, verifying this example:
For example: Read channel X00-X15 port value:
Send data(RS485 address is 1):01 03 00 C0 00 01 84 36
Returns data:01 03 02 00 80 B9 E4
01 RS485 address,03 Function,02 length,B9 E4 crc16,
00 80 represents the input status of X00-X15, the eighth bit is 1, the other bits are 0; it means that X07 has input, and other channels have no input
Using the Arduino, the RS485 is from a MAX485 board connected to a serial port of an Arduino Nano, works great. With the Modbus Master Simulator, I'm using a USB to RS485 dongle I've had around a while. It is listed in the Win10P device manager as USB-Serial CH340 (COM8), and has the latest driver.

So next I'm trying to use the Radzio! Modbus Master Simulator. This app seems very simplistic, with few settings, but it doesn't work.
I have the serial port set correctly, and device setting I'm quite sure, but every frame returns 0 valid response and an error.

I have attached the manual and the Modbus RTU protocol paper that was included from the manufacturer.

Is there possibly a setting of this board, like "Input port status reporting" that must be set to enable the Modbus Master Simulator?
I'm trying to learn how this operates to create a simple input status indication display to use on the farm.

Any advice greatly appreciated.
 

Attachments

Looks like the Radzio! Modbus Master Simulator is only sending frames like:
"<tx>0x01 0x02 0x00 0x00 0x00 0x0A 0xF8 0x0D </tx>"
But this 32-Input module will only respond to the 03 Read function, not 02 function.
 
In the Radzio! Modbus Master Simulator there is a dropdown menu to select the type in the Device Settings section. You currently have Input Status selected, which results in the 02 function code. You need to select Holding Register for it to use the 03 function code. Also, the Address field should be 192 (0x00C0 hex), not 0 and the Length field should be 1, not 10.
 
Thanks jschulze.
I have it working in Radzio! now.
RMMS_scn.png

I'm looking for some example code for Arduino, the Modbus master.h libraries (examples) I have looked at leave a lot of unanswered questions in the area of reading holding registers, function 03, and basic configuration. My first step is to create a simple Modbus Poll display like above. I'm looking for a better understanding of the 'Read each individual Input - one-by-one' on my above board. I'm going to use a serial port monitor/logger to view exactly what is being send and received by Radzio!.
(no Edit in this forum? or is it because I am a new member?)
 
Top