Modbus TCP/IP

afreitas

Member
Join Date
Jan 2018
Location
Braga
Posts
5
Hi guys,

I am trying stablish communication between an S7-1200 and an APC MGE Galaxy 300 UPS and an APC MGE Galaxy 5500 UPS, via the Network Management Card 2 that each one have installed.

At this point, I am trying to comunicate with only one of them first. I am using MB_CLIENT block in TIA PORTAL V14 and the IP adresses of both UPS have been configurated. I can connect, and I think that the PLC send the request to the UPS, but it is not receiving the response with the holding registers that I am asking.

Clearly, I think that is missing me something. As a begginner, I am asking for some assistance/help. Thank you for your time ;)

A.jpg B.jpg
 

Attachments

  • Modbus register map.pdf
    38.6 KB · Views: 13
Last edited:
I don't think you are using the latest version of the Modbus TCP Client, have a look as shown in the picture and try changing to version 4.1. That allows you a much better selection of Modes. I had trouble with version 4.0 and the upgrade fixed it, just not sure which version you are using. Upgrading will screw up any other Modbus TCP Clients that you do have working so be careful.

Modbus versions.JPG
 
I don't think you are using the latest version of the Modbus TCP Client, have a look as shown in the picture and try changing to version 4.1. That allows you a much better selection of Modes. I had trouble with version 4.0 and the upgrade fixed it, just not sure which version you are using. Upgrading will screw up any other Modbus TCP Clients that you do have working so be careful.

Hi, I have version 3.1. I have changed to v4.1 but my PLC (annex) don't support that version I think.

C.jpg
 
Forgive me as I don't know anything about Siemens.

But what "Function Code" are you using. If your trying to read from Holding Resisters then you should be using function code 03 - but if your trying to read from Coil Registers then you should be using function code 01.

Each function code will only read from a certain register, meaning you can't use function code 01 to read address 40304 because that is an address for the "Holding Registers".

Don't forget some manufactures require a +1 offset for the address.
 
The Function Code was the reason I was hoping he could upgrade. The earlier Modbus Client I tried only allowed you to set two modes, either read or write and then it decided which Function Code to use depending on the value of the register you are trying to read. The later version allowed a lot more control.

You need to add a register that will store the Status value if the Error bit goes positive or if the Status value goes above 16#8000, if you can catch an error you can diagnose the problem.

Otherwise I guess you are going to have to use something like Wireshark to watch what is going out of the Ethernet connection so that you see if the PLC is requesting any data. The format of the Modbus packets is fairly easy to read and so you will see what the PLC is asking.
 
@damica1 and @BryanG, I really have notice the parameter "Function Code", but I wasn't able to discover what is the parameter that send that info to the UPS.

@BryanG, I have put some word going around and I will be able to get an S7-1500 to tests that will allow me to use MB_Client V4.1. Can you give me some light about the parameter that I must configure in MB_Client V4.1 to define the function code 3 in the communication between the PLC and UPS?
 
Two options for the mode should work. Mode zero if you use the Modbus address of 40305 or mode 103 with a Modbus address of 304. First thing though is to check the Status values to see if there are any errors. Then you can use Wireshark to log all network traffic, or disconnect the APC from the network, set your computer to the address that it had used and then use Hyperterminal or something similar to see the traffic going to port 502 at that IP address.
 
I have a modbus working between two different drives and a s7 1200. But instead I am using a mb master block and pointing to a datablock instead off direct into the memory words.
 
Two options for the mode should work. Mode zero if you use the Modbus address of 40305 or mode 103 with a Modbus address of 304. First thing though is to check the Status values to see if there are any errors. Then you can use Wireshark to log all network traffic, or disconnect the APC from the network, set your computer to the address that it had used and then use Hyperterminal or something similar to see the traffic going to port 502 at that IP address.

Hi guys,

Finally I have my S7-1500, so I started the configuration with V4.1 of MB_Client V4.1, but it the upgrade of the version of the block didn't work...

In annex I let you the parameters that I have configured hoping that you take a look and can help me with this.

Thank you for your attention and your time guys.

A.PNG B.jpg C.jpg
 

Similar Topics

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
348
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
161
I contacted Hach and bought a kit they recommended for a customer to add Modbus TCP capability to his Chlorine Analyzer with a SC4500 controller...
Replies
8
Views
194
I’m trying to read values from a device that can either send registers as 32 bit or a pair of 16 bit but if I understand right, the micro can only...
Replies
26
Views
672
Does anyone have any recommendations for Electronic Circuit Breakers with 0V Terminals built-in and Fieldbus (IO-LINK, MODBUS TCP, EtherNet/IP?)...
Replies
2
Views
167
Back
Top Bottom