TwinCat and Siemens S7 Interface

RheinhardtP

Lifetime Supporting Member + Moderator
Join Date
Oct 2004
Location
Perth
Posts
562
Hi All,

I was wondering how hard it is to interface a Twincat Soft plc to a Siemens S7 315-2DP for some data interfacing using Ethernet.

Has anybody done this?
Do you require additional hardware interfaces?

Is it better to use profibus as your interface and how do you handle the multiple masters situation.

Any help will be appreciated.

Rheinhardt
 
RheinhardtP, What kind of Ethernet interface do you have on the S7 PLC, is is a ProfiNet master? If the PLC has ProfiNet master, Beckhoff has a ProfiNet slave supplement software that can be installed on the TwinCAT PC, it is documented here...
http://infosys.beckhoff.com/content/1033/tcprofinetslave/html/tcprofinetslave_append.htm

Otherwise, if the TwinCAT PC has a Profibus port available, like a Beckhoff FC3101 card, then you can easily configure that as a Profibus Slave.

Either way should be fairly easy to configure.
 
There is also the possibility of Modbus TCP.
There is a Modbus TCP library for S7, and a Modbus TCP library for TwinCat. Neither are free though.

There is maybe also the possibility to use Ethernet Sockets. S7 has the "Send/Recieve" protocol which is fairly low-level. If TwinCat also can use low-level ethernet sockets, then it could be possible to create a direct connection to TwinCat. It will take some effort, but there are someone who has done the same between an S7 and a Contrologix with an EWEB module. The advantage would be that it would allow direct communication without gateways and without the expense for software libraries.
 
We are thinking of using a CP343-1 Lean.

Our local support has given the following reccomendations
Since Siemens base almost all comms on ProfiBUS/NET it would probably be a good idea just to use a slave profibus device on an EtherCAT bus. I would prefer we do it via Ethernet as this is our network topology.

I would really like to investigate Steves recommendation. It looks if this will be our best solutions.

R
 
Thanks RheinhardtP, it looks like that Siemens module can be a ProfiNet IO Master, so it should work with the ProfiNet Slave software supplement installed on the TwinCAT PLC. That would be most compatible with your existing Ethernet Infrastructure.
 
No, CP343-1 LEAN cannot be a "master" = Profinet IO Controller.
It can be a "slave" = Profinet IO Device.

I think the way cheapest is to add a Profibus slave module to the TwinCat PLC.
 
JesperMP, thanks for the information about the Siemens module. Given that information, I agree, the cheapest/easiest way to solve the problem would be to add a Profibus slave to the TwinCAT PLC.
 
ProfiNet

Hi Steve, thank you for the valuable information. The specs have slightly changed and we are using is a CPU 315-2 PN/DP.Which is perfect.

Does this additional TwinCAT software supplement have licensing requirements,at a cost?



It looks straight forward from the Siemens ProfiNET side, How much setup would one require on the TwinCAT side. Our Bechoff suppliers dont really know this supplement. They are thinking Modbus but the way i see it the ProfiNET is the right solution,with minumun cost implications.

What disadvantages have you come across using the ProfiNET?

Many Thanks for your valuable input again.

R
 
Last edited:
RheinhardtP, The proper name for the software is "TwinCAT PROFINET IO Device (Slave)". It is licensed separately. Your local sales should be able to get you a price based on that name.

The Beckhoff setup is straightforward, it is documented in the InfoSys, here...
http://infosys.beckhoff.com/english...profinetslave/html/tcprofinetslave_append.htm

I don't think I want to weigh in on the strengths and weaknesses of ProfiNet vs. Modbus TCP, I don't want to start a jihad. (you can PM me if you'd like)
 
Thanks again!!! Will be testing with Local supplier within the next couple of days..
 
Hi,
I've just written a Step7 GET-like function on a Beckhoff BC9xx0 Controller, to read data out of a S7-300 PLC over ethernet.
It uses the S7 communication, so you can't use it for realtime applications. This protocol is not documented, so you have to find out yourself how it works (or take a look into the libnodave source code).

On TwinCAT side there is no need for additional libraries. I am using the TCP functions which can be found in the TcBaseBX9000 library. I think the low level routines are free on every Beckhoff controller series.
 
Hi Thomas v2, thanks for that information, that sounds very interesting,and I'm certain it would be useful for multiple customers.

You are correct that TCP/IP is provided with the lower-cost controllers at no additional cost, however, with the Windows based TwinCAT systems, CX controllers and higher, the TCP/IP Libraries mentioned earlier do have an additional cost.
 

Similar Topics

Sorry if this has been asked before, and apologies if this seems like a trivial issue, but I am new to Beckhoff and have been banging my head...
Replies
1
Views
60
Hi everyone, This is my first time posting, so please forgive any omissions or mistakes. I am attempting to control the velocity of a stepper...
Replies
18
Views
750
I am trying to communicate between a 1769-L16 and a beckhoff EL6652 EtherNet/IP-Master. I need 8 INT and 2 REALS. When I generate the eds file, in...
Replies
1
Views
111
Hi everyone, I'm a last year student at the university in Ghent, and for my thesis i need to write a TwinCAT program that writes data to a .daq...
Replies
0
Views
119
We have a Pinnacle power supply from Advanced Energy which we'd like to control using TwinCAT 3, via an EL6002 and RS-232. I got the...
Replies
2
Views
697
Back
Top Bottom