Can a Siemens S7-300 CPU315-2 DP with a CP343-1 Ethernet card communicate as a Modbus TCP slave or master? If so, is there any example code someone is willing to share?
Hi, I told you that siemens do not offer ModBus Communications but I found ET200S-modbus_SIprod_info_76.pdf file where is described a possibility using ET 200S Serial Interface Modbus/USS Module,
I have a similar app, but with a S7-224 CPU and the CP231-1 Ethernet Interface, I will like to know if anyone have any idea to get the Modbus/TCP slave configuration working with this equipment. Thanks.
If I am not wrong Siemens do no offer ModBus communications, anyway with a Siemens S7-300 CPU315-2 DP with a CP343-1 you could get communications using Profibus DP (may be you can also use Profibus FMS)
I hope this helps you, you can send me a mail to autcon20ATyahooDOTcomDOTar
You require a Point-to-Point Communications Module CP341 installed in the rack along with the Modbus Dongle to activate the Modbus Drivers. I have documentation if you need further info.
Regards - Richard
Thanks for the info, I didn't know about the CP341 and Modbus. Actually, I'm looking for a Ethernet solution using function codes FC60 AG_LRECV and FC50 AG_LSEND with an Ethernet CP. The CP341 is a serial port (RS232/422/485) and that solution is Modbus RTU not TCP. Siemens does have an Open Modbus library but I can't seem to find any information other than a part number:
FB OPEN MODBUS / TCP
I always presumed (not to say "assumed") that Siemens did not support Modbus/TCP. Your post made me look a little deeper, and here is what I found on different Siemens webpages:
Siemens websites on Modbus/TCP options:
You can obtain further information on this topic at the following address:
Industrial Solutions & Services
Information Technology Plant Solutions
Tel.: +49 91 31 7-46111
Fax +49 91 31 7-44757
If you are located in Amwerica, note that you might have trouble getting pricing and delivery info from your local rep; divisdion of certain Siemens markets and products may be strange to understand for us laymen. In that case you would need to deal directly with the European providers, possibly using a Simatic Card (prepaid buying cards used for certain transactions over the web).
Thanks for the new comm. oppertunities,
Thanks for tracking that info down, it should help it trying to purchase this library. My Siemens Rep. said, "Since it's very pricey for one thing but also it's not readily available/supported here in the US." He went on to say there might be shareware versions meaning customers had made there own custom implementation of Modbus TCP. Its very feasible to write a custom protocol with FB50 and FB60. I was hoping someone else has been down this path and might have a working example to share. I really only need to implement a simple class 0 master or slave.
If anyone some reason decides to write their own Modbus TCP implementation for the S7-300, Siemens wrote a Modbus RTU (not TCP) "driver" for the S7-200 in ladder (or possibly IL, I haven't looked at it) which they provide for free. This could be used as an implementation guide for the S7-300.
The Open Modbus/TCP you describe has a few problems. It uses the AG_SEND and AG_RECV Siemens blocks, which in turn use SFC58 and SFC59.
In any complete TCP/IP transaction, these limit the length of any transfered data to 240 bytes. (Some of the CPs are stated to transfer more, but they do this by splitting the data into 240 byte transactions).
Unfortunately Siemens do not seem to have implemented the IP protocol fragmentation scheme correctly, so each of these transactions will appear (to, for example, a Windows socket) as complete and separate.
The maximum data length of a Modbus RTU message is 255 bytes, and the Modbus TCP header adds a further 6 - i.e. greater than the 240 limit.
If you are sure that you will never have more than 240 characters (which is 234 if you exclude the ModbusTCP header) then you are probably OK. If you are not certain, then you should take further advice.
The S7 300 will do Modbus TCP if you have the newest Ethernet card. It is very easy and the part number you listed is correct. When you purchase the package there are samples contained within the software.
You can also go to http://support.automation.siemens.com and search their FAQs for Modbus TCP and it will tell you everything you need to know and it has a manual you can download to tell you all the details.
Your Siemens rep can also get you more information or you can call their hotline and ask them.
I came across your message and thank god. I have a serious application where I need an existing S7-300 with a CPU 314 2DP to communicate with a set of 8 Schneider SEPAM Power relay set as Modbuse slaves 2 through 9. Could you kindly forward your documentation to my e-mail address at satel_ service @ yahoo. com, since my connection to the internet is so slow that I cannot download any reasonable size file?
Thank you in advance for all your kindness and best regards.
I do not think that Siemens does Modbus TCP, as far as I know. (Dont know of any latest developments - Siemens people: Any comment)
However, they do the Serial Modbus. You need CP341 (Serial) and Modbus software for either Master or Slave (as required). I have seen simplex connection, but not sure if it would do redundant modbus communication as well!
You can also make it easy for yourself and use a gateway. HMS has one that "translates" from Profibus to ModbusTCP.
for more info, go to: http://www.anybus.com/eng/support/support.asp?PID=244&ProdType=Anybus-X
If you have any technical questions, email: firstname.lastname@example.org
I went to the webpage and tried to find the S7 example mTCPRead project. I can't seem to find it. Can you provide a link?
Just to close the topic, I finally did find the links to the examples. Looks like a S7 can talk Modbus TCP as a client in these examples. Thanks Oleg!
Siemens S7 315-2PN/DP(profinet version) can support Modbus TCP protocol by OPEN IE way!
zhonghua from shanghai yamato scale co.,limit <email@example.com>