Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 109747710, Entry date: 07/25/2019

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"
  • 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 (1,9 MB)
  Documentation UDP (1,6 MB)
 Registrierung notwendig  "LOpenUserComm" library for STEP 7 V15 (1,8 MB)

You can update and use the library in STEP 7 V15.1.

Last Changes  
Add the FB for UDP

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
Support to the statistics
With this function the IDs found are listed according to number (format .txt).

Generate list
Copy URL
Display page in new design
mySupport Cockpit
Related links