Académique Documents
Professionnel Documents
Culture Documents
For questions about this document please use the following e-mail address:
online-support.automation@siemens.com
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
SIMATIC
Application for the "PUT" and
"GET" Function Blocks of the
S7 Communication
Automation Problem
Automation Solution
Basics
Functional Mechanisms
of this Application
Configuring
Installing
Commissioning the
Application
References
9
10
History
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
The application examples are not binding and do not claim to be complete
regarding the circuits shown, equipping and any eventuality. The application
examples do not represent customer-specific solutions. They are only intended
to provide support for typical applications. You are responsible for ensuring that
the described products are correctly used. These application examples do not
relieve you of the responsibility of safely and professionally using, installing,
operating and servicing equipment. When using these application examples, you
recognize that we cannot be made liable for any damage/claims beyond the
liability clause described. We reserve the right to make changes to these
application examples at any time without prior notice. If there are any deviations
between the recommendations provided in these application examples and other
Siemens publications e.g. Catalogs then the contents of the other documents
have priority.
We do not accept any liability for the information contained in this document.
Any claims against us based on whatever legal reason resulting from the use of
the examples, information, programs, engineering and performance data etc.
described in this application example shall be excluded. Such an exclusion shall
not apply in the case of mandatory liability, e.g. under the German Product Liability
Act (Produkthaftungsgesetz), in case of intent, gross negligence, or injury of life,
body or health, guarantee for the quality of a product, fraudulent concealment of a
deficiency or breach of a condition which goes to the root of the contract
(wesentliche Vertragspflichten). However, claims arising from a breach of a
condition which goes to the root of the contract shall be limited to the foreseeable
damage which is intrinsic to the contract, unless caused by intent or gross
negligence or based on mandatory liability for injury of life, body or health. The
above provisions do not imply a change in the burden of proof to your detriment.
It is not permissible to transfer or copy these application examples or excerpts of
them without first having prior authorization from Siemens Industry Sector in
writing.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Table of Contents
Table of Contents
Warranty and liability................................................................................................... 4
2
Table of Contents......................................................................................................... 5
3
1.1
5
2.1
2.2
2.3
2.4
Performance data............................................................................... 13
2.5
2.5.1
2.5.2
2.5.3
Basics ............................................................................................................... 15
3.1
1
Overview .............................................................................................. 7
4.1
4.1.1
4.1.2
4.1.3
4.1.4
4.1.5
4.1.6
1
FB4 GET_PUT................................................................................. 18
Overview of input and output parameters .......................................... 18
Sequence ........................................................................................... 19
Connection ID..................................................................................... 19
Control and sequence of the write and read services........................ 20
Source and destination address of the write and read services ........ 22
Error analysis of the SFB14 GET and SFB15 PUT system function
blocks ................................................................................................. 23
8
Configuring ...................................................................................................... 25
5.1
2
Installing ........................................................................................................... 28
6.1
6.2
6.3
7.1
Preparing............................................................................................ 32
7.2
7.2.1
7.2.2
7.2.3
7.2.4
7.3
7.3.1
7.3.2
8.1
4
Overview ............................................................................................ 39
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Table of Contents
8.2
8.3
9.1
4
10
References ....................................................................................................... 46
History............................................................................................................... 47
1
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Automation Problem
1.1 Overview
Automation Problem
1.1
Overview
Introduction
The exchange of small data volumes between an S7-300 station and the WinAC
MP software PLC via Industrial Ethernet is realized with little configuration and
programming overhead.
Overview of the automation problem
The figure below provides an overview of the automation problem.
Figure 1-1
S7 station A (server)
S7 station B (client)
Industrial Ethernet
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Automation Solution
2.1 Overall solution overview
Automation Solution
2.1
Diagrammatic representation
The following figure schematically shows the most important components of the
solution:
Figure 2-2
Server
Client
MP377 12Touch
S7 com
munica
tion
- PUT / GET
- WinCC flexible
Runtime
IP address: 192.168.0.19
Passive connection
establishment
Industrial Ethernet
IP address: 192.168.0.18
Active connection
establishment
Configuration
The small data volumes with max. 160 bytes are transferred between two S7
stations, for example using an S7-300 station with Industrial Ethernet CP and
MP377 Multi Panel. In this application, the following hardware components are
connected to each other using Industrial Ethernet cables:
MP377 12 Touch Multi Panel with installed WinAC MP 377 software PLC
The MP377 12 Touch Multi Panel is located in the same IP subnet as the S7-300
station with CP 343-1.
The FB4 GET_PUT function block is called in the user program of the WinAC MP
software PLC. This function block encapsulates the SFB14 GET and SFB15
PUT system function block calls for the data transfer and provides the user with a
simple interface. Thus, S7 communication with the PUT and GET services is used
for the data exchange between the WinAC MP software PLC and the S7-300
station.
The WinAC MP software PLC acts as a client for the S7 communication. The
connection configuration and the realization of the PUT and GET services are
performed in the client that actively establishes the communication connection.
The S7-300 station acts as a server for the S7 communication, i.e. it is passively
involved in establishing the connection. In the S7-300 station, a connection
configuration and a call of communication function blocks or system function blocks
are not necessary to realize write and read services.
In addition, the send and receive data of the Win AC MP software PLC is visualized
in WinCC flexible Runtime on the MP377 Multi Panel.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Automation Solution
2.1 Overall solution overview
Scope
This application does not include a description of the configuration in
WinCC flexible.
It is assumed that the reader has basic knowledge of this field.
The WinCC flexible 2008 manual can be downloaded from the Internet (see \7\).
Required knowledge
It is assumed that the reader has basic knowledge of handling WinCC flexible
Runtime and the WinAC MP software PLC.
The WinCC flexible 2008 Runtime manual can be downloaded from the Internet
(see \8\).
The WinCC MP 2008 software PLC manual can be downloaded from the Internet
(see \4\).
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Automation Solution
2.2 Description of the core functionality
2.2
Figure 2-3
The send and receive data of the WinAC MP software PLC is visualized in WinCC
flexible Runtime.
The send data that is written from WinAC MP to the S7-300 station via Industrial
Ethernet is stored in the DB100 data block.
The receive data that is read from the S7-300 station by WinAC MP via Industrial
Ethernet is stored in the DB200 data block.
The unidirectional write and read services are controlled in WinCC flexible Runtime
using the following switches and buttons:
M10.0 and M11.0 to enable the unidirectional write and read services
10
Action
Note
1.
2.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Automation Solution
2.2 Description of the core functionality
No.
3.
Action
Click on the M20.1 or M20.2 button
to write the data once to the S7-300
station or to read the data once from
the S7-300.
Note
The M20.1 and M20.2 buttons can
be used only when the M10.1 and
M11.1 switches are in the disable
position.
When the switches are in the disable
position, they are displayed in red.
Their rugged construction and compact design makes Multi Panels suitable for
use in harsh industrial environments.
the communication functions for the unidirectional write and read services are
called only in the user program of the WinAC MP software PLC.
the FB4 GET_PUT function block encapsulates all system function block calls
for executing the unidirectional write and read services and thus provides an
interface that is easy to paramaterize and control.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
11
Automation Solution
2.3 Hardware and software components used
2.3
Hardware components
Table 2-2
Component
No.
MLFB/order number
Note
MP 377 12 Touch
6AV6644-0AA01-2AX0
CPU315-2DP
6ES7315-2AG10-0AB0
FW V2.6
CP343-1
6GK7343-1EX21-0XE0
FW V1.3.3
Component
No.
MLFB/order number
WinAC MP 2008
(V4.1.1)
6ES7671-7EG01-0YA0
6AV6612-0AA51-3CA5
WinCC flexible
Runtime 2008 SP1
6AV6613-1BA51-3CA0
6ES7810-4CC08-0YA5
Note
SP4 or higher
12
Note
38066687_WinAC_MP.zip
38066687_PUT_GET_WinAC_MP_v10_e.pdf
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Automation Solution
2.4 Performance data
2.4
Performance data
Hardware
The SFBs/FBs for the following S7 communication services must not exceed a
specific user data length:
PUT / GET
BSEND / BRCV
USEND / URCV
communication partner.
The guaranteed user data length for an SFB/FB is listed in the table below:
Table 2-5
FB/SFB
Partner: S7-300
Partner: S7-400 or
WinAC MP
PUT / GET
160 bytes
400 bytes
USEND / URCV
160 bytes
440 bytes
BSEND / BRCV
32 Kbytes
64 Kbytes
Please note the user data size restrictions in the technical data of the respective
CPU.
Application software
In this example, max. 160 bytes of user data are transferred since an S7-300 is
used as a communication partner of the WinAC MP software PLC. These bytes are
transferred consistently.
2.5
Alternative solutions
2.5.1
Order number
6AV6 642-0EA01-3AX0
MP 277 8 Touch
6AV6 643-0CB01-1AX1
MP 277 8 Key
6AV6 643-0DB01-1AX1
MP 277 10 Touch
6AV6 643-0CD01-1AX1
MP 277 10 Key
6AV6 643-0DD01-1AX1
MP 377 12 Touch
6AV6 644-0AA01-2AX0
MP 377 12 Key
6AV6 644-0BA01-2AX0
MP 377 15 Touch
6AV6 644-0AB01-2AX0
MP 377 19 Touch
6AV6 644-0AC01-2AX0
You can use these multi panels (see table 2-6) instead of the MP 377 12 Touch
Multi Panel.
4
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
13
Automation Solution
2.5 Alternative solutions
2.5.2
CP343-1 Lean,
CP343-1 Standard or
CP343-1 IT / Advanced
Instead of a CP, you can also use a CPU with integrated PROFINET interface:
To connect the S7-400 station to the Industrial Ethernet network, you can use one
of the following communications processors (CP):
CP443-1 Standard or
CP443-1 IT / Advanced
Instead of a CP, you can also use a CPU with integrated PROFINET interface:
2.5.3
Table 2-7
Protocol
14
Communication
block
Configuration
overhead
Transferable data
volume
S7 communication
PUT / GET
Low
S7 communication
BSEND/BRCV
High
S7 communication
USEND/RECV
High
Open TCP/IP
communication
AG_SEND /
AG_RECV
High
Medium data
volumes
Open TCP/IP
communication
T blocks
High
Medium data
volumes
PROFINET CBA
Low
Medium
data volume
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Basics
3.1 S7 communication basics
Basics
3.1
S7 communication basics
Among other things, the Communication with SIMATIC S7 manual describes the
S7 communication basics.
The manual can be downloaded from the Internet (see \6\).
The System Software for S7-300/400 System and Standard Functions manual
provides information on the system function blocks, e.g. SFB14 GET and SFB15
PUT, and on S7 communication.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
15
Server
S7-300 with CP343-1
WinAC MP 377
Client
WinCC flexible Runtime
MP377 12Touch
S7 connection
FB4
GET_PUT
IP address: 192.168.0.19
Passive connection
establishment
SIMATIC Field PG
Industrial Ethernet
IP address: 192.168.0.18
Active connection
establishment
STEP 7
WinCC flexible
IP address: 192.168.0.100
Data exchange between the WinAC MP software PLC and the S7-300 station
takes place via a onesided configured S7 connection with connection ID 1.
The configuration of the S7 connection and the call of the SFB14 GET and
SFB15 PUT system function blocks for reading and writing the data are
performed in the WinAC MP software PLC. The software PLC actively establishes
the S7 connection.
The S7-300 station is passively involved in establishing the connection. Only data
blocks in which the send and receive data is stored are required in the S7-300
station.
Program overview
Figure 4-5
S7-300 station
Send data
DB4
Receive data
FB4
DB100
SFB14
GET
DB200
S7 connection
Receive data
words)
ata (32
Write d
DB200
16
SFB15
PUT
Send data
DB100
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Block
Symbolic name
Description
OB1
CYCL_EXC
FB4
GET_PUT
DB4
iDB_GET_PUT
SFB14
GET
SFB15
PUT
DB100
DB_send_data
DB200
DB_receive_data
Symbolic name
Description
DB100
DB_send_data
DB200
DB_receive_data
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
17
4.1
FB4 GET_PUT
4.1.1
DB4
FB4
INT
BOOL
BOOL
INT
INT
INT
INT
INT
BOOL
BOOL
INT
INT
INT
INT
INT
BOOL
BOOL
18
EN
Verbindung_ID
Start_lesen_GET
GET_zyklisch
Q_GET_DB_Nr
Q_GET_DB_AB_DW
Q_GET_DW_Anzahl
Z_GET_DB_Nr
Z_GET_DB_AB_DW
Start_schreiben_PUT
PUT_zyklisch
Q_PUT_DB_Nr
Q_PUT_DB_AB_DW
Q_PUT_DW_Anzahl
Z_PUT_DB_Nr
Z_PUT_DB_AB_DW
GET_Start_1x
PUT_Start_1x
I_ERROR_GET
I_STATUS_GET
I_ERROR_PUT
I_STATUS_PUT
INT
INT
INT
INT
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
4.1.2
Sequence
Figure 4-7
Start_lesen_GET = true
Yes No
GET_Zyklisch = true or
GET_Start_1x = true
Yes No
Start_lesen_PUT = true
Yes No
PUT_Zyklisch = true or
PUT_Start_1x = true
Yes No
4.1.3
Connection ID
On the following input parameter, enter the ID of the configured S7 connection via
which the data exchange takes place. The unidirectional PUT and GET write
and read services are realized together over one S7 connection.
Table 4-10
Input parameter
Verbindung_ID
Description
For the ID of the S7 connection,
please refer to the connection table
in NetPro.
Value
1 to 4095 (dec)
Here: 1
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
19
4.1.4
Input parameters
The SFB14 GET and SFB15 PUT system function blocks for reading and writing
the data are controlled via the following input parameters of FB4 GET_PUT:
Table 4-11
Input parameter
Description
Value
false = no enable
true = enable
GET_Zyklisch
GET_Start_1x
Start_schreiben_PUT
false = no enable
true = enable
PUT_zyklisch
PUT_Start_1x
Start_lesen_GET
20
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Data area
Data type
Variable
Symbolic name
Start_lesen_GET
Flag
BOOL
M10.0
Enable_GET
Start_lesen_PUT
Flag
BOOL
M11.0
Enable_PUT
GET_Zyklisch
Flag
BOOL
M10.1
GET_cyclic
PUT_Zyklisch
Flag
BOOL
M11.1
PUT_cyclic
GET_Start_1x
Flag
BOOL
M20.1
GET_once
PUT_Start_1x
Flag
BOOL
M20.2
PUT_once
After the SFB14 GET and SFB15 PUT system function blocks have been
enabled, the data can be written or read cyclically or once.
Cyclic reading of the data
To read the data cyclically, enable the SFB14 GET system function block by
setting the Start_lesen_GET input parameter = true. In addition, set the
GET_Zyklisch input parameter = true.
Thus the receive job is executed cyclically, i.e. as soon as the receive job has been
completed successfully or with an error, another receive job is executed in the next
block cycle.
Data transfer is performed cyclically until one of the input parameters is reset.
Cyclic writing of the data
To write the data cyclically, enable the SFB15 PUT system function block by
setting the Start_lesen_PUT input parameter = true. In addition, set the
PUT_Zyklisch input parameter = true.
Thus the send job is executed cyclically, i.e. as soon as the send job has been
completed successfully or with an error, another send job is executed in the next
block cycle.
Data transfer is performed cyclically until one of the input parameters is reset.
Single reading of the data
To read the data once, set the Start_lesen_GET and GET_Start_1x input
parameters to true. The SFB14 GET system function block is enabled and a
receive job is executed.
As soon as the receive job has been completed successfully or with an error, the
GET_Start_1x input parameter is reset in FB4 GET_PUT. The system function
block is no longer enabled in the next block cycle and no further receive job is
executed, i.e. the receive job is executed exactly once.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
21
4.1.5
Input parameters
On the following input parameters, enter the source and destination address for the
SFB14 GET and SFB15 PUT system function blocks.
The source and destination address are used to define the data blocks and the
start address in the actual data block from which the data is to be read or to which
the data is to be written and to specify the number of user data to be transferred.
Table 4-13
Input parameter
Description
Value
Q_GET_DB_Nr
Here: 100
Q_GET_DB_AB_AW
0 to max. DB size
number of user data
Here: 0
Q_GET_DW_Anzahl
0 to 80 (dec)
Here: 32
Z_GET_DB_Nr
Here: 200
Z_GET_DB_AB_AW
0 to max. DB size
number of user data
Here: 0
Q_PUT_DB_Nr
Here: 100:
Q_PUT_DB_AB_AW
0 to max. DB size
number of user data
Here: 0
22
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Value
Q_PUT_DW_Anzahl
0 to 80 (dec)
Here: 32
Z_PUT_DB_Nr
Here: 200
Z_PUT_DB_AB_AW
0 to max. DB size
number of user data
Here: 0
Note
4.1.6
Copyright Siemens AG 2009 All rights reserved
Description
For the maximum DB size and the permitted number band, please refer to the
specifications of the CPU or WinAC MP you are using.
Error analysis of the SFB14 GET and SFB15 PUT system function
blocks
Output parameters
Table 4-14
Output parameter
Description
Value
I_ERROR_GET
0 = communication OK,
data is being
successfully read
<>0 error while reading
data with SFB14 GET
I_STATUS_GET
I_ERROR_PUT
0 = communication OK,
data is being
successfully written
<>0 error while writing
data with SFB15 PUT
I_STATUS_PUT
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
23
Data area
Data type
Variable
Symbolic name
I_ERROR_GET
Flag
INT
MW100
ERROR_GET
I_ERROR_PUT
Flag
INT
MW102
ERROR_PUT
I_STATUS_GET
Flag
INT
MW200
STATUS_GET
I_STATUS_PUT
Flag
INT
MW202
STATUS_PUT
If an error occurs when reading the data, the status of the SFB14 GET system
function block is stored in the I_ERROR_GET and I_STATUS_GET output
parameters.
Diagnostics of the SFB15 PUT system function block
When the data is successfully written, the status of the I_STATUS_PUT output
parameter changes between the following values:
0 (dec) communication OK and
25 (dec) communication has been initiated. The job is being processed.
The I_ERROR_PUT output parameter has the value 0.
If an error occurs when writing the data, the status of the SFB15 PUT system
function block is stored in the I_ERROR_PUT and I_STATUS_PUT output
parameters.
24
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Configuring
5.1 Configuring the S7 connection for WinAC MP
Configuring
5.1
Table 5-16
No.
1.
Action
Remark
Configure Network
2.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
25
Configuring
5.1 Configuring the S7 connection for WinAC MP
No.
Action
Remark
3.
4.
5.
26
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Configuring
5.1 Configuring the S7 connection for WinAC MP
No.
Remark
6.
Action
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
27
Installing
6.1 Installing the hardware
Installing
6.1
SCALANCE X208
192.168.0.18
192.168.0.19
192.168.0.30
SIMATIC Field PG
192.168.0.100
IP address
Subnet mask
SIMATIC Field PG
192.168.0.100
255.255.255.0
MP 377 12 Touch
192.168.0.18
255.255.255.0
CP343-1
192.168.0.19
255.255.255.0
SCALANCE 208
192.168.0.30
255.255.255.0
The descriptions, manuals and delivery information included in the delivery of the
respective products must be observed in any case.
Note
28
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Installing
6.1 Installing the hardware
Table 6-18
No.
Action
1.
2.
3.
4.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Remark / picture
29
Installing
6.1 Installing the hardware
The WinAC MP manual provides information on setting up WinAC MP for your
application. Please also note the information regarding the STEP 7 configuration
and the communication options and the information on controlling a process with
WinAC MP.
Note
The WinAC MP manual can be downloaded from the Internet (see \4\).
To do this, open the SIMATIC Manager by selecting the Windows Start menu
SIMATIC SIMATIC Manager.
In the SIMATIC Manager, use the PLC Edit Ethernet Node menu to assign
IP address 192.168.0.19 and subnet mask 255.255.255.0 to the CP343-1.
Figure 6-9
30
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Installing
6.2 Installing the software
6.2
6.3
The S7 connection between the MP 377 12 Touch and the S7-300 station is
configured in NetPro.
The STEP 7 project can be downloaded from the Internet as a ZIP file.
Extract the 38066687_WinAC_MP.zip file to a separate directory. The STEP 7
project is then automatically extracted with all associated subdirectories.
Subsequently, you can open and edit the extracted STEP 7 project with the
SIMATIC Manager.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
31
Preparing
Assign the IP address to the network card of the SIMATIC Field PG according to
the configuration (see table 6-17).
5
Figure 7-10
7.2
7.2.1
Open the Properties dialog box of the Industrial Ethernet interface. Click on the
Properties button.
32
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Figure 7-11
In the Properties Ethernet interface ind. Ethernet Parameters tab, enter the
IP address and the subnet mask you have already set on the multi panel.
Figure 7-12
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
33
7.2.2
Table 7-19
No.
Action
Note
1.
2.
3.
7.2.3
Download
34
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
7.2.4
Table 7-20
No.
1.
Action
Note
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
35
Action
Note
3.
36
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
7.3
7.3.1
Open the Properties dialog box of the CP343-1. Click on the Properties button.
Figure 7-14
In the Properties CP343-1 dialog box Parameters tab, enter the IP address
and the subnet mask you have already assigned to the CP343-1 and confirm the
entry with OK.
Figure 7-15
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
37
7.3.2
38
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Overview
The input parameters of the FB4 GET_PUT function block are controlled via
variables. You can set or reset the variables in WinCC flexible Runtime or in STEP
7 using the variable table.
Figure 8-16
MP377 12 Touch
S7-300 with CP343-1
SCALANCE X208
WinCC flexible Runtime
SIMATIC Field PG
STEP 7
(Variable table)
8.2
Cyclic reading or
writing of the data
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
39
The table below provides an overview of the switches and buttons in WinCC
flexible Runtime and the assigned binary variables and of the meaning of the
switch positions.
Table 8-21
Switch /
Button
M10.0
Switch position
M10.0
M11.0
M11.0
M10.1
Copyright Siemens AG 2009 All rights reserved
Variable
M10.1
M11.1
M11.1
M20.1
M20.1
M20.2
M20.2
Color
Meaning
enable
green
disable
red
enable
green
disable
red
enable
green
disable
red
enable
green
disable
red
green
gray
green
gray
Click the M20.1 and M20.2 buttons to read or wite the data once. These buttons
can only be operated when cyclic reading or writing of the data is disabled. This
means that if the data is to be written or read once, the M10.1 or M11.1 switch
must be set to disable.
Cyclic reading of the data
Table 8-22
No.
1.
40
Action
Set the M10.0 switch to the enable position:
Result
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Action
Set the M10.1 switch to the enable position:
Result
3.
No.
Action
Result
1.
2.
3.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
41
Action
Result
1.
2.
3.
4.
Action
Result
1.
2.
42
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Action
Click the M20.2 button to write the data once.
Result
4.
8.3
In the variable table of the WinAC MP software PLC user program, you can set and
reset the binary variables to control the input parameters of FB4 GET_PUT, set
values for the send data in DB100 and monitor the receive data in DB200.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
43
Action
Result
1.
2.
3.
4.
No.
Action
Result
1.
2.
3.
4.
Action
Result
1.
2.
3.
44
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
Action
Set the M20.1 variable to true.
Result
5.
No.
Action
Result
1.
2.
3.
4.
5.
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
45
References
References
9.1
Internet links
This list is by no means complete and only provides a selection of useful
information.
Table 9-30
Topic
\1\
\2\
Title
Manual:
S7-300 CPUs
V2.6
Manual:
S7-300 CPUs
\3\
Manual:
S7-400 CPUs
\4\
Manual:
WinAC MP
\5\
PUT / GET
\6\
\7\
SIMATIC S7
communication
WinCC flexible
2008
\8\
WinCC flexible
2008 Runtime
\9\
\10\
\11\
WinCC flexible
communication
6
WinCC flexible
communication
6
S7
communication
\12\
46
Siemens I IA/DT
Customer
Support
http://support.automation.siemens.com/
6
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
History
10
History
Table 10-31
Version
09/23/09
Modification
First edition
V1.0
Date
Application for the "PUT" and "GET" Function Blocks of the S7 Communication
V1.0, ID Number: 38066687
47