Internet PLC Forum

General => Technical support => Topic started by: dushyantbangal on September 11, 2017, 05:06:34 AM

Title: Modbus addresses
Post by: dushyantbangal on September 11, 2017, 05:06:34 AM
I want to read some data by querying my Nano10 PLC using ModbusTCP.

I was able to get DM[1] value at address 782. But I was not able to get DM[2] at 783.
However, if I put 782 and read range of registers, I get the next DM values.

Is there a list of different registers and their modbus addresses?
Title: Re:Modbus addresses
Post by: garysdickinson on September 11, 2017, 11:19:51 AM
The first problem is that the correct Modbus register address to access DM[782] should be 1782 not 782.  The basic rule to generate a Modbus register address for DM[n] addressing is to add 1000 to "n".

If the Nano-10 responds to Modbus address 782, it is not documented as to what address 782 might contain.  I cannot explain what you are seeing if you attempt to read multiple registers from the Nano-10 starting at modbus address 782.

The internal Modbus addresses are documented (hinted at) in the Nano-10 User Manual version 7.2 in figure 14.6.1.1

I have a couple of suggestions:

Code: [Select]
' Fill Nano-10 DM[n] locations with a value equal to the index, "n", for each of the
'   1000 DM[] registers supported by the Nano-10
'
for i = 1 to 1000
   DM[i] = i
next
Now you know exactly what to expect when accessing any DM[] location.

http://www.chipkin.com/products/software/modbus-software/cas-modbus-scanner/
[/list]

Best of luck,

Gary D*ckinson