Member Login
member
passwd
remember me on this computer.

- join now -

Search

Neat Stuff

Visit our shop for nerds in control lifestyle products.

Cool stuff
Select a topic of interest:
...and press:
Fortune
Beware of all enterprises that require new clothes, and not rather
a new wearer of clothes.
-- Henry David Thoreau
RSS Feed
RSS feed Use this link to get an RSS feed of the Control.com article flow, for private, non-commercial use only:
www.control.com/rss
Select a Page Style
Select one of the following styles:
- BluFu
- Classic
(cookies required)
from the Siemens S7-300 PLC as a Modbus TCP Slave or Master department...
Siemens S7-300 PLC as a Modbus TCP Slave or Master
PLCs topic
advertisement
Posted by David Wisti on 22 November, 2006 - 3:16 pm
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?

Posted by Anonymous on 25 November, 2006 - 6:19 pm
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,

Best

Posted by Yesid Hernandez on 6 December, 2006 - 9:25 pm
Hi,

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.

Posted by Anonymous on 25 November, 2006 - 8:49 pm
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

Posted by Richard on 27 November, 2006 - 11:27 pm
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

Posted by David Wisti on 28 November, 2006 - 9:51 pm
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
2XV9450-1MB00-0YE0

David

Posted by Daniel Chartier on 29 November, 2006 - 9:04 pm
Hello David;

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:

Flyer:
http://cache.automation.siemens.com/dnl/TU1MDU3NQAA_22660304_FAQ/M odbus_TCP_Flyer_English.pdf

Manual:
http://cache.automation.siemens.com/dnl/jQwOTU3AAAA_22660304_FAQ/O pen_Modbus_TCP_HB_English.pdf

You can obtain further information on this topic at the following address:
Siemens AG
Industrial Solutions & Services
Information Technology Plant Solutions
Werner-von-Siemens-Str. 60
D-91052 Erlangen
Tel.: +49 91 31 7-46111
Fax +49 91 31 7-44757
E-mail: it4industry@siemens.com
Internet: <http://www.industry.siemens.com/IT4Industry/EN/INDEX.HTM>

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,
Daniel Chartier

Posted by David Wisti on 30 November, 2006 - 10:27 pm
Daniel,

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.

David

Posted by Michael Griffin on 2 December, 2006 - 8:39 pm
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.

Posted by Dave Reidy on 15 February, 2007 - 12:07 am
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.

dr

Posted by John Barnet Engineering on 29 November, 2006 - 11:32 pm
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.

Posted by Anonymous on 18 December, 2006 - 10:27 am
It can be both master and slave.

Posted by Nick Ford on 16 March, 2007 - 9:28 pm
I would appreciate a copy of your documentation for this...

Thanks and regards,
Nick

Posted by Mohoch Megabar on 1 June, 2007 - 11:13 pm
Hello Richard,

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.

Mohoch Megabar

Posted by Shahid Waqas on 29 November, 2006 - 10:48 pm
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!
--
Best Regards,
*Shahid Waqas*
shahid.waqas@gmail.com

Posted by Anonymous on 30 November, 2006 - 8:13 pm
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=Any bus-X

If you have any technical questions, email: support@hms.se

Posted by Alejandro on 6 December, 2006 - 7:48 pm
Try to use CP315-2DP with a CP343-1 and the FB OPEN MODBUS / TCP driver ver 2.1 (2XV9 450-1MB00).

Posted by Dave Reidy on 15 February, 2007 - 12:11 am
Please see my reply to Daniel's post above.

Posted by Oleg on 3 May, 2007 - 2:45 am
http://www.msx-box.net/wDeutsch/andere-dokumente/MSX-Box_S7_communicat ion_e.pdf

Posted by Anonymous on 5 May, 2007 - 9:36 am
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?

Posted by David Wisti on 14 March, 2008 - 1:31 am
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!

http://msx-box.blogspirit.com/archive/2007/03/21/simatic%C2%AE-s7- steuert-die-msx-box-%E2%80%93-das-beispiel.html

http://msx-box.blogspirit.com/files/modbusTC_read_8dig_inp.2.zip

http://msx-box.blogspirit.com/files/modbusTC_set8_dig_out.2.zip

From Control Engineering magazine...
Related articles from Control Engineering magazine
Above articles copyright 2008 Reed Business Information. Subject to its Terms of Use.

Your use of this site is subject to the terms and conditions set forth under Legal Notices and the Privacy Policy. Please read those terms and conditions carefully. Subject to the rights expressly reserved to others under Legal Notices, the content of this site and the compilation thereof is © 1999-2008 Control Technology Corporation. All rights reserved.

Users of this site are benefiting from open source technologies, including PHP, PostgreSQL and Apache. Be happy.

Advertisement
Our Advertisers
Help keep our servers running...
Patronize our advertisers!