Mitsubishi Q02H- Modbus comms issue.

WitchFinder

Member
Join Date
Oct 2012
Location
Adelaide
Posts
2
Hi All! New guy here, found this place while using Google to research my problem, figured asking the experts has to be easier than banging my head against the wall for another week!

I have a project I'm working on, using a Mitsubishi Q02H CPU, communicating with a Schneider OTB remote I/O island through a QJ71MT91 Modbus module and a QJ71E1-100 Ethernet module.

This setup was existing to the site- they have expanded and we were contracted to install the interface panel, so we have simply copied the existing setup and added another OTB RIO unit for the expanded section of the site.

So, everything has been installed, it comes time to insert code and settings for the new portion of the site into the PLC. After a lot of head scratching, puzzling my way through dense Mitsubishi manuals and banging my head against the desk in frustration, I have managed to figure out what I believe are the correct comms setting for the Modbus connection to the RIO module.

Except it doesn't work. I have entered some test code into the PLC to show if comms is working, except input bits are not registering in the CPU Data registers, and if I toggle the input bits manually, the output bits come on, but don't write to the RIO module.

I can run run ping tests through both GX Configurator MB and DOS command line, and in both instances packet transfer is occurring. Plus, I can use the Advantys configuration software for the RIO module to connect from the switch the PLC is plugged into, so I know the cabling/IP routing is working.

So, as far as I can tell the TCP/IP part of the network is working, so I thought my Modbus settings might be out.

For reference, I added these settings in GX Configurator MB:

Basic Parameters- I added the IP address of the new RIO unit (10.1.2.42) to the Preferred Node specification, after the existing RIO module in the list (10.1.2.41) and set the same number of connections (2)

Auto Communications Parameters- I added three entries here-

Parameter 8 (These are the settings for Reading input registers)
Target station IP address- 10.1.2.42
Module ID- 127 (RIO Modbus node address, verified through Advantys software, is exactly the same as existing RIO)
Repeat Interval Timer value -3 (30ms scan interval, same as existing)
Type specification of the Target Modbus device- Read Holding Registers
Read setting:
Head Buffer Memory address - 1005 (hex memory address of QJ71MT91 buffer memory- should correspond to Data registers 1005-1009 in CPU)
Target Modbus Device head number - 0 (This is the the start of the holding registers on the RIO module, it uses 0-99 for input, first 16-bit Word is Network status bits, second Word is 16 bits corresponding to inputs 0-15, third word is 16 bits corresponding to inputs 16-31, therefore in conjunction with the above setting, the input bits should read into Data Registers 1006.0-1006.F and 1007.0-1007.F)
Access points- 5 (Reads 5 bits of data from device- only 3 are needed but 2 are left as spares for future expansion on the RIO)

Parameter 9 (These are the settings for reading the RIO status registers)
Target station IP address- 10.1.2.42
Module ID- 127 (RIO Modbus node address, verified through Advantys software, is exactly the same as existing RIO)
Repeat Interval Timer value -3 (30ms scan interval, same as existing)
Type specification of the Target Modbus device- Read Holding Registers
Read setting:
Head Buffer Memory address - 10060 (hex memory address of QJ71MT91 buffer memory- should correspond to Data registers 1096-1097 in CPU)
Target Modbus Device head number - 900 (This is the the start of the holding registers on the RIO module, it uses 900 onwards for Status bits.)
Access points- 2 (2 Words of Status data)

Parameter 11
Target station IP address- 10.1.2.42
Module ID- 127 (RIO Modbus node address, verified through Advantys software, is exactly the same as existing RIO)
Repeat Interval Timer value -3 (30ms scan interval, same as existing)
Type specification of the Target Modbus device- Write Holding Registers
Read setting:
Head Buffer Memory address - 3004 (hex memory address of QJ71MT91 buffer memory- should correspond to Data registers 3004-3007 in CPU)
Target Modbus Device head number - 100 (This is the the start of the write registers on the RIO module, it uses 100-199 for input, first 16-bit Word is Network status bits, second Word is 16 bits corresponding to outputs 0-15, third word is 16 bits corresponding to outputs 16-31, therefore in conjunction with the above setting, the output bits should write from Data Registers 3005.0-3005.F and 3006.0-3006.F)
Access points- 4 (Reads 4 bits of data from device- only 3 are needed but 1 is left as spare for future expansion on the RIO)


Auto Referesh settings weren't touched- 2000 Words of input starting at D1000, and 2000 words of output starting from D3000 seemed adequate.


So, can anyone help? Let me know if you need more info, I have a fat manila file full of printouts and the code sitting on a laptop next my desktop.

One thought I had while typing this wall of text out- by reading 5 bytes from the input registers where only 3 exist, could this be causing an error? Same for the Write registers, writing 4 when only 3 are used.......
 
One thought I had while typing this wall of text out- by reading 5 bytes from the input registers where only 3 exist, could this be causing an error? Same for the Write registers, writing 4 when only 3 are used.......


Welcome to the Forum!

I am not familiar with the Mitsubishi PLC, however, Modbus should be Modbus.

The Data sizes need to match. If you try and read or write a size larger than exists, it will fail.

Stu....
 
Just wondering if you are addressing it correctly.
0~15 = 1~16 in Modbus, by memory
 
Thanks for the help guys, turns out it was the wrong data sizes that was making things go loopy.

BTW, Wireshark and Modbus poll are freaking awesome tools.
 
Hey witchFinder
I might be moving over to Adelaide early next year
My Daughter and Grand Kids are there
 

Similar Topics

Hello all.... i have a q02h cpu by melsec iam trying to communicate with usb port but am not able to ......when i go with read from plc and click...
Replies
16
Views
7,048
Hello All, Merry Christmas to those of you who celebrate it. I have a Mitsubishi Q02H that I have some set data bits that are lifetime counters...
Replies
1
Views
1,536
OPen to all, Pl help me out to configure the Q series PLC Q02H and E100 digital display unit, so that they both communicate with each other. I am...
Replies
2
Views
3,777
hi all i am new here i have a mitsubishi smart touch hmi i.e ms-60t-pe but i cannot find a software to edit and download a program in it any help...
Replies
3
Views
92
I have Toyopuc PLC PC10G-CPU and some communication modules of it. With this modules I'm able to connect with Ethernet, Ethernet/IP, FLnet, FRMT...
Replies
0
Views
52
Back
Top Bottom