S7-1200 network communication

Join Date
Jul 2013
Location
Here
Posts
31
Hallo,

could someone describe best practises, typical pitfalls etc. of implementing communication over network, in a scenario with many PLCs and a HMI?
It appears I'm not doing it right currently.

Used are 5 Siemens SIMATIC S7 1200 series PLCs (all 1212C AC/DC/RLY), a Siemens HMI box, and we have TIA portal V11 SP2.

Currently I'm doing something like this, with only partial success:
There is one main PLC, "to rule them all".
It has a cyclic interrupt, in which a request flag is set to HI periodically, for reading a small DB with some status bools, 1..2 bytes of size, from a sub-SPS. Which sub-PLC's DB is read currently is cycled through, one after another. The interrupt fires with some 100ms timing.
This uses the GET function, with the ID which TIA created automatically for each PLC, in the list of connections, after I connected all PLCs in a graphical network view.

Now, when someone presses a button on HMI --> a byte is set in master PLC, the master PLC will use the PUT function to send just this byte flag to a DB inside a sub-PLC.
Up to that, it seemed to work ok, with 3 PLCs.

Then I added a sub-PLC, tried to use PUT from the main PLC to regularly, not just on request, write a whole, small (1..2 bytes) DB to the new sub-PLC.
This did not work at all, for no immediately apparent reason.
I was short on time, so I just tried remove this PUT, and instead, use a GET from the new sub-PLC, to read from the main PLC. I.e., same direction of data, but active/passive roles switched. The timing is again done by a cyclic interrupt.
This worked. But the communication seems troubled sometimes.
And now, as I added the 5th PLC, tried to use the same scheme as in the 4th, i.e. interrupt triggered reading of a small DB from main PLC into the sub-PLC DB, does not work at all. I even copied the source code from PLC#4, it doesn't work. I.e., not one single GET call ever ends successfully, although some timeouts occurred which reset the IN parameter. (I inserted a counter which counts successful GET calls, i.e. when NDR is true)

I am doing a timeout in this GET attempt, of some seconds, after that, I reset the input of the GET function even if was not successful, just to be sure it recovers from a "hiccup".
Also, the DBs I'm using all do *not* have the "optimized access" attribute, yeah, I walked into the trap before...
The main PLC has the same status DBs as are in the sub-PLCs, so they can be copied over 1:1.

I intended to some day change the older implementation from twiddling with single flags, to also just periodically send one small DB with some bools combined, to have a consistent way of doing things.
But now that things aren't working so great, I'm not sure what to do.

--------
Btw, what's the topology view for? Didn't really understand that from what I read, but currently there are all PLCs displayed, but only between one of the sub-PLCs and the main PLC there is a connection in topology view, that's how I received the project from who worked on it before. TIA won't let me drag connections between any other PLCs it appears.

Ah, btw, is using a special PROFINET switch strongly advisable for some reasons, or is using a 100MBit/s ethernet switch ok?
 
Apart from those examples, what I'm doing currently is using S7 connections with PUT / GET as this seems to be easiest.

What I'm confused about, because the TIA help is not very clear about this (at least in the German version's wording):

What is the ID parameter of GET / PUT supposed to be fed with?
The list of S7 connections shows two numbers for each connection: local ID and "partner ID" (not sure if english version calls it that), both numbers which start with hex 100...
The help description of GET 'ID' parameter does not mention anything close that could be deduced to mean either of those two IDs.

Which is it? It would seem to make sense if it was the partner-ID, since I want to communicate from inside some PLC with its partner, but I doubt it, the scheme after which TIA assigns those numbers in the connections seems not clear to me at this point.
 

Similar Topics

Disclaimer: English isn’t my native language, so apologize for any incoming grammatical or spelling mistake. Hello everyone. I’m trying to make...
Replies
3
Views
2,077
I know that Siemens have their own supports for where the Network/Profitnet cable enters the S7-1200 range, but they don't support standard...
Replies
5
Views
2,391
Hi All I have a baghouse control system in production for many years. But some time ago the PLC began to lose the network suddenly until I restart...
Replies
12
Views
4,510
Hello guys, I got 6 PLCs with in same network for example 10.80.x.x One of these PLCs is S71200 which I'm trying to use as RTU, its IP address is...
Replies
0
Views
1,141
I am networking 3 Siemens S7-1200 PLC's. what is the best way to achieve this? I want it to seamlessly pass data between the 3 units...
Replies
2
Views
1,293
Back
Top Bottom