You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old January 12th, 2018, 08:33 AM   #1
afreitas
Member
Portugal

afreitas is offline
 
Join Date: Jan 2018
Location: Braga
Posts: 5
Modbus TCP/IP

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
Attached Images
File Type: jpg A.jpg (61.7 KB, 22 views)
File Type: jpg B.jpg (83.5 KB, 20 views)
Attached Files
File Type: pdf Modbus register map.pdf (38.6 KB, 13 views)

Last edited by afreitas; January 12th, 2018 at 08:49 AM.
  Reply With Quote
Old January 12th, 2018, 08:58 AM   #2
karlek
Member
Croatia

karlek is offline
 
karlek's Avatar
 
Join Date: Jul 2014
Location: Varazdin, Croatia
Posts: 46
Have you tried using "Absolute Starting Register Address" equivalent of register 40305, i.e. 304?
  Reply With Quote
Old January 12th, 2018, 09:18 AM   #3
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,166
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.
Attached Images
File Type: jpg Modbus versions.JPG (18.0 KB, 107 views)
  Reply With Quote
Old January 12th, 2018, 10:15 AM   #4
afreitas
Member
Portugal

afreitas is offline
 
Join Date: Jan 2018
Location: Braga
Posts: 5
Quote:
Originally Posted by karlek View Post
Have you tried using "Absolute Starting Register Address" equivalent of register 40305, i.e. 304?
Hi, I have already tried but nothing.
  Reply With Quote
Old January 12th, 2018, 10:18 AM   #5
afreitas
Member
Portugal

afreitas is offline
 
Join Date: Jan 2018
Location: Braga
Posts: 5
Quote:
Originally Posted by BryanG View Post
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.
Attached Images
File Type: jpg C.jpg (27.8 KB, 98 views)
  Reply With Quote
Old January 12th, 2018, 03:11 PM   #6
damica1
Member
United States

damica1 is offline
 
Join Date: Aug 2015
Location: Illinois
Posts: 325
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.
__________________
David M. Camp
Automation Engineer
Marshall Electric / www.mei-tech.com

PLEASE READ: https://www.prlog.org/12642091-marsh...-industry.html

PLEASE READ: https://www.prlog.org/12680572-marij...hold-word.html
  Reply With Quote
Old January 12th, 2018, 04:33 PM   #7
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,166
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.
  Reply With Quote
Old January 13th, 2018, 09:03 AM   #8
afreitas
Member
Portugal

afreitas is offline
 
Join Date: Jan 2018
Location: Braga
Posts: 5
@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?
  Reply With Quote
Old January 13th, 2018, 01:47 PM   #9
BryanG
Member
United Kingdom

BryanG is offline
 
Join Date: Feb 2005
Location: Manchester
Posts: 1,166
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.
  Reply With Quote
Old January 16th, 2018, 01:15 PM   #10
JBA-DK
Member
Denmark

JBA-DK is offline
 
Join Date: Sep 2015
Location: Haderslev
Posts: 51
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.
  Reply With Quote
Old January 31st, 2018, 10:11 AM   #11
afreitas
Member
Portugal

afreitas is offline
 
Join Date: Jan 2018
Location: Braga
Posts: 5
Quote:
Originally Posted by BryanG View Post
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.
Attached Images
File Type: png A.PNG (28.7 KB, 3 views)
File Type: jpg B.jpg (63.2 KB, 2 views)
File Type: jpg C.jpg (21.3 KB, 2 views)
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Ethrnet IP, Ethernet TCP/ip, Modbus TCP/ip Steve_D LIVE PLC Questions And Answers 4 June 23rd, 2016 07:36 PM
Ethernet TCP/IP and Allen-Bradley CompactLogix (RSlogix 5000) CAAJ LIVE PLC Questions And Answers 14 December 18th, 2015 12:46 PM
Modbus Master not polling the Modbus Slave through an EtherNet/IP Connection mihiri LIVE PLC Questions And Answers 3 July 15th, 2010 02:41 AM
Wonderware Modbus TCP/IP troubleshooting PLBoudette LIVE PLC Questions And Answers 1 May 8th, 2009 01:22 PM
Mitsubishi Q Series Modbus TCP module QJ71MT91 set up help req'd... Pocko LIVE PLC Questions And Answers 0 July 30th, 2006 02:45 AM


All times are GMT -5. The time now is 04:43 PM.


.