Modbus TCP/IP extended Addressing - Unity Pro

the18

Member
Join Date
Nov 2019
Location
Casablanca
Posts
18
Hello,

P.S: I am new to this Forum, please excuse me if i ma writing in the wrong section or if i used something that isn't accepted within this community.


I am new with Unity pro, and i am adding a DTM Connection with Modbus TCP/IP protocole.

So i already connected successfully a PowerLogic PM5330 and i am reading Data without any problems.
Now I am trying to connect A P3U30, my problem is that P3U30 uses extended Addressses exemple "403020" and the RD address field in unity pro DTM request only accept 5 numbers, so i am assuming it is not created for extended addressing, please any one got a solution ?.

Best Regards and many thanks to you all.

Caapture.PNG
 
Welcome to the forum !

Traditionally Modbus use 5 digit addressing, then the Holding Register area address is 4xxxx where xxxx is a based 1 decimal offset, that has the limitation that the offset cannot be greater than 9999.
To avoid that some implementations switch to 6 digit addressing (4xxxxx) that allows offset > 9999

In your case using "43020" on Unity Pro should work
 
Last edited:
Thank you for your answer and quick reply,

So in my trial to read the Frequency from P3U30 i tried the following settings:

- 402021 as the register address couldn't enter it.
- 42021 as the register address, no response.
- 2021 as the register address, still no luck.
- 2020 as the register address, because in the PM5330 it only worked if i did (address - 1), so i tried it just in case... no luck sadly.

I attached a screen of the P3U30 register list so you get a better idea.

Thank you again for your time.
Best Regards.

Caapture.PNG
 
If you have an Android phone or tablet and the installation has a Wi-Fi access point, you can use also my signature HMI app to do quick tests. It uses 6 digit 4xxxxx addressing
 
Last edited:
I would think that if reading 3109 is successful, then reading 4021 in this case would work, too, because that's indexed register value.

1. Can you successfully read any value from the P3U30?

2. I note that the polling interval (repetitive rate) is 65mS. Some slave devices will 'choke' when they get polled too often because they haven't completed a reply when they get hit with yet another polling request.

3. Unit ID is 255. If that's a slave node ID from the RTU era and the device was originally RTU based, it might still pay attention to the former RTU slave ID and not answer if the poll ID does not match its ID even though the communications is TCP over Ethernet. Is there any setting in the P3U30 for slave ID?

FYI, 255 is outside the formal Modbus RTU range of slave ID's, the spec is 1 through 247

Is RD Length the number of registers read from the starting register? Have you tried "1"?

4. Some master/clients use the leading numeral (4) to indentify holding register data. Others do not do so and use only the actual indexed (from either zero or one) register value.

Your first screen shot indicates that this Modbus client does not use the leading numeral (4) because the register addresses have no leading numeral (4). Does your successful experience with the PM5330 confirm this?
 
Last edited:
Hi again,
I wanna thank you all for the quick and detailed replies to my issue.
The modbuspoll will indeed help me in future trials to reduce wait time when i am trying to communicate with a modbus for the first time. Thank you.

Mr danw, i will now answer your questions:

1. No, i have not yet been able to read anything from the P3U30.

2. I kept the default setting because it worked for the PM5330, i tried 150ms still no luck, if you have a specific PI please do tell me so i can try them.

3.I asked a co worked about the Unit ID for a Modbus TCP/IP since it only use IP address he told me it is 255. And yes the P3U30 web server shows a configuration for the Slave ID which was 1 and i tried it too. No luck.

RD is indeed the read length where we tell the CPU to read the total number of registers in one go. And I tried 1 for my first test and no luck.

4. Yes the Unity Pro DTM tool accept the register address without the 4 or 3 or 1 or 0. Because that is how i connected successfully to the PM5530. I tried it too with other things and it didn't work sadly.
Note: in the P3U30 ethernet port configuration i found that the default port was 44818 and because it didn't work i changed it to 502 as i know it is the most used port for Modbus TCP/IP. Yet no response ^^'.

Thank you all for your help, if any more ideas are available for me to try them please do share them with me.
Thank you all for sharing your knowledge.
Best regards.
 
44818 is the TCP port that is normally used by the Ethernet/IP protocol.

If that device supports both protocols, you will surely have changed the Ethernet/IP port, not the Modbus TCP one.
 
Hello everyone,

I tried the modpoll that Mr g.mccormick recommended for me and with my first try i got the following. (in the image), and i changed the port to 502, like Mr lfe suggested.


Any thoughts ?



what i understood from it is:

Like Danw said i need to specify the slave ID as 1 and not like a typical Modbus TCP/IP which is 255.

also, the poll rate in here i see is 1000ms so i will try it too.

Thank you all for helping me out.

I will keep you updated after i try Unity Pro again, if it doesn't work, i really won't know what will ^^'.


Mr lfe can you please give me the android app name or link, that would help too :).


Best regards.

Caapture.PNG
 
Hi everyone,

P.S: i will get rid of "Mr" incase one of us is a female i don't wanna be rude.

in this reply i will try to talk about all the changes that i made that made the connection happen and the Data readable.


1. the port is indeed 502 as i suspected and lfe confirmed.

2. I needed to get rid of the 40xxxxx extension like danw said and only keep the "2020".

3. I increased the poll rate to 1000ms like danw said at first and it worked, i rechanged it back to 60ms "for a trial" and it worked again so the poll rate wasn't the issue but i will keep this information in mind for future problems ^^'.

4. I defined the slave ID as 1 like what dawn suggested.

so in total, i had the wrong Port configured, and i assumed that i won't need the Slave ID, but i was wrong.

I attached the animation table that is showing a successfull connection with the P3U30.

Many thanks to:

lfe

cookie_cookie

g.mccormick

danw.

Best regards to you All

Caapture.PNG
 

Similar Topics

Hi folks, I have a Controllogix in communication with a zigbee coordinator using Logix AIO for modbus tcp. This zigbee coordinator have 3 slaves...
Replies
0
Views
58
I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
5
Views
183
Hello gentlemen, Im working on a small project on TIA Portal, about establishing a Modbus TCP connection between my ET200SP plc and a socomec...
Replies
12
Views
326
If a device has Modbus RTU over serial and Modbus RTO over TCP and Modbus TCP then there is a difference between Modbus RTU over TCP vs Modbus TCP...
Replies
7
Views
508
Hi There. I have PC to get few tags from PLC into C# windows forms application. What is the best and fastest way? I could not find Omron in...
Replies
3
Views
289
Back
Top Bottom