Professional Documents
Culture Documents
Caution
The functions and solutions described in this article confine themselves to the
realization of the automation task predominantly. Please take into account
furthermore that corresponding protective measures have to be taken up in the
context of Industrial Security when connecting your equipment to other parts of the
plant, the enterprise network or the Internet. Further information can be found
under the Content-ID 50203404.
http://support.automation.siemens.com/WW/view/en/50203404
If you have any questions concerning this document please e-mail us to the
following address:
mailto:online-support.industry@siemens.com
Copyright Siemens AG 2011 All rights reserved
You can also actively use our Technical Forum from the Service & Support Portal
regarding this subject. Add your questions, suggestions and problems and discuss
them together in our strong forum community:
http://www.siemens.com/forum-applications
OC Wizard
2 V2.3.3, Entrys-ID: 25209116
s Automation Task 1
Automation Solution 2
Function Mechanisms of
this Application 3
Design 4
SIMATIC
OC Wizard Installation 5
Open Communication Operation of the
Application 6
Related Literature 7
Copyright Siemens AG 2011 All rights reserved
History 8
OC Wizard
V2.3.3, Entry-ID: 25209116 3
Warranty and Liability
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,
Copyright Siemens AG 2011 All rights reserved
OC Wizard
4 V2.3.3, Entrys-ID: 25209116
Table of Contents
Table of Contents
Warranty and Liability ................................................................................................. 4
1 Automation Task .................................................................................. 6
1.1 Overview .............................................................................................. 6
2 Automation Solution ............................................................................. 7
2.1 Overview .............................................................................................. 7
2.2 Required Hardware and Software Components .................................. 7
3 Function Mechanisms of this Application ............................................. 9
3.1 Overview .............................................................................................. 9
3.2 Operation principle of the example program ...................................... 10
4 Design ................................................................................................ 11
4.1 Hardware setup .................................................................................. 11
5 Installation .......................................................................................... 12
5.1 Installation of the Tool ........................................................................ 12
5.2 Installing the example......................................................................... 13
6 Operation of the Application............................................................... 14
6.1 Functions of the OC Wizard as an overview ...................................... 14
6.2 General information on the dialog masks........................................... 16
6.3 Step by step instruction: Call OC Wizard from SIMATIC
Manager ............................................................................................. 23
Copyright Siemens AG 2011 All rights reserved
OC Wizard
V2.3.3, Entry-ID: 25209116 5
1 Automation Task
1.1 Overview
1 Automation Task
1.1 Overview
All new SIMATIC S7-CPUs contain an integrated PROFINET interface which
enables the TCP/IP communication.
The configuration of the TCP/IP communication via this integrated interface is only
possible using the open communication and its function blocks.
The communication blocks FB65 "TCON", FB66 "TDISCON", FB63 "TSEND" and
FB64 "TRCV" are used. The connection description does not occur via a
configuration (in NetPro), therefore the parameters for each connection must be
specified in a data block.
Copyright Siemens AG 2011 All rights reserved
OC Wizard
6 V2.3.3, Entrys-ID: 25209116
2 Automation Solution
2.1 Overview
2 Automation Solution
2.1 Overview
The Automation solution
Using the “Open Communication Wizard” tool enables simple and clear
specification of the connection parameters. The tool then exports a UDT or a DB
with all parameters of the connection description into your STEP 7 project.
Using the finished data block we then give a simple example project of how the
communication is realized in the S7-300 and S7-400 CPU from a program
technology point of view using the above blocks.
This example project shows the configuration and programming of a
communication relationship between a CPU319 and a CPU419 via the integrated
Ethernet interface and the ISO-on-TCP protocol.
Hardware components
Table 2-1
Component No. MLFB / order number Note
PS307 5A 1 6ES7307-1EA00-0AA0
CPU319-3 PN/DP 1 6ES7318-3EL00-0AB0 from V2.5
PS407 10A 1 6ES7407-0KA01-0AA0
CPU416-3 PN/DP 1 6ES7416-3ER05-0AB0 from V5.0
OC Wizard
V2.3.3, Entry-ID: 25209116 7
2 Automation Solution
2.2 Required Hardware and Software Components
Component Note
25209116_OC_Wizard_CODE_V233.zip Tool - Open Communication Wizard
25209116_STEP7Example.zip STEP 7 example project with the
connection data
OC Wizard
8 V2.3.3, Entrys-ID: 25209116
3 Function Mechanisms of this Application
3.1 Overview
Download connections
Copyright Siemens AG 2011 All rights reserved
OC Wizard
V2.3.3, Entry-ID: 25209116 9
3 Function Mechanisms of this Application
3.2 Operation principle of the example program
Figure 3-2
FB65_REQ = 1
FB63_REQ = 1
FB66_REQ = 1
Copyright Siemens AG 2011 All rights reserved
MB20 MB20
SENDDATA RECVDATA
FB66 “TDISCON”
Table 3-1
No. Instruction
1. With a positive edge at FB65_REQ, the FB65 “TCON” tries to establish a
connection using the connection data from the DB10 “TCON_PAR“.
2. After the connection has been established, memory byte 20 is sent to the partner
station with each positive edge at FB63_REQ.
3. The partner receives the data and saves it in memory byte 20.
4. A rising edge at FB66_REQ reactivates the connection.
OC Wizard
10 V2.3.3, Entrys-ID: 25209116
4 Design
4.1 Hardware setup
4 Design
4.1 Hardware setup
The figure below shows the hardware setup of the example. S7-300, S7-400 and
the PG/PC are connected via Industrial Ethernet.
Figure 4-1
192.168.1.31
192.168.1.30
Industrial Ethernet
PG/PC with
STEP 7 and
Open Communication Wizard
OC Wizard
V2.3.3, Entry-ID: 25209116 11
5 Installation
5.1 Installation of the Tool
5 Installation
5.1 Installation of the Tool
Software Preconditions
The Open Communication Wizard is running under:
• MS Windows XP Professional with SP2 or SP3
• MS Windows 7 ultimate / professional / enterprise with or without SP1. The
Windows XP mode under Windows 7 has not been approved yet.
• MS Windows Server 2003 R2 SP2 standard edition as working station
• MS Windows Server 2008 R2 (64Bit) with or without SP1
The Open Communication Wizard on the STEP 7 DVD can be found under
“CD_2\Optional Components\OC Wizard“. Execute Setup.exe.
Note The Open Communication Wizard works with STEP 7 projects. This requires
STEP 7 being installed on this computer. If STEP 7 is not installed the
installation of the Open Communication Wizard will be aborted.
OC Wizard
12 V2.3.3, Entrys-ID: 25209116
5 Installation
5.2 Installing the example
Note The example is runnable immediately. Chapter Operating the example describes
how to control the data transfer
OC Wizard
V2.3.3, Entry-ID: 25209116 13
6 Operation of the Application
6.1 Functions of the OC Wizard as an overview
NOTICE NOTICE
The OC Wizard enables you to identify your connections by assigning a
connection name in plain text.
This connection name is saved in some comment lines of the connection
data. These comment lines are not available for other usage!
Note In the overview the connection data are shaded in gray, if these data cannot be
changed. This includes the following:
• Connection data in a UDT. All data blocks in the S7 program which use these UDT
are affected by the changes.
• The connection data in an instance data block. Changing these data may cause time
stamp conflicts.
• Connection data in structures with nesting depth > 1 (e.g.
DB1.TCON.CPU319.TCP.Verb1.block_length…..).
• UDP Connection: Address data is not available, because e.g. in the editor of STEP 7
the block was deleted, copied, modified, ….
OC Wizard
14 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.1 Functions of the OC Wizard as an overview
OC Wizard
V2.3.3, Entry-ID: 25209116 15
6 Operation of the Application
6.2 General information on the dialog masks
The Open Communication Wizard starts with this dialog. Here you find information
on the Open Communication Wizard. Further information on the open
communication is available on the internet.
OC Wizard
16 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.2 General information on the dialog masks
The STEP 7 project selected in this dialog as well as the block folder can be
considered as a source station. From this station connection data are uploaded.
After using the “Next” Button the upload of the specified project starts
automatically.
This station is at the same time used as target station, if the details on the STEP 7
project and/or the block folder are not changed in the dialog mask “Select Step 7
project and block folder” in the further course of the configuration.
The tool determines IP addresses of the selected station. These IP addresses can
be considered as local IP addresses.
Note The “STEP 7 project” dialog mask is only provided when directly calling the OC
Wizard from Windows.
When calling the OC Wizard from the SIMATIC Manager the STEP 7 project
and the block folder is automatically transferred from the SIMATIC Manager. The
project and the block folder from which the OC Wizard was called is valid during
the entire processing time and is only transferred new after exiting the OC
Wizard and calling it again. This is the case for the source station as well as for
the target station.
Therefore this mask is not offered when calling from the SIMATIC Manager.
Copyright Siemens AG 2011 All rights reserved
In this dialog the uploaded connections in the overview are represented. Here you
can switch between functions of the Open Communication Wizard.
The upload starts automatically. This gives you an overview of the connections of
the selected station. Furthermore the ID is preassigned with the next free value for
a new connection
The overview can be exported as *.csv file. To do this click “export”.
OC Wizard
V2.3.3, Entry-ID: 25209116 17
6 Operation of the Application
6.2 General information on the dialog masks
OC Wizard
18 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.2 General information on the dialog masks
In this dialog the option “Only communication …” enables you to choose whether
Copyright Siemens AG 2011 All rights reserved
you wish to configure both partners at the same time. This option can be changed
when creating a new “TCP native” or “ISO on TCP” connection. In other cases this
option is defined by the OC Wizard and cannot be changed.
You can also configure these connections individually.
Changing the options causes the values to be reset and the dialog masks to be
represented differently.
Here you enter connection parameters. Please ensure, that the correct interface
has been selected. Please also note, that rack and slot must be adjusted for S7-
400.
OC Wizard
V2.3.3, Entry-ID: 25209116 19
6 Operation of the Application
6.2 General information on the dialog masks
In this dialog you enter the port number for the connection.
We recommend using a port number from the range 2000 to 5000.
In the dialog please specify to which project and to which block folder the
generated UDT or DB should be imported. The selected STEP 7 project and the
block folder can in this dialog be considered as target station. These details are
preassigned here.
OC Wizard
20 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.2 General information on the dialog masks
You can accept this preassignment or also specify a different target project or
target folder to which the completed block is compiled and inserted. If you specified
a different target project and after using the “Next” Button a new upload of the
specified project starts automatically.
If a connection is changed (function “Change”), details in this dialog cannot be
changed. The connection data are filed in the same data block and at the same
location.
Assign any block name. When using a symbolic name ensure that the symbolic
name is defined in your S7 program.
The OC Wizard checks whether the specified block already exists in your S7
program. If the block does not yet exist in your S7 program, it will be generated. An
existing data block is analyzed by the OC Wizard and, after a successful analysis,
connection data can be assigned to the data block.
CAUTION The OC Wizard ignores read protection of data blocks. I.e. data blocks will
be overwritten from the OC Wizard. Choose only data blocks without read
protection in OC Wizard.
Copyright Siemens AG 2011 All rights reserved
Note When calling the OC Wizard from the SIMATIC Manager the STEP 7 project
and the block folder is automatically transferred from the SIMATIC Manager. The
project and the block folder from which the OC Wizard was called are shaded in
gray in this mask. The connection configuration created with the OC Wizard is
saved in this block folder.
OC Wizard
V2.3.3, Entry-ID: 25209116 21
6 Operation of the Application
6.2 General information on the dialog masks
Note Up to this dialog mask no changes have yet been made in the STEP 7 project.
Continuing the OC Wizard by pressing the “Next” button causes the compilation
and insertion of the bock into your selected target project.
In this dialog the results of the compilation are displayed. If no errors are displayed
in the report, the changes in the STEP 7 project are made successfully. Otherwise
no changes are made.
If an error message is displayed in the report, you check whether the used block is
not opened otherwise.
OC Wizard
22 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.3 Step by step instruction: Call OC Wizard from SIMATIC Manager
Note When calling the OC Wizard from the SIMATIC Manager, the data from the
called block folder is read and transferred in this block folder.
OC Wizard
V2.3.3, Entry-ID: 25209116 23
6 Operation of the Application
6.4 Step by step instruction: Create new connection
Note If already configured open connections exist in your project, you can also create
new connections via the “Copy” option. See: (Step-by-step instruction: Copy
connection / Use as template).
Description OC Wizard
3. Click “Next” in this dialog.
Further information on this dialog is available
in chapter “Dialog mask: Welcome”.
Copyright Siemens AG 2011 All rights reserved
OC Wizard
24 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.4 Step by step instruction: Create new connection
Description OC Wizard
6. Here you select the types of the new
connection.
Further information on this dialog is available
inchapter “Dialog mask: Choose the type
of your connection”.
OC Wizard
V2.3.3, Entry-ID: 25209116 25
6 Operation of the Application
6.4 Step by step instruction: Create new connection
Description OC Wizard
9. In this dialog you enter any UDT or DB name.
Further information on this dialog is available
in chapter “Dialog mask: Chose
destination project”.
OC Wizard
26 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.5 Step by step instruction: Change connection
Description OC Wizard
12. Click “Next” in this dialog.
Further information on this dialog is available
in chapter “Dialog mask: Welcome”.
OC Wizard
V2.3.3, Entry-ID: 25209116 27
6 Operation of the Application
6.5 Step by step instruction: Change connection
Description OC Wizard
15. Click “Next” in this dialog.
Further information on this dialog is available
in chapter “Dialog mask: Communication
partner I”.
OC Wizard
28 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.5 Step by step instruction: Change connection
Description OC Wizard
18. In this dialog you check your details and click
“Next”.
Further information on this dialog is available
in chapter “Dialog mask: Overview”.
OC Wizard
V2.3.3, Entry-ID: 25209116 29
6 Operation of the Application
6.6 Step by step instruction: Copy connection / use as template
Description OC Wizard
20. Click “Next” in this dialog.
Further information on this dialog is available
in chapter “Dialog mask: Welcome”.
Copyright Siemens AG 2011 All rights reserved
OC Wizard
30 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.6 Step by step instruction: Copy connection / use as template
Description OC Wizard
23. Click “Next” in this dialog.
Further information on this dialog is available
in chapter “Dialog mask: Communication
partner I”.
OC Wizard
V2.3.3, Entry-ID: 25209116 31
6 Operation of the Application
6.6 Step by step instruction: Copy connection / use as template
Description OC Wizard
26. In this dialog you check your details and click
“Next”.
Further information on this dialog is available
in chapter “Dialog mask: Overview”.
OC Wizard
32 V2.3.3, Entrys-ID: 25209116
6 Operation of the Application
6.7 Required steps for connection configuration in UDT
Note This step is only necessary if connection data are filed in a UDT. Connection
data filed in a data block can be used directly.
OC Wizard
V2.3.3, Entry-ID: 25209116 33
6 Operation of the Application
6.8 Operating the example
Figure 6-12
Copyright Siemens AG 2011 All rights reserved
Table 6-1
No. Instruction
28. Triggering the connection setup with rising edge at FB65_REQ in both
communication partners.
29. As soon as the connection has been established (FB65_connected) you trigger
the data transfer in the CPU319 with a rising edge at FB63_REQ.
30. Data is continuously received in the S7-400. Evaluate the rising edge of
FB64_NDR to process the received data.
31. After sending was completed, the connection can be cancelled with a rising edge
at FB66_REQ. This step must be performed in both communication partners.
OC Wizard
34 V2.3.3, Entrys-ID: 25209116
7 Related Literature
7 Related Literature
This list is not complete and only represents a selection of relevant information.
Table 7-1
Subject Title
\1\ “System software for S7- http://support.automation.siemens.com/WW/
300/400 system- and view/en/1214574
standard functions” manual
\2\ Examples and FAQs for open http://support.automation.siemens.com/WW/
communication via Industrial view/en/22868211
Ethernet
\3\ Automation system S7-400 http://support.automation.siemens.com/WW/
CPU data view/en/23904550
Copyright Siemens AG 2011 All rights reserved
OC Wizard
V2.3.3, Entry-ID: 25209116 35
8 History
8 History
Table 8-1
Version Date Modifications
V1.0 04.05.2007 First issue
V2.0 15.09.2008 Updating for Open Communication Wizard V2.0
V2.1 04.12.2008 Updating for Open Communication Wizard V2.1
V2.1.1 19.02.2009 Modification of header and footer
V2.1.1.4 25.06.2009 Add-on with integration of OC Wizard in STEP 7
V2.2 02.02.2010 Add-on with WinAC
V2.3 03.03.2010 Modification of GUI
V2.3.2 05/2011 Updating for STEP 7 V5.5 SP1
V2.3.3 12/2011 Add-on with CPU314, CPU 412
Copyright Siemens AG 2011 All rights reserved
OC Wizard
36 V2.3.3, Entrys-ID: 25209116