Two PLCs need to share data
Sooner or later, a line with more than one Siemens PLC needs them to talk: a filler needs to know the capper is ready, or SCADA needs to read both. TIA Portal gives you several ways to do it, and the one that's quickest to set up isn't always the one you want running for ten years.
This page is a selection guide, not a programming example, so there's no ladder or SCL here. Each method's instructions are documented in the Siemens links below.
The three common choices
How we'd pick
- A handful of status bits between two Siemens CPUs, on a trusted, segmented machine network: PUT/GET is fast to set up. Be clear that you're turning on unauthenticated access to that CPU, and write it down.
- Regular data exchange you'll live with for years, or a non-Siemens partner: Open User Communication. Build a heartbeat into the data so each side can tell when the other stopped updating.
- SCADA, historian or MES: OPC UA (Ignition, for example, connects as an OPC UA client). Publish only the tags you need, use a signed and encrypted security policy, and use user authentication instead of anonymous access.5
- Interlocks between machines that protect people: none of these as plain standard data. That's safety communication, designed and validated as part of the safety system.
Don't forget the network
Whichever method you pick, the PLCs should sit on a segmented control network, not the office LAN, with only the traffic you need allowed between zones. Our industrial networks page covers how we approach that.
Gotchas
- Optimized blocks. PUT/GET and optimized data blocks don't mix; OUC with
LEN = 0sends an optimized area as defined.14 - Don't edit data mid-send. With
TSEND_C, the send area must not change until the job is done.4 - Stale data looks like good data. A value that stopped updating still looks valid. Add a counter or heartbeat and alarm when it stops.
- Connection resources are limited per CPU. Check the CPU's specs before adding many partners.
Sources
- Siemens Industry Online Support, "S7 Communication with PUT/GET" application example (S7-1500 / S7-1200; partner permission setting, optimized-block limit): PDF.
- Siemens, "PLC to PLC communications" webinar slides (June 2020), advantages and disadvantages of PUT/GET, TSEND_C/TRCV_C and OPC UA: PDF.
- Siemens, STEP 7 help, "Selection of connection types (S7-1500)": docs.tia.siemens.cloud.
- Siemens, STEP 7 help, "TSEND_C: Establishing a connection and sending data (S7-1200, S7-1500)": docs.tia.siemens.cloud.
- Siemens, STEP 7 help, "Secure Channel – Select Security Policies (S7-1500)" and "Restriction of communication services (S7-1500)": security policies, communication services.
Instruction details were checked against the vendor documentation linked above. Behavior can change between software and firmware versions, so check the help for the version you run.