Internet PLC Forum
General => Technical support => Topic started 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?
-
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:
- Write a PC6 program that contains a single custom function that runs on the first scan of the ladder logic. This CF should write an incrementing 16-bit pattern to each of the DM[] locations. This is what I'd suggest:
' 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.
- Change your Modbus TCP/IP program to use the correct registers address for DM[n]. Now see if you are actually getting the correct data from the Nano-10
- Use a Modbus test program that allows you to see exactly how the Nano-10 responds. I have used Chipkin Automation Systems CAS Modbus Scanner for both Modbus TCP/IP and Modbus RTU with the PLCs as clients and many other Modbus devices. This is a free program at:
http://www.chipkin.com/products/software/modbus-software/cas-modbus-scanner/
[/list]
Best of luck,
Gary D*ckinson