Got it

Siemens S7-1200 PLC client connection to SUN2000-KTLxxx via ModbusTCP

Created: Aug 11, 2021 08:05:56Latest reply: Aug 12, 2021 10:15:11 761 25 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi


Has anyone succeeded to connect Siemens S7-1200 PLC to SUN2000-KTLxxx via ModbusTCP protocol.


Tried but succeeded only via ModbusTCP simulator in PC.


Featured Answers
Abdussamed
Created Aug 11, 2021 08:08:37

Thanks for contacting the Huawei community!

We are checking your question and will provide an answer to you shortly...
View more
  • x
  • convention:

Recommended answer

BetterMing
Created Aug 11, 2021 08:55:10

Hello, dear.
The SUN2000 device uses the Modbus-RTU protocol, and it is not clear if it is compatible with the Modbus-TCP protocol.
View more
  • x
  • convention:

mahak
mahak Created Aug 11, 2021 09:00:39 (0) (0)
ModbusTCP is responding when testing with a simulator in PC as I wrote in the 1. post.  
BetterMing
BetterMing Reply mahak  Created Aug 11, 2021 09:10:22 (0) (0)
Sorry, the inverter does not support Modbus-TCP protocol  
BetterMing
BetterMing Reply BetterMing  Created Aug 11, 2021 09:11:23 (0) (0)
But Smartlogger devices support Modbus-TCP protocol  
mahak
mahak Reply BetterMing  Created Aug 11, 2021 09:12:51 (0) (0)
Sorry to say, but YES inverter is supporting  
All Answers
Thanks for contacting the Huawei community!

We are checking your question and will provide an answer to you shortly...
View more
  • x
  • convention:

Hello, dear.
The SUN2000 device uses the Modbus-RTU protocol, and it is not clear if it is compatible with the Modbus-TCP protocol.
View more
  • x
  • convention:

mahak
mahak Created Aug 11, 2021 09:00:39 (0) (0)
ModbusTCP is responding when testing with a simulator in PC as I wrote in the 1. post.  
BetterMing
BetterMing Reply mahak  Created Aug 11, 2021 09:10:22 (0) (0)
Sorry, the inverter does not support Modbus-TCP protocol  
BetterMing
BetterMing Reply BetterMing  Created Aug 11, 2021 09:11:23 (0) (0)
But Smartlogger devices support Modbus-TCP protocol  
mahak
mahak Reply BetterMing  Created Aug 11, 2021 09:12:51 (0) (0)
Sorry to say, but YES inverter is supporting  
GOOD
View more
  • x
  • convention:

mahak
mahak Created Aug 11, 2021 10:04:29 (0) (0)
Was this an answer to the orignal question or just a notice for your self?  
Unicef
Unicef Reply mahak  Created Aug 11, 2021 10:44:09 (0) (0)
Good question from user experienced  
Where from comes this (problem resolved) to the message chain 'Header'?

Problem is far from 'resolved'.
View more
  • x
  • convention:

BetterMing
BetterMing Created Aug 12, 2021 07:36:52 (0) (0)
When you set the answer as best, the question is automatically set as solved.  
mahak
mahak Reply BetterMing  Created Aug 12, 2021 10:39:24 (0) (0)
Can I take it back, cancel or change the best answer  

Hi,
I got it work with a S7-1500. I think for S7-1200 it should be the same.
See this post: https://forum.huawei.com/enterprise/en/firmware-v100r001c00spc120/thread/745393-100027?page=2

The trick is to use MB_Mode 103 instead of 0.

Just for interest, which PC simulator do you use? I found none, which worked, because they all interpreted MB-adress 30001-39999 as input-registers.



View more
  • x
  • convention:

mahak
mahak Created Aug 12, 2021 06:37:26 (0) (0)
Hi
I just have thought this thing, function code 103, because it seems that Huawei ModbusTCP communication is not according normal function codes.
Review of Modbus Function Codes
Function Code Register Type
1 Read Coil
2 Read Discrete Input
3 Read Holding Registers
4 Read Input Registers

Huawei wants to use F03 to read input area 30001-39999 and F04 is meant for 40001-49999  
mahak
mahak Reply mahak  Created Aug 12, 2021 06:39:55 (0) (0)
Sorry the last line should be:
Huawei wants to use F03 to read input area 30001-39999 and F03 is meant for 40001-49999 in Modbus descriptions.  
mahak
mahak Reply mahak  Created Aug 12, 2021 06:42:22 (0) (0)
I used Modbus Poll for testing this thing.
Cannot put a pic here  
mahak
mahak Reply mahak  Created Aug 12, 2021 06:48:58 (0) (0)
Maybe this MB_Mode 103 was created because of this kind of a problems, no limits for the register number....
I noticed this "MB_Mode 103" from some youtube video.

I would have tested it but unfortunately my Siemens MB_Client is more according Modbus standard and do not have this, I only have MB_Mode 0 in TIA versio 14.  
Did you set the MB_Unit_ID to 1? By default it is FF in the S7, which will not work. You can set it in the instance-data of MB_CLIENT
View more
  • x
  • convention:

mahak
mahak Created Aug 12, 2021 07:00:03 (0) (0)
Yes I did...

I think this modbus function F03<>F04 mismatch is the only problem now when seeing you posts,
Thanks confirming my thoughts...  
mahak
mahak Reply mahak  Created Aug 12, 2021 07:08:39 (0) (0)
I have Modbus client v3.x in my TIA and it seems it's needed 4.x to reach this mode 103!  

TIA V14 is pretty old. I'm on V17. May be you can select a newer version of the MB_Client:

MB_version

I don't know, when Mode 103 was implemented.

View more
  • x
  • convention:

mahak
mahak Created Aug 12, 2021 07:39:52 (0) (0)
Yes, I checked and I can select V4.1 from TIA14. Also there is mode 103, so far so good...
Then comes this 'BUT': S7-1200 plc has firmware 4.2 and not yet sure is it supporting this V4.1 Modbus.
Right now tells me 'not supported' when switched to new Modbus version...not sure yet is it just TIA which is confused about this sudden 'surprise surprice'... continue checking.  
mahak
mahak Created Aug 12, 2021 08:23:33 (0) (0)
By the way, how long this TIAv17 has been available...is it already ok and steady version?
I Have not lately officially worked with TIA, maybe latest been TIA15 or 16.
Thinking upgrade from TIA14 for this home hoppy setup...  
mahak
mahak Reply mahak  Created Aug 12, 2021 08:25:17 (0) (0)
MQTT in my mind...  

Finally working...reading daily kWh to Siemens 1200 FWv4.2 via ModbusTCP from registers 32114-32115,

method was to going arround strange function of ModbusTCP in Huawei i_f01.gif


Had to change also following 'open user communication' to the latest to achieve functional Mode103:

versions


Already over 6000 readings, so couple of in one second...


View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.