×
Siemens Industry Online Support
Siemens AG
Entry type: FAQ Entry ID: 26483647, Entry date: 11/26/2019
(8)
Rate

What properties, advantages and special features does the S7 protocol offer?

  • Entry
  • Associated product(s)
All SIMATIC S7 CPUs and C7 CPUs have integrated S7 communication services with which the user program can read and write data.

The following functions are available to you for the S7 CPUs and C7 CPUs regardless of the bus system used, so that you can use S7 communication via Industrial Ethernet, PROFIBUS or MPI:

  • System function blocks (SFBs): in STEP 7 V5.x for S7-400 CPUs
  • Function blocks (FBs): in STEP 7 V5.x for S7-300 CPUs and C7-CPUs
  • Instructions: in TIA Portal for S7-300 CPUs, S7-400 CPUs, S7-1200 CPUs and S7-1500 CPUs

Position of the S7 protocol in the ISO-OSI reference model.
 

Fig. 1 

Services of the S7 protocol
Overview of the S7 protocol services.
 

ServiceDescription
PUT / GETThis service is a unidirectional read/write service for transferring small volumes of data to and from a station.
BSEND / BRCVThis service is a bidirectional and block-oriented service for transferring large volumes of data between two stations.
USEND / URCVThis service is a bidirectional and uncoordinated service for transferring small volumes of data between two stations.

Table 1

User data size
The S7 protocol permits transfer of data from 1 byte to 64 Kbytes. The maximum data size depends on the service used and the S7 CPU used.
 

ServiceS7-300 CPUS7-400 CPUS7-1200 CPUS7-1500 CPU
PUT / GET160 bytes400 bytes160 bytes880 bytes
BSEND / BRCV32768 bytes / 65534 bytes65534 bytes-
  • 65534 bytes with standard access
  • 65535 bytes with optimized access
USEND / URCV160 bytes440 bytes-
920 bytes

Table 2

Properties of the S7 protocol
The following table shows the properties of the S7 protocol.
 

PropertiesPUT / GETBSEND / BRCVUSEND / URCV
Memory areasM, D, E, A, T, ZM, D, E, A, T, ZM, D, E, A, T, Z
Data consistency
  • 8 to 32 bytes
  • 32 bytes to total length1)2)
Total length per job2)Total length per job2)
Communication principleClient / ServerClient / ClientClient / Client
Maximum number of connectionsSee CPU specificationSee CPU specificationSee CPU specification
Functions
  • FB15 / SFB15 "PUT"
  • FB14 / SFB14 "GET"
  • FB12 / SFB12 "BSEND"
  • FB13 / SFB13 "BRCV"
  • FB8 / SFB8 "USEND"
  • FB9 / SFB9 "URCV"

Table 3

1) Depending on the CPU used.

2) In the user program you must make sure that the data block is not modified during data transfer.

Advantages of the S7 protocol

  • Independent of the bus medium (PROFIBUS, Industrial Ethernet, MPI).
  • Can be used on all S7 data areas.
  • Transfer of up to 64 Kbytes in one job.
  • The S7 protocol ensures automatic acknowledgment of the data records.
  • Low processor and bus load during transfer of large volumes of data.

Note
The S7 protocol is supported by all available S7 CPUs and communication processors. Furthermore, PC systems with appropriate hardware and software support communication via the S7 protocol.

Further Information

  • Entry ID 20987358 provides a complete example of S7 communication with BSEND/BRCV via PROFIBUS.
  • General information about communication via SIMATIC S7 is available in Entry ID: 20982954.
  • Examples of S7 communication with PUT / GET are available in the following Entry IDs:
    92269951: Data transfer between an S7-300 CPU and an S7-1200 CPU
    82212115: Data transfer between an S7-1200 CPU and an S7-1500 CPU
    18610307: PUT / GET in the user program of the S7-300 CPU (STEP 7 V5.x)
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
https://www.siemens.com/cybersecurity#Ouraspiration.
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.