Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 109747710, Entry date: 04/15/2020

Basic Examples for Open User Communication (OUC)

  • Entry
  • Associated product(s)
By now, TCP/IP-based Open User Communication (OUC) is the standard for communication with SIMATIC S7-CPUs.

In the S7 CPU, the OUC is implemented on the basis of instructions (e.g. TCON, TSEND, TRCV and TDISCON). The user needs to parameterize the instructions in his user program and call them up in a fault-tolerant way. This task needs to be rethought by every user time and again. To make the task easy we provide you function blocks (FBs) in SCL.

The FBs contains the following mechanisms:

  • Connection management with the instructions "TCON" and "TDISCON"
  • Sending data to a partner CPU
  • Receiving data from a partner CPU

The application example shows you at which places in the code you can integrate your individual extensions.

For the following OUC versions, there is an own FB which serves as communication template.

  • ISO-on-TCP: FB "LOpenUserComm_IsoOnTcp"
  • TCP: FB "LOpenUserComm_Tcp" and FB "LOpenUserComm_TcpSec" for Secure Communication
  • UDP: FB "LOpenUserComm_Udp"

All communication templates are summarized in the "LOpenUserComm" library.

Documentation and example project
  Documentation ISO-on-TCP (1,8 MB)
  Documentation TCP (2,5 MB)
  Documentation UDP (1,6 MB)
 Registrierung notwendig  "LOpenUserComm" library for STEP 7 V15 (1,8 MB)
 Registrierung notwendig  "LOpenUserComm" library for STEP 7 V16 (2,0 MB)

The library "LOpenUserComm"  for STEP 7 V16 provides the FB "LOpenUserComm_TcpSec" for Secure Communication.

Last Changes  
Add the FB "LOpenUserComm_TcpSec" for Secure Communication.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
Rate entry
no rating
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.