Socket Messaging Via Siemens S7 PLC

Rusty_K

Member
Join Date
Mar 2004
Location
Norway
Posts
73
Hello!

I'm looking into sending various command strings to an ABB Robot via an Ethernet connection using socket messaging from an S7 Siemens controller. I've pretty much worked out the robot side of it but am in need of assistance for the plc side. The only experience I've had with ethernet communication for Siemens PLCs has been through an OPC server. Can anyone point me in the right direction in terms of hardware and/or referance documents? Any help would be greatly appreciated!

Thank you kindly for you time!

Cheers!

R.K.
 
Are you planning on using a Profinet cpu or a Cp card?. Ethernet communication differs alot depending on if you are using the integrated Profinet port or if you are using a Communication card.

Is ABB socket communication regular tcp/ip traffic?

Can you use hyperterminal to simulate communication with the robot?
 
Last edited:
Hey Bratt!

At the moment we are in the design stages of the architecture so we could go with either depending on which would give us the best performance.

Yes, Socket Messaging on the ABB robot is enable the transfer of application data between computers, using the TCP/IP network protocol.

Cheers!

R.K.
 
Last edited:
Using the integrated PN port would require more programming using a special communication card (CP 343 XX) requires less programming but you have to add a card so this route will cost more. If this where my project i would have bought the Cp card.

EDIT: A CP 343-1 Lean would be enough in this case and they are not so expensive.
 
Last edited:
So I've looked at the example on how to transfer / receive data streams via TCP. Everything makes since except when I get to the part of setting up the TCP connection. Now the example is between 2 CPU S7-315 2DP units. For each CPU, an ID & LADDR number needs to be specified in NetPro for use with the AG_SEND and AG_RECV_CR blocks. For my project, I need to send a TCP data stream to an ABB Robot. Does this mean I need to find an ABB GSD file for it's Ethernet port or is there a generic GSD file I need to use (have yet to find this!), or, are there function blocks that simply use the IP address to identify the sender/receiver

Any help would be greatly appreciated,

Cheers!

R.K.
 
Last edited:
I'm not sure which example you are looking at, but you don't need to know anythiing about the partner when sending messages like this. You just define the ip address and port, and it's up to the other device to be able to receive it. The same goes for listening- just set up a port, and wait for the partner to send something.

I would definitley download a freeware network sniffer and troubleshoot it that way. You'll have this working in no time.
 
Hi Rusty.

ID is the connection number setup in NetPro.
Without knowing anything about socket programming with ABB robots, I am guessing that you have to setup an unspecified connection in NetPro.
edit: For this you need to know only IP and Port as S7Guy says.

LADDR is the i/o address (in hex) of the CP module.
 
Last edited:
Rusty_K said:
Does this mean I need to find an ABB GSD file for it's Ethernet port or is there a generic GSD file I need to use (have yet to find this!),
About GSD files, then these are used with Profibus and/or Profinet.
This is something completely different to Send/Receive via TCP sockets.
If the ABB Robot supports Profinet, then this is the way to go.
 
Yeah, I checked regarding ABB and Profinet, apparently they havn't released Profinet cards as of yet but are working on it..
 
Last edited:
Ok, I understand (I think!) So the ID number refers to the connection. For each connection, I've defined the partner as "Unspecified". In the set up of each connection the remote IP and Socket will be, in my case, the IP and socket on the ABB robot. The AG_SEND and AG_RECV_CR blocks use the ID to reference the connection in order to determine the sender / receiver. Wicked!

Now it seems all too easy...!

Thank you all for the help.

Cheers!
 
Hey, just wondering why is it that using the integrated PN port on an S7-300 requires more programming than when using a CP343?
 
Variable message length

Does anyone know how to read how many bytes are waiting in the CP's data buffer?


I am surprised that AG_RECV_CR reads one byte at a time.

Maybe I shouldn't worry about cpu cycles...
 

Similar Topics

I'm working on getting a handful of devices hooked up to an EWEB card on an Allen-Bradley 1756 PLC using the Ethernet/IP socket interface, and...
Replies
5
Views
2,043
I have a bit of an odd situation. I'm having trouble sending ASCII commands over an open TCP socket. The problem is that I have a device that my...
Replies
9
Views
3,485
Hi Everybody, newbie here with PLCs, using a B&R plc. I'm playing with a printer and its tcp socket communication. Connection works fine if...
Replies
3
Views
152
Hi all, I have two questions I am hoping someone might have some information on. 1. I remembered reading somewhere on this forum that you could...
Replies
5
Views
191
Hello, I'm trying to setup a TCP connection from a Compactlogix 5069-L306ER to a TDI checkweigher to receive real-time weight data of the...
Replies
6
Views
323
Back
Top Bottom