show the entry list
S7-300 CPU 31x -- Configuring and programming communication -- Using communication blocks
What is the volume of data that you can transfer with function blocks FB34 "GET_E" and FB35 "PUT_E"?
How do you cyclically read out the 8 channels of the FM 350-2 counter module as quickly as possible?
How do you read out the IP address of the S7-300 CPU in the user program at runtime?
How do you enable the ad-hoc mode when you call the TRCV instruction?
How do you use the blocks for MODBUS/TCP communication over the integrated PROFINET interface of the S7-300 and S7-400 CPUs and IM151-8 PN/DP CPU in STEP 7 Professional (TIA Portal)?
Which security modules can be reached with SOFTNET Security Client V4 over a secure IPsec tunnel connection?
What is the difference between the initialization and runtime parameters on the blocks for Modbus TCP?
Why is the status value A090 (hex) output for Modbus TCP although you have entered the correct license?
What are the differences between the licensed version and the downloadable demo version of the blocks for Modbus TCP?
Why is the value A083 (hex) output permanently at the STATUS output parameter of the block for Modbus TCP when the ENQ_ENR=true input parameter has been set?
Which blocks for Modbus TCP can you rename or re-wire when the block numbers of the Modbus blocks are already being used in the user program?
How do you implement chronological messaging with S7-300 CPUs and WinCC?
How do you program communication blocks FB14 "GET" and FB15 "PUT" for data exchange in the S7 program of an S7-300 CPU?
How can you read out diagnostics data from a SIRIUS 3RK3 modular safety system using a S7-300/400 CPU?
Which ports are released for Modbus/TCP communication and how many Modbus clients can communicate with a SIMATIC S7 CPU as Modbus server?
How do you configure a specified and an unspecified S7 connection for data exchange between S7-300 and/or S7-400 by way of Industrial Ethernet CPs?
What restrictions are there for active jobs when communicating with SFC 58 / SFC 59 and SFB 52 / SFB 53 via PROFIBUS DP and PROFINET IO?
How do you program communication blocks FB12 "BSEND" and FB13 "BRCV" for data exchange in the S7 program of an S7-300 CPU?
How do you program the communication blocks FB63 "TSEND", FB64 "TRECV", FB65 "TCON" and FB66 "TDISCON" in order to use the ISO-on-TCP protocol for data exchange by way of the integrated PROFINET interface of a CPU or by way of the CP443-1 Advanced?
How do you program the communication blocks FB63 "TSEND", FB64 "TRCV", FB65 "TCON" and FB66 "TDISCON" in order to use the TCP protocol for data exchange by means of the integrated PROFINET interface of an S7-300 or S7-400 CPU?
How do you establish OPEN MODBUS / TCP communication from a SIMATIC S7 and where can you find further information?
How do you program the communication blocks FB67 "TUSEND", FB68 "TURCV", FB65 "TCON" and FB66 "TDISCON" in order to use the UDP protocol for data exchange by means of the integrated PROFINET interface of a CPU?
How does data communication work between S7-300/S7- 400 and S7-200 via MPI using S7 basic communication?
How great is data consistency in the PUT and GET S7 communication functions for the individual S7-300 CPUs and C7 complete devices?
How can you access via PROFIBUS DP another CPU, which is connected to the PROFIBUS DP as a slave, from a DP master using basic communication with SFC72 "I_GET" and SFC73 "I_PUT"?
How can you access consistent data without SFC14/15 as part of the process image?
S7-400 CPU 41x -- Configuring and programming communication -- Using communication blocks
When using the FB81 S_MODB on an S7-400 with more than 8 Kbytes of marker, how do you access the marker area above MB 255?
How do you enable the ad-hoc mode when you call the TRCV instruction?
How do you use the blocks for MODBUS/TCP communication over the integrated PROFINET interface of the S7-300 and S7-400 CPUs and IM151-8 PN/DP CPU in STEP 7 Professional (TIA Portal)?
How do you establish a redundant MODBUS/TCP communication over the integrated PROFINET interface of a CPU 41x-H in STEP 7 V5.5?
What is the difference between the initialization and runtime parameters on the blocks for Modbus TCP?
Why is the status value A090 (hex) output for Modbus TCP although you have entered the correct license?
What are the differences between the licensed version and the downloadable demo version of the blocks for Modbus TCP?
Why is the value A083 (hex) output permanently at the STATUS output parameter of the block for Modbus TCP when the ENQ_ENR=true input parameter has been set?
Which blocks for Modbus TCP can you rename or re-wire when the block numbers of the Modbus blocks are already being used in the user program?
How can you read out diagnostics data from a SIRIUS 3RK3 modular safety system using a S7-300/400 CPU?
Which communication options are there in SIMATIC S7?
How does data communication work between S7-300/S7- 400 and S7-200 via MPI using S7 basic communication?
Consistent data in S7-400, summary of mechanisms
Which ports are released for Modbus/TCP communication and how many Modbus clients can communicate with a SIMATIC S7 CPU as Modbus server?
How do you implement chronological messaging with S7-400 CPUs and WinCC?
How do you configure a specified and an unspecified S7 connection for data exchange between S7-300 and/or S7-400 by way of Industrial Ethernet CPs?
How do you establish OPEN MODBUS / TCP communication from a SIMATIC S7 and where can you find further information?
How do you use WinCC flexible to transfer a project to an operator panel via S7 routing?
What restrictions are there for active jobs when communicating with SFC 58 / SFC 59 and SFB 52 / SFB 53 via PROFIBUS DP and PROFINET IO?
How do you program the communication blocks FB63 "TSEND", FB64 "TRECV", FB65 "TCON" and FB66 "TDISCON" in order to use the ISO-on-TCP protocol for data exchange by way of the integrated PROFINET interface of a CPU or by way of the CP443-1 Advanced?
How do you program the communication blocks FB63 "TSEND", FB64 "TRCV", FB65 "TCON" and FB66 "TDISCON" in order to use the TCP protocol for data exchange by means of the integrated PROFINET interface of an S7-300 or S7-400 CPU?
How do you program the communication blocks FB67 "TUSEND", FB68 "TURCV", FB65 "TCON" and FB66 "TDISCON" in order to use the UDP protocol for data exchange by means of the integrated PROFINET interface of a CPU?
How can you access consistent data without SFC14/15 as part of the process image?
How great is data consistency in the PUT and GET S7 communication functions for the individual S7-400 CPUs?
S7-200 CPUs -- Product information -- System description
How does data communication work between S7-300/S7- 400 and S7-200 via MPI using S7 basic communication?
How does data communication work between S7-300/S7- 400 and S7-200 via MPI using S7 basic communication?
Part number:

Description:
You can access various S7-200 CPUs from the S7-300 / 400 using X_PUT / X_GET via MPI. Here, the S7-300 / S7-400 is the master and the S7-200 the slave.


Fig. 01

With S7-200 CPUs of the CPU 22x series, you can work with the baud rates 19.2kBd and 187.5kBd.

Refer to the technical data of the CPUs concerned for the transfer rates supported by your S7-300 / S7-400 CPU at the MPI interface.

The manual with the technical data of the S7-300 CPUs is available in Entry ID: 12996906

The manuals with the technical data of the S7-400 CPUs is available in the following Entry IDs:

The table below gives you information about the maximum number of connections available for S7 basic communication in the S7-300 CPUs.
 
CPU

Max. number of connections for
S7 basic communication

CPU 312, CPU 312C 2
CPU 313 4
CPU 313C, CPU 313C-2DP, CPU 313C-2PtP 4
CPU 314 8
CPU 314C-2DP, CPU 314C-2PtP 8
CPU 315 8
CPU 315-2DP, CPU 315F-2DP 12
CPU 315-2PN/DP, CPU 315F-2PN/DP 14
CPU 316 8
CPU 316-2DP 8
CPU 317-2DP, CPU 317F-2DP 30
CPU 317-2PN/DP, CPU 317F-2PN/DP 30
CPU 318-2DP 30
CPU 319-3PN/DP, CPU 319F-3PN/DP 30
CPU 614 8

The table below gives you information about the maximum number of connections available for S7 basic communication in the S7-400 CPUs.
 

CPU

Max. number of connections for
S7 basic communication

CPU 412-1 < FW V5.0

14

CPU 412-1 from FW V5.0

30

CPU 412-2DP < FW V5.0

14

CPU 412-2DP from FW V5.0

30

CPU 413-1

14

CPU 413-2DP

14

CPU 414-1

30

CPU 414-2DP

30

CPU 414-3DP

30

CPU 414-3PN/DP

30

CPU 416-1

42

CPU 416-2DP, CPU 416F-2DP

42

CPU 416-3DP

42

CPU 416-3PN/DP, CPU 416F-3PN/DP

42

CPU 417-4

42

Requirements for the S7-200 CPU:

  • Set the address of the S7-200 CPU.

  • Put the data to be sent into the relevant Send buffer or get the received data from the Receive buffer.

  • You define the Send and Receive buffers in STEP 7 when parameterizing the system functions SFC67 "X_PUT" and SFC68 "X_GET".

  • Refer to the notes on networking CPUs in the S7-200 system manual in Entry ID: 1109582.

Reading data from the S7-200 CPU with the system function SFC67 "X_GET"
You use the system function SFC67 "X_GET" for reading data from the S7-200 CPU. You call this in the OB1 of the S7-300 / S7-400, for example.

In this example, 10 bytes are read as from address 10 from the variable area of the S7-200 CPU. The 10 bytes of data received are stored in data block DB10 as from address 10 in the S7-300/S7-400.

The following table gives an overview of the input parameters of the system function SFC67 "X_GET".
 
Input parameter Variable Description
REQ M0.1 The input parameter REQ (request to activate) is a level-triggered control parameter.
A positive level at M0.1 of the S7-300 / S7-400 starts reading of the data from the S7-200.
CONT FALSE The input parameter CONT (continue) is a control parameter that determines whether or not the connection to the communication partner remains established upon completion of the job.

CONT=0: connection is cleared down after completion of data transfer.
CONT=1: connection remains established after completion of data transfer.

DEST_ID W#16#4 MPI address of the S7-200 CPU
VAR_ADDR P#DB1.DBX 10.0 BYTE 10 Reference to the area to be read in the partner CPU.
10 bytes of data are read as from address 10 from the variable area (VB) of the S7-200.

The following table gives an overview of the output parameters of the system function SFC67 "X_GET".
 
Output parameter Variable Description
RET_VAL MW 2 If an error occurs during processing of the function, the return value includes the relevant error code.

If no error occurs, the RET_VAL contains the length of data block copied into the receive area RD as a positive number in bytes.

BUSY M12.1 BUSY=1: The receive procedure has not yet finished.
BUSY=0: The receive procedure has been completed or no receive procedure is active.
RD P#DB10.DBX 10.0 BYTE 10 Reference to the receive data area.
The following data types are permitted:
BOOL, BYTE, WORD, DWORD, and arrays of these data types except BOOL.
The receive area RD must be at least as long as the read area VAR_ADDR of the communication partner.
In addition, the data types of RD and VAR_ADDR must match.

Writing data to the S7-200 CPU with the system function SFC68 "X_PUT"
You use the system function SFC68 "X_PUT" for writing data to the S7-200 CPU. You call this in the OB1 of the S7-300 / S7-400, for example.

In this example, 10 bytes are written as from address 10 to the variable area of the S7-200 CPU. The 10 bytes of data sent are stored in data block DB10 as from address 20 in the S7-300/S7-400.

The following table gives an overview of the input parameters of the system function SFC68 "X_PUT".
 

Input
parameter

Variable

Description

REQ

M100.1

The input parameter REQ (request to activate) is a level-triggered control parameter.
A positive level at M100.1 of the S7-300 / S7-400 starts writing of the data to the S7-200.

CONT

FALSE

The input parameter CONT (continue) is a control parameter that determines whether or not the connection to the communication partner remains established upon completion of the job.

CONT=0: connection is cleared down after completion of data transfer.
CONT=1: connection remains established after completion of data transfer.

DEST_ID

W#16#4

MPI address of the S7-200 CPU

VAR_ADDR

P#DB1.DBX 20.0 BYTE 10

Reference to the area to be written to in the partner CPU.
10 bytes of data are written as from address 20 to the variable area (VB) of the S7-200.

The following table gives an overview of the output parameters of the system function SFC68 "X_PUT".
 
Output
parameter
Variable Description
SD P#DB10.DBX 20.0 BYTE 10 Reference to the area in your own CPU that contains the data to be sent.
The following data types are permitted:
BOOL, BYTE, WORD, DWORD, and arrays of these data types except BOOL.
SD must have the same length as the VAR_ADDR parameter of the communication partner. In addition, the data types of SD and VAR_ADDR must match.
RET_VAL MW102 If an error occurs during processing of the function, the return value includes the relevant error code.
BUSY M112.1 BUSY=1: The send procedure has not yet finished.
BUSY=0: The send procedure has been completed or no send procedure is active.

More information on the system functions SFC67 "X_GET" and SFC68 "X_PUT" is available in Entry ID: 1214574.

A sample program for parameterizing the system functions SFC67 "X_GET" and SFC68 "X_PUT" is attached for downloading.

The sample program is a STEP 7 project that contains the complete hardware configuration including the user program of an S7-300 station. The STEP 7 project is available for downloading as a ZIP file.
Extract the "S7_basic_communication.zip" file into a separate directory. The STEP 7 project is unpacked automatically with all its subdirectories. You can then use the SIMATIC Manager to open and process the extracted STEP 7 project.

S7_basic_communication.zip ( 412 KB )

Note:
Set the S7-300/S7-400 control to STOP mode before loading the block that calls the system functions SFC67 "X_GET" and SFC68 "X_PUT" into the controller. This ensures that the system functions SFC67 "X_GET" and SFC68 "X_PUT" are initialized in any case and the data is transferred.

If you need faster data transmission, use PROFIBUS DP instead of S7 basic communication via MPI. PROFIBUS DP is not connection-oriented communication.
If you use PROFIBUS DP, then you need a PROFIBUS expansion module EM 277 in the S7-200. Detailed information on the expansion module EM 277 is available in the S7-200 system manual in Entry ID 1109582.

 Entry ID:747743   Date:2009-10-21 
I regard this article....as helpfulas not helpful                                 
mySupport
My Documentation Manager 
Newsletter 
CAx-Download-Manager 
Support Request
To this entry
Print
Create PDF 
Send to a friend
QuickLinks
Compatibility tool 
Topics
Help
Online Help
Guided Tour