Getting readings of read holding register 40001-40323 of modbus in one set.

S

Thread Starter

santosh das

I am developing a Modbus protocol based rs485 to usb and ethernet converter in which their are three sets of read holding registers set ranging from starting address 1- length 124, starting address 125- length 248 and starting address 249- length 323.I had developed embedded C code for my embedded rs485 to usb and ether net converter,and I had given a specific command based code by pressing through hyper terminal I be able to get data reply for eg:- press ‘g' for modbus data,but problem is that due to modbus limitation of 124 length data register i be able to get single set of readings at a time. If I want to get data from data register ranging from 125-248 and 249-323, I need to program again in the code given below and flash it to the converter card, which is hectic.

kindly look into the code:<pre>
modbusdata[0] = 0x01; // Slave Address
modbusdata[1] = 0x03; // Function code, 0x03, read holding
register
modbusdata[2] = 0x00; // address High of holding register
modbusdata[3] = 0x00; // address Low of holding register
modbusdata[4] = 0x00; // Number Hi of data register
modbusdata[5] = 0x76; // Number Lo of data register

calculate_CRC(&modbusdata[0], 6, &modbusdata[6]);</pre>
I want to get readings of 1-124, 125-248, and 249-323 data register readings in one time programming by pressing one command or by multiple command but by one time programming and flashing program in converter card. so Kindly by looking in to the above problem and code favor me by sending and code,command or any application that can help me in getting all the
readings at once.

mail id:- [email protected]
 
Top