Siemens S7 TCP IP Comunication

antoine

Member
Join Date
Sep 2002
Posts
62
Dear colleagues,

I am working on a good old Siemens S7 (315-2DP), I installed an ethernet board CP343-1.

My (old) s7 software is V5.5 + SP1

I added Simatic NET PC Software, edition 2008 + SP2.
This is the first surprise, I see no difference in the NetPro window.

I found a beautiful manual on the Siemens Web site:

Configuring a TCP connection via Ethernet (TCP native) between a SIMATIC S7 and a PC with Socket Interface

[FONT=Arial, Helvetica, sans-serif]They are big differences between what they show and what I have on my console:[/FONT]
[FONT=Arial, Helvetica, sans-serif]
[/FONT]

[FONT=Arial, Helvetica, sans-serif]Their ID is "0001 A050"[/FONT]
[FONT=Arial, Helvetica, sans-serif]My ID is "00D6 0006"[/FONT]
[FONT=Arial, Helvetica, sans-serif]D6 = 214 in decimal, very different with their 0001 !?[/FONT]
[FONT=Arial, Helvetica, sans-serif]
[/FONT]

[FONT=Arial, Helvetica, sans-serif]The LADDR input of the "AG_RECV" function is called "Module adress in hardware configuration"[/FONT]
[FONT=Arial, Helvetica, sans-serif]In their example they have "W#16#100"[/FONT]
[FONT=Arial, Helvetica, sans-serif]Where does that come from ???[/FONT]




IP adress, OK I can put my adress 192.168.0.200
PORT: ??? I have nowhere to type it in ???


Option "Send / Receive"
I have nowhere to type it in ???





And of course all the trials I have done put the processor in STOP, bad situation ...


I can give you more infos or screencopys, but let's go back to basics, are my software versions OK, can this have a bad influence on the configuration ?


Thanks in advance,


Antoine
 
You enter the port and send/receive in different tabs of the TCP connection properties window.
 
I always found that the information required to set this up in the code is in the "General Information" tab of the window L D[AR2,P#0.0] shows on post 6.

If I remember correctly, the manuals indicated as such too, but it's been a while since I played with it.
 
I added Simatic NET PC Software, edition 2008 + SP2.
This is the first surprise, I see no difference in the NetPro window.



This software is not needed for what you are trying to accomplish! Regular Step7 is enough
 
You're right Bratt, it's completely unneeded, I'll remove it !

For the others very good suggestions I will try that when I will be back on site, I will let you know...
 
Dear all,

After a few days, it works !
The first problem was in the istallation of the Ethernet card, I selected randomly the version.

But it is really needed, it is written on the front face of the board, not only on the side (not visible when the board is in the PLC rack)

The config adviced by L D[AR2,P#0.0] is very important but these windows are only available when you create it, then no more accessible (?!)

Finally, the length of the message was difficult to find, I used another receiver to capture it, it has 9 bytes (9*8bits) more than the original table sent.

The main problem is that when you change the length in the S7, you need to reset the sender, else you are in a strange situation like a part of the end the previous message begins the new one ...

So when I reseted the sender for my last trials, I found it !

Thanks and good luck to the others Siemens Ethernet players :)

Antoine
 
The config adviced by L D[AR2,P#0.0] is very important but these windows are only available when you create it, then no more accessible (?!)

Double click the connection in Netpro to access the configuration again.
Netpro.jpg

The main problem is that when you change the length in the S7, you need to reset the sender,

I don't think you understand the basis of TCP/IP. The protocol is stream based there is no such thing as lenght! Thats why Siemens use IsoOnTcp.
 
Read this FAQ. It contains a pretty good explanation on why it does not work as you expect it to do.


When data is transferred with the TCP, the transfer is made in the form of a data stream. In this case no information is given about the length nor about the beginning and end and so the recipient cannot tell where one message ends in the data stream and where the next begins.
 

Similar Topics

I am trying to establish communication between Siemens PLC 1500 and Matlab. I followed a tutorial on youtube at this link: But when I got to the...
Replies
0
Views
367
Hi, If we have PLCs on different subnets is it possible to do TCP comms data transfer between them? I'm assuming if we use a routing switch and...
Replies
3
Views
827
Hello All, For S7-400H system, can we make this redundant PLC (connected to one uplink switch) to communicate simultaneously with 3rd party HMI...
Replies
2
Views
1,496
I have a system with an ET200SP controlling a Profinet network already pre-established. Am I correct in that I can add a Modbus TCP/IP node and...
Replies
2
Views
1,928
At my wits end.....I have a Siemens S7-1200 and a Sentron PAC3220 Power Monitor. Got the MB_Client command to connect and work in TIA 15.1 but I...
Replies
3
Views
1,636
Back
Top Bottom