Vous êtes sur la page 1sur 57

Introduction

1
Installation Guide

2
Communication and
Handling

3
System Features

4
Tips

5
Notes on the Online Help
and Documentation

6
Service and support

A

SIMOTION
SIMOTION SCOUT
SIMATIC NET (XP) for SIMOTION
Product Information
05/2009





Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent
damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert
symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are
graded according to the degree of danger.
DANGER
indicates that death or severe personal injury will result if proper precautions are not taken.

WARNING
indicates that death or severe personal injury may result if proper precautions are not taken.

CAUTION
with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.

CAUTION
without a safety alert symbol, indicates that property damage can result if proper precautions are not taken.

NOTICE
indicates that an unintended result or situation can occur if the corresponding information is not taken into
account.
If more than one degree of danger is present, the warning notice representing the highest degree of danger will
be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to
property damage.
Qualified Personnel
The device/system may only be set up and used in conjunction with this documentation. Commissioning and
operation of a device/system may only be performed by qualified personnel. Within the context of the safety notes
in this documentation qualified persons are defined as persons who are authorized to commission, ground and
label devices, systems and circuits in accordance with established safety practices and standards.
Proper use of Siemens products
Note the following:
WARNING
Siemens products may only be used for the applications described in the catalog and in the relevant technical
documentation. If products and components from other manufacturers are used, these must be recommended
or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and
maintenance are required to ensure that the products operate safely and without any problems. The permissible
ambient conditions must be adhered to. The information in the relevant documentation must be observed.
Trademarks
All names identified by are registered trademarks of the Siemens AG. The remaining trademarks in this
publication may be trademarks whose use by third parties for their own purposes could violate the rights of the
owner.
Disclaimer of Liability
We have reviewed the contents of this publication to ensure consistency with the hardware and software
described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the
information in this publication is reviewed regularly and any necessary corrections are included in subsequent
editions.

Siemens AG
Industry Sector
Postfach 48 48
90026 NRNBERG
GERMANY

07/2009
Copyright Siemens AG 2009.
Technical data subject to change

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 3
Table of contents

1 Introduction................................................................................................................................................ 5
1.1 Overview........................................................................................................................................5
1.2 Schematic diagram at the design stage.........................................................................................6
1.3 Schematic diagram at runtime .......................................................................................................7
2 Installation Guide....................................................................................................................................... 9
2.1 Hardware and software requirements at the design stage..........................................................10
2.2 Hardware and software requirements at runtime.........................................................................11
2.3 Required licenses ........................................................................................................................12
3 Communication and Handling.................................................................................................................. 13
3.1 Fundamental procedures.............................................................................................................13
3.2 Configure the OPC Server/SIMOTION device interface at runtime.............................................14
3.2.1 Storage paths for export files.......................................................................................................14
3.2.2 Configuring an interface for the SIMOTION C230-2/D4x5 devices.............................................16
3.2.3 Configuring an interface on a SIMOTION P350 ..........................................................................17
3.3 OPC data export during the design stage....................................................................................18
3.3.1 OPC data export at the design stage...........................................................................................18
3.3.2 Parameterizing the data export....................................................................................................20
3.3.3 Exporting "OPC_DATA" (symbol file)...........................................................................................21
3.3.4 Exporting "OPC Alarm/Event"......................................................................................................21
3.3.5 Routing configuration with SIMOTION SCOUT...........................................................................22
3.3.6 Variables for consistency check...................................................................................................24
3.4 Data transfer to the OPC Client ...................................................................................................26
3.5 SIMOTION OPC File Manager (V6.2 or higher) ..........................................................................27
3.5.1 Fundamental description of an application ..................................................................................29
3.5.2 Time zone definition.....................................................................................................................30
3.5.3 Routing definition .........................................................................................................................31
4 System Features...................................................................................................................................... 35
4.1 System variables..........................................................................................................................35
4.2 OPC alarms and events for SIMOTION.......................................................................................37
4.3 Consistent data access................................................................................................................38
5 Tips.......................................................................................................................................................... 39
5.1 Programming tips.........................................................................................................................39
5.2 How can a new OPC configuration (OPC Data, OPC Alarm/Event) be initialized when an
OPC Client is running? ................................................................................................................41
5.3 OPC communication to SIMOTION and SIMATIC S7 controller via PROFIBUS........................43
5.4 OPC via PROFINET ....................................................................................................................46
5.5 More tips ......................................................................................................................................47
Table of contents

SIMATIC NET (XP) for SIMOTION
4 Product Information, 05/2009
5.6 Comparison of SIMOTION IT OPC XML-DA/SIMATIC NET for SIMOTION.............................. 49
5.7 Example of an application........................................................................................................... 50
6 Notes on the Online Help and Documentation......................................................................................... 53
A Service and support................................................................................................................................. 55
A.1 Service and support .................................................................................................................... 55
Index........................................................................................................................................................ 57

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 5
Introduction
1
1.1 Overview
What is SIMOTION?
SIMOTION is an extensive system for the automation of production machines focusing on
motion control.
SIMOTION comprises:
SIMOTION SCOUT,
An engineering system for creating a project by:
Configuring, programming, parameter assignment
Graphical or text-based programming
Project download to SIMOTION P, C, D
The project also contains the hardware configuration and user data.
SIMOTION Kernel
A kernel for various HW platforms.
What is SIMATIC NET?
SIMATIC NET provides an OPC server as a standard component that enables access to the
most diverse communication partners via the open OPC interface.
For a detailed description of SIMATIC NET, please refer to the current documentation CD
"SIMATIC NET Manual Collection".
Which functionality is provided by SIMATIC NET for SIMOTION?
SIMATIC NET for SIMOTION provides:
Access via OPC Data Access, enabling the user to read and write variables of a
SIMOTION device.
OPC Alarms and Events which can be used to receive alarms and events of a SIMOTION
device.
Gateway configuration.
A SIMOTION OPC File Manager for the conditioning of network information relating to
several SIMOTION SCOUT projects so that they can be simultaneously processed by the
SIMATIC NET OPC server.
Introduction
1.2 Schematic diagram at the design stage
SIMATIC NET (XP) for SIMOTION
6 Product Information, 05/2009
1.2 Schematic diagram at the design stage
Overview of design stage
The figure below exemplifies an arrangement of the relevant software for the creation of an
OPC Client application on an engineering PC/PG.
During the design stage, there is no communication between the PG/PC and the SIMOTION
device (OFFLINE mode). A connection is not required.
SIMATIC NET
PC software
SIMOTION SCOUT
If applicable,
OPC client
application
PROFIBUS DP/Ethernet
e.g. SIMOTION C230-2
OFFLINE mode
SMs PS
Engineering PC/PG

Figure 1-1 Design stage overview (example)

Introduction
1.3 Schematic diagram at runtime
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 7
1.3 Schematic diagram at runtime
Runtime overview
The following figure illustrates the arrangement of an OPC Client with the relevant software
on an HMI PC, the kernel and the user data on the SIMOTION device during runtime.
SMs
PROFIBUS DP (isochronous, equidistant)
PS
Protocol software for S7 and
SIMATIC NET
communications processor
SIMATIC NET
OPC server
OPC client
Kernel and
user data, among others
PROFIBUS DP
e.g. SIMOTION C230-2
Onboard
Analog
ET 200
HMI PC
Ethernet

Figure 1-2 Overview at runtime (example)
Introduction
1.3 Schematic diagram at runtime
SIMATIC NET (XP) for SIMOTION
8 Product Information, 05/2009

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 9
Installation Guide
2


Note
The "SIMATIC NET for SIMOTION" Product Information, Edition 05/2009, applies to
Windows 2000 and Windows XP operating systems.
Procedures in connection with the Windows NT operating system are described in the
"SIMATIC NET for SIMOTION" Product Information, Edition 03/2003.

Installation Guide
2.1 Hardware and software requirements at the design stage
SIMATIC NET (XP) for SIMOTION
10 Product Information, 05/2009
2.1 Hardware and software requirements at the design stage
Hardware requirements at the design stage

Configuration Minimum requirement
Processor Intel Pentium III or compatible,
1 GHz (Windows XP)
Main memory 512 MB RAM
Screen resolution 1024 x 768 pixels

Software requirements at the design stage
Windows 2000 Service Pack 3 or Windows XP SP2
As of SIMOTION SCOUT V4.1.4, Windows XP SP3
The installation requirements for the product are described in the SIMOTION and SIMATIC
NET documentation (SIMATIC NET Manual Collection).
Installation Guide
2.2 Hardware and software requirements at runtime
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 11
2.2 Hardware and software requirements at runtime
Hardware requirements at runtime

Configuration Minimum requirements
Processor Intel Pentium II, 266 MHz
Main memory 256 MB RAM
Monitor etc. VGA monitor, keyboard and mouse or
touchscreen
Screen resolution 800 x 600 pixels at 256 colors
Memory Approx. 150 MB on hard disk,
A minimum of 1 MB memory capacity on drive C:
for the setup program (the setup files will be
deleted after successful installation)
Network cards PROFIBUS card, e.g. CP5611, CP5512
and/or Ethernet card e.g. CP1612
SIMOTION device SIMOTION C230-2 with Micro Memory Card
(restricted operation possible without the card) or
SIMOTION P350, SIMOTION D4x5
Software requirements at runtime
Client/Server
As of Windows 2000 Service Pack 3 or Windows XP SP1
SIMATIC NET PC software, as of Version 6.2
SIMOTION C230-2
SIMOTION Kernel (kernel included with product shipment)
SIMOTION P350
SIMOTION Kernel (kernel included with product shipment)
SIMOTION D4x5
SIMOTION Kernel (kernel included with product shipment)
Installation Guide
2.3 Required licenses
SIMATIC NET (XP) for SIMOTION
12 Product Information, 05/2009
2.3 Required licenses
Licenses dependent on communications path
Depending on the connection used for OPC communication with SIMOTION RT, you will
require one of the following SIMATIC NET licenses:
For communication with SIMOTION RT via Ethernet:
SOFTNET S7 for IE (MLFB: 6GK1704-1CW62-3AA0)
SOFTNET S7 Lean (only 8 connections possible) (MLFB: 6GK1704-1LW62-3AA0)
S7-1613 (only if the CP1613 communications processor is used)
(MLFB: 6GK1716-1CB62-3AA0)
SIMATIC NET 2007 PC software
(MLFB: 6GK1716-1CB70-3AA0)
For communication with SIMOTION RT via PROFIBUS/MPI:
SOFTNET S7 for PROFIBUS (MLFB: 6GK1704-5CW62-3AA0)
S7-5613 (only if the CP5613 communications processor is used)
(MLFB: 6GK1713-5CB62-3AA0)
For PROFINET RT communication via SIMATIC NET PC software:
If you are communicating with a SOFTNET Ethernet card as PROFINET IO RT
controller, then the following license is required: SOFTNET PN IO
(MLFB: 6GK1704-1HW63-3AA0).
SIMATIC NET 2007 PC software
(MLFB: 6GK1704-1HW70-3AA0)

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 13
Communication and Handling
3
3.1 Fundamental procedures
Overview
Some preparation is necessary for establishing a communication between the OPC Server
for SIMATIC NET and a SIMOTION device.
Basically, you must:
Table 3- 1 Fundamental procedures
When? Step Procedure Comment
Design stage/
runtime
1 Configure the SIMATIC NET PC
software and communications
processor.
See the section titled
"Configuring the OPC
Server/SIMOTION device
interface at runtime" (Page 14)
Design stage 2 Create a project with SIMOTION
SCOUT for the SIMOTION device.
See SIMOTION SCOUT
operating guide
Design stage 3 Export OPC data. See the sections titled "Exporting
OPC data during the design
stage" (Page 18) and "How is a
new OPC configuration enabled
when an OPC client is
operating?" (Page 41)
Design stage 4 If you have configured more than one
network, you have to configure
routing between these networks after
file export in SIMOTION SCOUT.
See the section titled
"Configuring routing with
SIMOTION SCOUT" (Page 22)
Design stage 5 If there are several projects, you must
configure and integrate them with the
SIMOTION OPC File Manager.
See the section titled
"SIMOTION OPC File Manager"
(Page 27)
Design stage 6 Transfer/copy the exported data to
the HMI PC.
See the section titled "Data
transfer to the OPC client"
(Page 26)
Design stage 7 Create a Client application based on
OLE/COM-DCOM.
For example in Visual Basic
Design stage 8 Download the project to the
SIMOTION device.
See SIMOTION SCOUT
operating guide
Communication and Handling
3.2 Configure the OPC Server/SIMOTION device interface at runtime
SIMATIC NET (XP) for SIMOTION
14 Product Information, 05/2009
3.2 Configure the OPC Server/SIMOTION device interface at runtime
3.2.1 Storage paths for export files
Introduction
The runtime behavior of SIMATIC NET is controlled with two parameter files (see "OPC data
export during the design stage" (Page 18)).
Storage paths
The runtime environment looks for the parameter files on the following paths:
OPC_AE.xml:
Prior to SIMATIC NET 2007 the file could be found in the following directory:
"<SIMATIC NET installation directory>\SIMATIC.net\opc2\bins7\simotion\xml\".
As of SIMATIC NET 2007, SIMATIC NET makes a distinction between the following two
installation directories:
Installation directory for programs
Installation directory for data
The installation directory for data is identified from the registry using the key
"HKEY_LOCAL_MACHINE\SOFTWARE\SIEMENS\SIMATIC_NET\General\Paths",
value "SINEC_DataPath".
OPC_AE.xml must be stored in this installation directory inside the subdirectory
\opc2\bins7\simotion\XML\.
Accordingly, the full path looks like this:
"<Installation directory for data>\opc2\bins7\simotion\XML\OPC_AE.xml"
Symbol file OPC_DATA
We recommend storing OPC_DATA in the same directory.
File name extension
Note
File name extension
The file name extension of the "OPC_DATA" file (SSD, STI, etc.) is dependent upon the
version of SIMOTION SCOUT.

Communication and Handling
3.2 Configure the OPC Server/SIMOTION device interface at runtime
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 15
Additional note
Note
The "User Data" folder has the "System Folder" property and may be hidden.
The folder can be shown by selecting the menu command "Tools > Folder Options..." in the
Windows Explorer.


Communication and Handling
3.2 Configure the OPC Server/SIMOTION device interface at runtime
SIMATIC NET (XP) for SIMOTION
16 Product Information, 05/2009
3.2.2 Configuring an interface for the SIMOTION C230-2/D4x5 devices
Procedure
In order to establish a connection between an HMI PC and a SIMOTION C230-2/D4x5
device, you must carry out the following steps to configure the interface:
Table 3- 2 Configuring the interface
Step Procedure
1 Install a PROFIBUS or Ethernet communications processor (e.g. CP5611) in the PC.
Install the SIMATIC NET PC software.
2 Call the configuration tool for the PC station by clicking the menu item Start->SIMATIC-
>SIMATIC NET->Settings->PC station settings.
Set the PC properties as indicated on the following pages.
1. Navigate to Applications->OPC Settings->Symbols.
2. Click the "Edit List" button in the "Symbols" dialog.
If you want to use "OPC Data" and "OPC Alarms and Events" or just "OPC Data,"
enter the file name of the symbol file "OPC_DATA" (see the note under "File name
extension" (Page 14)) in the "File Name" field and click the "Browse" button to
select the directory
"<Installation directory for data>\opc2\bins7\simotion\xml\".
(The directory that you used last is always offered for selection by default.)
Select the following files:
OPC_AE.XML
OPC_Data.idl
OPC_DATA (see the note under "File name extension" (Page 14))
The folder has the "System Folder" property and may be hidden.
3. Exit the dialog by clicking "OK" and save the file.
4. In the "Extended Symbols..." dialog for SIMOTION, select the communication module
(e.g. "CP5611 (PROFIBUS)").
5. In the "Select OPC Protocol" dialog, select the "S7 Protocol" and deselect all of the
other protocols which are not required.
6. Click "Finish" to exit the installation setup for the SIMATIC NET OPC Server.
3 After that, perform a test run of the communications processor.
You can test the correct functioning of this module in the window "SIMATIC NET PC
Station Settings" (which can also be called from the menu item Start->SIMATIC->SIMATIC
NET->Settings->PC station settings).
To do this, select a communications processor (e.g. "CP5611") and select "Refresh" at
"Bus Nodes".


Note
If project data are changed in SIMOTION SCOUT after export of the symbol file, you must
re-export the data (consistency).

Communication and Handling
3.2 Configure the OPC Server/SIMOTION device interface at runtime
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 17
3.2.3 Configuring an interface on a SIMOTION P350
Procedure
In order to establish a connection between an HMI PC and a SIMOTION P350 device, you
must carry out the following steps to configure the interface:
Table 3- 3 Configuring the interface
Step Procedure
1 The PROFIBUS card and the SIMATIC NET PC software are included in the product
shipment.
2 Call the configuration tool for the PC station by clicking the menu item Start->SIMATIC-
>SIMATIC NET->Settings->Configuration console.
Set the PC properties as indicated on the following pages.
1. Navigate to Applications->OPC Settings->Symbols.
2. Click the "Edit List" button in the "Symbols" dialog. The dialog window "Manage Symbol
Files" is displayed.
If you want to use "OPC Data" and "OPC Alarms and Events" or just "OPC Data", enter
the file name of the symbol file "OPC_DATA" (see the note under "File name extension"
(Page 14)) in the field "File name" and click "Browse" to select the directory
"<Installation directory for data> \opc2\bins7\simotion\xml"
(The directory that you used last is always offered for selection by default.)
Select the following files:
OPC_AE.XML
OPC_Data.idl
OPC_DATA (see the note under "File name extension" (Page 14))
The folder has the "System Folder" property and may be hidden.
3. Exit the dialog "Manage Symbol Files" by clicking "OK" and save the files with "Apply".
4. In the "Select OPC Protocol" dialog select the S7 protocol and deselect all of the other
protocols which you don't need.
5. Click "Finish" to exit the installation setup for the
SIMATIC NET OPC Server.


Note
During the installation on the SIMOTION P350, the access point CP_SM_1: must be
connected to the PC internal (local) at "Configuration Console" after the configuration of the
interface!
This access point can be set in the menu item
Start->SIMATIC->SIMATIC NET->Settings->Configuration Console.

Note
With SIMOTION V3.1 and higher, communication via PC internal (local) is set as default.

Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
18 Product Information, 05/2009
3.3 OPC data export during the design stage
3.3.1 OPC data export at the design stage
Exporting configured data
To declare the data configured in SIMOTION SCOUT to SIMATIC NET, you have to export
all usable data by selecting the menu command Options->OPC Data Export... (i.e. during the
design stage).
Parameters are queried during the data export (see "Parameterizing the data export"
(Page 20)).
Directory for files to be exported
The following directory is set by default as the export directory in SIMOTION SCOUT:
"<LW>:\Siemens\Step7\S7proj\<project name>\U7\Tagfiles\"
If you are using the HMI PC both during the design stage and at runtime, select the following
directory:
"<Installation directory for data>\opc2\bins7\simotion\xml"
Which files are exported?
You can export the following files:
Symbol file "OPC_DATA" (see the note under "File name extension" (Page 14)), i.e.:
System variables of the device and the technology objects
Global device user variables
Symbolic I/O variables
Interface variables from user programs
(for data types see "System variables")
"OPC alarm/event" (OPC_AE.xml), i.e.:
Technology object alarms
Diagnostics buffer alarms
Alarm_S/Q
Connection information



Note
The online help in SIMOTION SCOUT describes the operator sequences required for
the OPC data export in detail.

Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 19
Router configuration
Once the data export is complete, you will be asked if you wish to configure gateways (for
routing). "Configuring gateways with SIMOTION SCOUT" describes how to do this.
The export process
The export process is logged in SIMOTION SCOUT in the detail view on the Symbol File
Export Status Display tab.
Notes
Note
If project data are changed in SIMOTION SCOUT after export of the symbol file, you must
re-export the data (consistency).

Note
During commissioning, you must make sure that OPC data transmission is disabled on the
active OPC client.

Note
After the export, the files have to be transferred/copied to the OPC client (see "Data transfer
to the OPC client" (Page 26)).

Note
If you are working with multiple projects, please see the information under "SIMOTION OPC
File Manager" (Page 27).

Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
20 Product Information, 05/2009
3.3.2 Parameterizing the data export
Overview
If more than one interface is available for the device, the data export requires the following
parameters:
Device
Protocol
Interface
Device
The "Device" selection field displays the device for which you must select the bus interface.
You must specify the interface settings for each device in the project. You must specify these
settings in this window for each device to be connected.
Protocol
The "Protocol" field allows you to make a selection between:
PROFIBUS
TCP/IP
PC INTERNAL (P350)
Interface
Note
The "Interface" selection dialog will be displayed if the SIMOTION device has more than one
interface, provided that they have been configured with different bus addresses.

Specify in the "Interface" selection field which interface is to be used to connect the OPC
Server on the HMI PC to the respective SIMOTION device at runtime.
Each symbol name must be uniquely assignable to a hardware address (bus address).
This assignment is carried out using the "Interface" selection. SIMOTION SCOUT
recognizes the communications interface and offers the following selection for SIMOTION
C230-2, for example:
Select X8 if the interface X8 on the device is being used.
Select X9 if the interface X9 on the device is being used.

DANGER

If the interface is parameterized for isochronous bus cycle, then it must not be used for
an OPC Client.

Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 21
3.3.3 Exporting "OPC_DATA" (symbol file)
Notes
The export of "OPC Data" may take some time.
However, you have the possibility to shorten the data export time by deselecting "Arrays with
individual elements" (if this option has not been selected, only the first address of the array
will be exported).

Note
OPC data export will only be possible if
SIMATIC NET software has been installed for the engineering PC/PG (only applicable to
versions prior to SIMOTION SCOUT Version V3.2)
a project is open and
SIMOTION SCOUT is in OFFLINE mode.



Note
With an array of data type "String", the array is always exported with single elements.
Deselection of the "Arrays with individual elements" field is only possible for this data type.
As a string variable is itself already an array, only the individual elements can be exported for
addressing reasons.

3.3.4 Exporting "OPC Alarm/Event"
Notes
Note
No user-defined diagnostics buffer contents are exported with "OPC Alarm/Event", but only
the specific SIMOTION diagnostics buffer contents. OPC can access these exported text
items.

Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
22 Product Information, 05/2009
3.3.5 Routing configuration with SIMOTION SCOUT
Introduction
If you have configured several networks with NetPro and wish to access a SIMOTION device
via a router to a SIMATIC OPC Server, you have to reconfigure this router once more in a
dialog after file export in SIMOTION SCOUT.
Configuring a router
The "Configure Router" dialog displays the following:
All configured networks
All SIMOTION devices contained in the project
First select a location of the OPC Server and then the first router for each node to be
addressed via the OPC Server.
The following diagram illustrates a routing configuration.
Subnet 1
Ethernet
Subnet 2
PROFIBUS
HMI
C230-2
P350
Configured
networks
Configured
devices
Network gateway
(router)
X102 address: 2
IP address: 169.254.11.22
SIMOTION device
to be addressed
OPC server
X8 address: 5

Figure 3-1 Sample configuration for routing
Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 23
Network configuration for SIMOTION P350
With SIMOTION P350, you already require the network configuration if you want the OPC
Server on the P350 device to access both the runtime in the P350 device itself and another
SIMOTION device which has been networked via PROFIBUS.
(The reason is that there is an internal "network transition point" or "router" between the OPC
Server under Windows XP and the SIMOTION P350 Runtime. Runtime P350 addresses the
PROFIBUS interface.)
In this case, you need the P350 as a router; see the figure below.
Subnet 1
PROFIBUS
C230-2
P350
Configured
network
Configured
devices
Network gateway
(router)
SIMOTION device
to be addressed
OPC server
X102
X9
SIMOTION RT
HMI

Figure 3-2 Example with P350
Network configuration for SIMOTION D4x5
With SIMOTION D4x5 the integrated drive is defined as a separate device.
Create a routed connection for this integrated drive as part of the network configuration.
Several projects internetworked
Note
If there are several internetworked projects, please note the following description.

To communicate with the SIMOTION devices in a network interconnection through several
projects, the SIMATIC NET OPC Server must be forwarded the following files and items of
information:
"OPC Alarm/Event" files, which may originate from several SIMOTION SCOUT projects
Time zones
Router
An auxiliary program, "SIMOTION OPC File Manager", enables you to configure these data
for the SIMATIC NET OPC Server. This user program is described under "SIMOTION OPC
file manager."
Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
24 Product Information, 05/2009
3.3.6 Variables for consistency check
Introduction
When OPC data are exported from SIMOTION SCOUT, a consistency value is also passed
on.
The OPC Client can use this value to check whether this value agrees with the consistency
value saved in the SIMOTION device.
Variables for consistency check
To determine the consistency status in relation to a SIMOTION device, the server provides
the following variables:
&stateconsistence()
&stateconsistenceval()
Table 3- 4 Variables for consistency check
&stateconsistence() &stateconsistenceval() Meaning
NOTCONFIGURED 0 No consistency value has been stored in the
XML file.
NOTAVAILABLE 1 Consistency check not (yet) performed due
to an interrupt, for example.
"CONSISTENCY" 2 After completing the check: Consistent
configuration.
INCONSISTENT 3 After completing the check: Inconsistent
configuration.
IGNORE 4 After completing the check:
Controller has no consistency value.
During the transmission of the XML project
data, the checkbox "Activate HMI
consistency check" in the Options->Settings-
>Download menu was deactivated in
SIMOTION SCOUT.


Note
The OPC Server can only access the consistency status when a connection to the target
device has been established. A connection has been successfully established if at least one
variable is read by the device.
If no connection could be established, "NOTAVAILABLE" is indicated in the status display.

Communication and Handling
3.3 OPC data export during the design stage
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 25
Example for programming variables in Visual Basic
In Visual Basic, the syntax for variable names for an OPC Client is as follows:
S7:[<devicename>]&stateconsistency()
S7:[<devicename>]&stateconsistencyval()
The device name (<devicename>) corresponds to the name of the SIMOTION device as
defined in the SIMOTION SCOUT configuration:
e.g.: "S7:[C230_2]&stateconsistency()"
The syntax for variable names of the test software OPC SCOUT (included in the SIMATIC
NET scope of delivery, detailed information can be found in the SIMATIC NET
documentation) is described as an example below.
In OPC SCOUT, both variables must be entered in a group with Add item (e.g.:
S7:[C230_2]&stateconsistency()).
They can then be monitored.
You will find the OPC SCOUT (SIMATIC NET) in the start menu under SIMATIC->Simatic
NET->PROFIBUS->Softnet PROFIBUS->OPC Scout.
Communication and Handling
3.4 Data transfer to the OPC Client
SIMATIC NET (XP) for SIMOTION
26 Product Information, 05/2009
3.4 Data transfer to the OPC Client
Notes
Once you have exported the data, you must transfer/copy it to the HMI PC (OPC client).
The file in the HMI PC has to be located in the following directory:
"<Installation directory for data>\opc2\bins7\simotion\xml"

Note
During commissioning, you must make sure that OPC data transmission is disabled on the
active OPC client.

Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 27
3.5 SIMOTION OPC File Manager (V6.2 or higher)
Introduction
The SIMATIC NET OPC server can be used to monitor SIMOTION devices from multiple
SIMOTION projects.
During an export, a symbol file and a file named OPC_AE.xml is generated for each
SIMOTION project.
The OPC server can handle several symbol files generated for the files exported from
SIMOTION projects, but only one OPC_AE.xml file.
The SIMOTION OPC File Manager closes this gap by combining the exported OPC_AE.xml
files from multiple SIMOTION projects in a single file.
SIMOTION OPC File Manager
The SIMOTION OPC File Manager is an auxiliary program which offers the following
functionality:
File selection (selection of the *.xml files to be merged)
Time zone definition
Routing definition
The SIMOTION OPC File Manager prepares the network information related to multiple
SIMOTION projects in a way that they can be processed together by the SIMATIC NET OPC
server.
Delivery and program call
SIMOTION OPC File Manager is delivered as a component of SIMATIC NET.
The program is called from the start menu under Simatic-> SimaticNet ->Simotion OPC File
Manager.

Figure 3-3 SIMOTION OPC File Manager
Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
28 Product Information, 05/2009

Note
The software contains open source code with the following copyright "Portions copyright (c)
Chris Maunder, 1998".

File selection
SIMOTION OPC File Manager generates from n number of OPC_AE*.xml source files
(created during OPC export in SIMOTION SCOUT from several SIMOTION SCOUT
projects) a common parameter file and supplements it in places where ambiguities might
occur (the respective projects contain the same alarm numbers which wouldn't be doubled in
the database) with the information from which project the data originates.
If the project contains data which exclude each other, an error message is displayed in the
errors area. Switchover to different screens and a generation of the target file will then be
inhibited.
The following screen form represents the file selection in the SIMOTION OPC File Manager:


Figure 3-4 File selection
See also
Storage paths for export files (Page 14)
Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 29
3.5.1 Fundamental description of an application
Example
Multiple SIMOTION projects have been created for one modular machine. A single PC is to
be used for monitoring purposes.
Procedure
Carry out the following steps:
1. Run an OPC export for each SIMOTION project involved and export the data to various
directories.
2. Start the SIMOTION OPC File Manager.
3. On the "Select Files" screen, mark all generated OPC_AE*.xml files as source files ("add"
button).
4. If necessary, enter time zones and routing information.
5. Select "Create output file" to generate the combined OPC_AE.xml.
Step 1 is completed on the engineering PC/PG. Steps 2 to 5 can be completed either on the
engineering PC/PG or on the HMI PC.

Note
If you are working solely on the engineering PC/PG, the XML file generated for the OPC
client must be copied to the correct directory, i.e.:
"<Installation directory for data>\opc2\bins7\simotion\xml".

Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
30 Product Information, 05/2009
3.5.2 Time zone definition
The time when an alarm is issued will be transmitted without a reference system in
SIMOTION RT. The OPC Standard however defines that times will always be transmitted as
UTC times. Besides the time, they also contain a time zone indication. The OPC server sets
GMT as standard.
Time zone definition
In the "Time zone definition" dialog, a deviation from GMT can be defined for each CPU.

Figure 3-5 Time zones
Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 31
3.5.3 Routing definition
With the help of the SIMATIC NET OPC Server, an OPC Client can communicate with
several SIMOTION devices across different networks. Routing for the projects involved is
configured accordingly with the SIMOTION OPC File Manager.
Requirements
A pre-requisite for "introducing" the projects involved is:
Communication between the SIMOTION devices themselves must have been configured
with NetPro in SIMOTION SCOUT.

Note
The router can also be configured in SIMOTION SCOUT. This procedure is described under
"Routing with SIMOTION SCOUT."

WARNING
Routing must be reconfigured with the SIMOTION OPC File Manager for each added
project.

Optimal access times
To ensure optimal access times, data from/to the SIMOTION device may pass each bus
segment only once. The routing strategy of SIMATIC NET (one standard router per HMI PC)
may result in the problem that this standard router refers back to that segment from which
the request originates.
Once you have defined the bus segment in which you are going to operate the OPC Server,
you may set any other SIMOTION device in this bus segment as the first routing point per
SIMOTION device in order to define access to all devices, even under most unfavorable
configuration conditions.
Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
32 Product Information, 05/2009
Networking example
The following example illustrates networking of SIMOTION devices which communicate via
an OPC server:


Subnet 1
Subnet 2
HMI Configured
networks
Configured
devices
Network gateway
(router)
SIMOTION device
to be addressed
OPC server
CPU 1
Subnet 3
CPU 2
CPU 3
CPU 4
SIMOTION device
to be addressed
Network gateway
(router)

Figure 3-6 Example configuration
The OPC Server requires routers for communication. The following table demonstrates
routing in the configuration example:
Table 3- 5 Routing in the configuration example
OPC server subnet Network node/target device Router
CPU 1 Located in the same subnet
CPU 2 CPU 1
CPU 3 Located in the same subnet
Subnet 1
CPU 4 CPU 3
Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 33
"Routing definition" dialog
In the "Routing definition' dialog, you define the following:
Subnet in which the OPC Server is located
target devices to be addressed
Corresponding routing to be used to address the target device from the OPC Server

Figure 3-7 Routing definition
Communication and Handling
3.5 SIMOTION OPC File Manager (V6.2 or higher)
SIMATIC NET (XP) for SIMOTION
34 Product Information, 05/2009

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 35
System Features
4
4.1 System variables
Introduction
To obtain more precise information on the exported data, an XML export may be initiated in
SIMOTION SCOUT using the menu item Project->Save and Export.
This XML file can then be viewed using an XML capable browser (e.g. MS Internet Explorer
5 or Netscape 6.1).
The variables contained in this file are, amongst others, limit values and file types, and for
enums (enumerator data types) the defined values.

Note
To use these enums within an OPC Client environment, a descriptive file (idl file) is
generated during OPC data export via the menu item Options->OPC Data Export... in
addition to the symbols file.
A description of the limit values for SIMOTION system variables can be found in the
reference lists, named "SIMOTION Technology Package CAM System Variables".

Data types
The following data types are available in SIMOTION:
Table 4- 1 Data types
SIMOTION Bit width Sign
BOOL 1 bit -
BYTE/USINT 8 bits -
SINT 8 bits Yes
WORD/UINT 16 bits -
INT 16 bits Yes
DWORD/UDINT 32 bits -
DINT 32 bits Yes
REAL 32 bits Yes
LREAL 64 bits Yes
DATE 64 bits -
TOD (Time of Day) 32 bits no
DT (Date and Time) 64 bits -
TIME 32 bits Yes
System Features
4.1 System variables
SIMATIC NET (XP) for SIMOTION
36 Product Information, 05/2009
SIMOTION Bit width Sign
STRING 1 byte/character, max. length ->
254 characters

Array Note:
Only the data types listed here are valid for an "array".
Notes
Note
If ProTool/Pro CS is used as an OPC Client, this application will only accept variables in
INTEGER format as range pointers.

Note
To determine the consistency status in relation to a SIMOTION device, the server provides
the following variables:
&stateconsistence()
&stateconsistenceval()
See also "Variables for consistency check" (Page 24).

OPC data for SIMOTION
Note
The valid value range for variables of the type Date and DT is not maintained via OPC.
Values can be written to the variables that are outside of the valid value range.
The valid value range for Simotion and OPC is from 1992-01-01 to 2089-12-31.



System Features
4.2 OPC alarms and events for SIMOTION
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 37
4.2 OPC alarms and events for SIMOTION
Note
Note
A maximum of 40 Alarm_S are permitted for OPC alarms and events for SIMOTION:
If more than 40 different alarms of the Alarm_S category are triggered in rapid succession,
only the first 40 are transmitted.

System Features
4.3 Consistent data access
SIMATIC NET (XP) for SIMOTION
38 Product Information, 05/2009
4.3 Consistent data access
General
Access to a data item of a simple SIMOTION device data type is always consistent.
If you want to access several individual data items or arrays in the SIMOTION device (e.g.
positions of several axes), user support is required to ensure consistency.
The SIMOTION ST Programming Guide describes in a programming example, how the client
application (e.g. an HMI terminal) ensures consistent data access with the SIMOTION device
by means of mutual queries.

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 39
Tips
5
5.1 Programming tips
If you are using an OPC client, please note the following:
Arrays
If arrays are greater than a PDU (Protocol Data Unit) (currently always 480 bytes on all
SIMOTION HW platforms, of which 22 bytes are assigned to the header), we recommend
the following:
Message frames with a user data length greater than 458 bytes need to be split into two
or more message frames (e.g. in the case of 540 bytes, into 240 bytes and 300 bytes).
Use "group.syncRead()" once instead of "item.Read()" several times.
If the data changes within the space of two read access attempts to the PDUs in the array,
the array will be inconsistent.
Application solution:
See the SIMOTION ST Programming Manual, "Consistent data access with HMI devices".
Time for data transmission
If you are running a SIMOTION device with multiple OPC clients (user interfaces) on one
HMI PC, the data flow will be faster than with a single OPC client.
If, having completed one job, you are waiting for the next job to start based on a timer, you
will need to take account of a Windows-related delay of at least 10 to 15 ms.
Recommendation:
You should use "group.syncRead()" to read several arrays rather than sending multiple
individual read calls with "item.Read()".
Consistent data access
Access to a data item of an elementary data type in the SIMOTION device is always
consistent.
However, if you wish to access several single data items or arrays in the SIMOTION device
(e.g. positions of multiple axes), you will need user support to ensure consistency.
The SIMOTION ST Programming Manual uses a programming example to describe how the
client application (e.g. HMI device) ensures consistent data access by means of mutual data
querying with the SIMOTION device.
Tips
5.1 Programming tips
SIMATIC NET (XP) for SIMOTION
40 Product Information, 05/2009
Protocol
Activate only the "S7 protocol" on the OPC server and deactivate all other protocols (see
also "Configuring the OPC server/SIMOTION device interface at runtime" (Page 14)). In
other words, deactivate protocol multiplexers.
Tips
5.2 How can a new OPC configuration (OPC Data, OPC Alarm/Event) be initialized when an OPC Client is running?
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 41
5.2 How can a new OPC configuration (OPC Data, OPC Alarm/Event) be
initialized when an OPC Client is running?
Requirement
No fundamental changes must have been made to the configuration.
Example
An example application for no fundamental changes would be:
Within the SIMOTION SCOUT project you delete a variable which has not been declared to
the OPC client. Deleting the variable causes the address range to shift in the project.
Procedure
To activate the new OPC configuration by transferring/copying the new project data to the
OPC client (see also "Data transfer to the OPC client" (Page 26)), proceed as follows:
1. Start the file export (see also "Exporting OPC data during the design stage" (Page 14)).

NOTICE

For this export, the target directory must not be the SIMATIC NET installation directory
on the HMI PC. (This is because these files are opened exclusively by the OPC server
when it is running.)



Note
If you have a number of SIMOTION SCOUT configurations for various
machines/installations, and these function independently with the task of accessing all
devices from a single user interface (their remit might also include routing), you should
combine these exported files subsequently with the OPC File Manager (see "SIMOTION
OPC File Manager" (Page 27)).

2. Make the following entry in the "Registry" section of the "sopcsrvr.ini" file (<Installation
directory for SIMATIC NET>\SIMATIC.net\opc2\bin):

[Registry]
AllowServerStart=0

Tips
5.2 How can a new OPC configuration (OPC Data, OPC Alarm/Event) be initialized when an OPC Client is
running?
SIMATIC NET (XP) for SIMOTION
42 Product Information, 05/2009
3. Stop the OPC server. You can do this in several ways:
You can quit all clients so that the OPC server stops and you copy the new project
data to the OPC client.
Comment: The in-process DP OPC server cannot be stopped in the "Configuration
Console" under "Applications->OPC Settings->Quit OPC Server->Stop".
(This server is activated the first time an OPC client accesses data.)
To stop the OPC server even if the OPC client is running, proceed as follows:
Set the "ForceShutdown" entry in the Windows registry on the HMI PC to the value
"1".
The entry is located in the following directory:
MyComputer\HKEY_LOCAL_Machine\SOFTWARE\Siemens\SIMATIC\OPC
\SimaticNET.
The OPC client is informed of the quitting of the OPC server via the shutdown
mechanism and will have to subsequently (see Step 6) reconnect and reinitialize.



Note
See the "Application example" in the Visual Basic program.

4. Transfer/copy the files exported under Step 1 to the OPC client (target hardware), to the
following directory:
"<Installation folder for SIMATIC NET>\SIMATIC.net\opc2\bins7\simotion\xml".
5. Reset the "AllowServerStart" entry in the "sopcsrvr.ini" file (<Installation directory for
data>\opc2\bin) to "1" or delete the line with "AllowServerStart".

[Registry]
AllowServerStart=1

6. The OPC server will restart with the updated symbols as soon as the OPC client
reconnects to the OPC server.



Note
It will not be possible to start the OPC server if the "AllowServerStart" entry is set to "0".
This value could be set, for example, due to a process for activating a new OPC
configuration failing or the Windows operating system being shut down in the meantime.
Therefore, we recommend setting this value to "1" when Windows ramps up (see Step 2)
or deleting the line in the "sopcsrvr.ini" file on ramp-up.

Tips
5.3 OPC communication to SIMOTION and SIMATIC S7 controller via PROFIBUS
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 43
5.3 OPC communication to SIMOTION and SIMATIC S7 controller via
PROFIBUS
Requirements
If OPC communication to SIMOTION and SIMATIC S7 controllers via PROFIBUS is to be
performed, the following are required:
Requirements and settings for the OPC communication with SIMOTION:
The controllers are on the same PROFIBUS line.
The configuration in SIMOTION SCOUT has been loaded to the controller via
PROFIBUS.
An OPC export has been performed for the configuration.
The symbol file OPC_DATA (see the note under "File name extension" (Page 14) has
been entered in SIMATIC NET "Set PC station" and the access point CP_SM_1 has
been set to PROFIBUS/CP5611.
Additional requirements and settings for the OPC communication with S7:
The S7 configuration has been loaded to the controller via PROFIBUS.
In SIMATIC NET "Set PC Station", the module operating mode must be set to
"Configured mode" under Modules CP5611 - General (see following figure).

Figure 5-1 Configured mode
A PC station from the HW catalog must be inserted in NetPro.
Tips
5.3 OPC communication to SIMOTION and SIMATIC S7 controller via PROFIBUS
SIMATIC NET (XP) for SIMOTION
44 Product Information, 05/2009
In the HW Config, an OPC server must be inserted in the PC station at Index 1 and a
CP5611 PROFIBUS card must be inserted at Index 2 from the HW catalog (see
following figure).

Figure 5-2 HW catalog
After Save and compile, the PC station must be loaded to the Station Configuration
Editor via the PG/PC interface "PC internal" (see following figure).

In SIMATIC NET "Set PC Station", the access point CP_L2_1 must be set to "PC
internal".
Tips
5.3 OPC communication to SIMOTION and SIMATIC S7 controller via PROFIBUS
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 45
In NetPro, an S7 connection must be created for the OPC server in the PC station
(see following figure).

Figure 5-3 NetPro



Note
Further information on the configuration of an OPC S7 connection, can be found under
SIMATIC NET "Set PC Station" - SIMATIC NET Configuration: Example: "OPC S7
PROFIBUS"


Tips
5.4 OPC via PROFINET
SIMATIC NET (XP) for SIMOTION
46 Product Information, 05/2009
5.4 OPC via PROFINET
Introduction
This section describes the fundamentals for OPC communication via PROFINET. The
relevant C230/D4x/P350 manuals describe what must be taken into account for a
PROFINET configuration.
Fundamentals
This connection is used for the OPC communication via PROFINET in order to establish an
OPC connection via TCP/IP. The same protocols are used as for OPC via Ethernet.
This does not effect the other communication via PROFINET between SIMOTION controllers
and drives.
The OPC export with the routing and the access points is equivalent to Ethernet / TCP/IP.
It is possible to directly access a P350 with MCI-PN board or a D4x with CBE30 card from a
PG/PC with Ethernet connection via a PROFINET cable.
The OPC routing between PROFIBUS and PROFINET functions from one network to the
other.
The following figure represents a possible connection of the HMI PC via PROFINET.
CBE20
CU320
CBE30
D435
PROFlNET
HMl-PC

Figure 5-4 PROFINET
Tips
5.5 More tips
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 47
5.5 More tips
How do I create an OPC Server in HW Config?
How to create an OPC Server in HW Config is described in the SIMATIC NET
documentation on the "SIMATIC NET PC/Software CD 11/2003, electronic documentation"
CD-ROM.
If you use an OPC Server for SIMOTION P350, please follow the descriptions in the
SIMOTION P350 manual.
How do I operate the OPC SCOUT?
Among other things, the OPC SCOUT supports connection tests for the OPC client->OPC
server->SIMOTION RT connection and programming of an OPC Client.
You may create one or more groups from an OPC Client via the OPC Server. You may
choose any name.
In these groups, you can create one or more items. These items directly correspond to the
variable names in the SIMOTION SCOUT project.
A group can be switched active or inactive.
Active means that the OPC server scans the variables in the
SIMOTION SCOUT in a time base and places them in the cache.
"Inactive" means the OPC Client reads the variables directly from the SIMOTION device.

Note
The reason for bad quality in an item can be:
HMI consistency flag set in SIMOTION RT
Wrong project/wrong OPC configuration loaded
Item name misspelling
No connection to SIMOTION RT available

OPC communication with SIMOTION modules
Note
A SIMATIC PC station may not be used for OPC communication with SIMOTION modules
only. The reason is that the configuration for OPC communication with SIMOTION is
significantly different than that with SIMATIC modules. The procedure for mixed operation is
described in "OPC communication with SIMOTION and SIMATIC S7 controller via
PROFIBUS" (Page 43).

Tips
5.5 More tips
SIMATIC NET (XP) for SIMOTION
48 Product Information, 05/2009
Maximum permissible number of PG/PC connections via Ethernet/PROFINET
It is possible to go ONLINE to 10 PROFINET nodes simultaneously with SIMOTION SCOUT.
The STEP 7 standard package supports a maximum of 10 simultaneous ONLINE
connections via Ethernet.
As SIMOTION SCOUT uses the STEP 7 standard package drivers to go ONLINE, this
number also applies here.
If SIMATIC NET is installed in addition to SCOUT, it is possible to establish connections to
more than 10 nodes, as SIMATIC NET uses its own drivers that do not have this restriction.
Tips
5.6 Comparison of SIMOTION IT OPC XML-DA/SIMATIC NET for SIMOTION
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 49
5.6 Comparison of SIMOTION IT OPC XML-DA/SIMATIC NET for
SIMOTION
Overview
In addition to SIMATIC NET for SIMOTION, there is another product,
SIMOTION IT OPC XML-DA. This package also enables you to access data and monitor
operating states of the SIMOTION device via Ethernet.
The following table compares the two packages and describes the basic procedures:
Table 5- 1 Basic procedure for accessing data
SIMOTION IT OPC XMLDA SIMATIC NET for SIMOTION
No configuration (OPC export) with SCOUT
required. Program variable can be activated via a
switch.
OPC export with SIMOTION SCOUT required,
which has to be repeated for every project
change.
Symbols are interpreted in the SIMOTION device;
communication in text format (XML).
Symbols are interpreted during OPC export and
stored in the OPC server on the Windows system
in a binary form; binary communication -> higher
data throughput.
At present only SIMOTION with OPC XML DA.
Access to S7 devices not possible at present.
Simultaneous access to SIMOTION and S7
devices.
Client can run on any operating system. Based on Windows COM/DCOM technology;
client and server can only run on Windows
operating systems.
Communication with standard protocols (TCP/IP,
XML, SOAP), no manufacturer-specific
(SIEMENS) tools, drivers required on the client
system.
S7 protocol used for communication, appropriate
manufacturer-specific drivers required on the
client.
Communication only possible via Ethernet. Communication via PROFIBUS/MPI and Ethernet
is possible.
Direct addressing via firewalls is possible. Generally, DCOM communication not released
for firewalls.
Tips
5.7 Example of an application
SIMATIC NET (XP) for SIMOTION
50 Product Information, 05/2009
5.7 Example of an application
Example
Note
This section describes a short example of an OPC client application.
The examples for SIMATIC NET can be found in the "SIMATIC.net\opc2\samples" directory.

An OPC client connected to an OPC server is to execute the following tasks:
1. Respond to a OPC server quitting
2. Instantiate the OPC server
3. Restore the connection to the OPC server (see "How is a new OPC configuration enabled
when an OPC client is operating?" (Page 41))
Visual Basic program
The following Visual Basic program contains these steps:

Option Expicit
Option Base 0

Const NUM_OF_ITEMS As Long = 3

Dim WithEvents myOPCserver As OPCServer
Attribute myOPCserver.VB_VarHelpID = -1
Dim WithEvents myOPCgroup As OPCGroup
Attribute myOPCgroup.VB_VarHelpID = -1
Dim myOPCitem1 As OPCItem
Dim myOPCitem2 As OPCItem
Dim myOPCitem3 As OPCItem

Dim readData As Variant
Dim writeData(0 To 255) As Integer
Dim writeDataDINT As Long

Dim ItemIDs(NUM_OF_ITEMS) As String
Dim ClientHandles(NUM_OF_ITEMS) As Long
Dim ServerHandles(NUM_OF_ITEMS) As Long
Dim Values() As Variant
Dim Errors() As Long
Dim ErrorString As String

called at program start
Private Sub Form_Load()

Call Init
End Sub

Tips
5.7 Example of an application
SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 51
called at program end
Private Sub Form_Unload(Cancel As Integer)

Call Destroy
End Sub

called after connection loss or access fault
Private Sub TimerInit_Timer()

TimerInit.Enabled = False disable timer
Call Destroy
Call Init
End Sub

called at OPC server shutdown
Private Sub myOPCserver_ServerShutDown(ByVal Reason As String)

Debug.Print Now & " server shutdown"
TimerInit.Interval = 10000 try to reconnect after 10 seconds
TimerInit.Enabled = True
End Sub

initialize OPC connection
Private Sub Init()


On Error GoTo InitError


Set myOPCserver = New OPCServer server
myOPCserver.Connect ("OPC.SimaticNET")
Set myOPCgroup = myOPCserver.OPCGroups.Add("Test") group
With myOPCgroup

.IsActive = False read synchronous from device
.IsSubscribed = False read synchronous from device
synchronous
With myOPCgroup.OPCItems

Set myOPCitem1 = .AddItem("P350.VARIABLE.db1", 1)
Set myOPCitem2 = .AddItem("P350.ST_1.array1", 1)
Set myOPCitem3 = .AddItem("P350.ST_1.dint1", 1)

End With

End With
ServerHandles(0) = myOPCitem1.ServerHandle
ServerHandles(1) = myOPCitem2.ServerHandle
ServerHandles(2) = myOPCitem3.ServerHandle
Debug.Print Now & " server connected"
Timer1.Interval = 500 poll data every 500ms
Timer1.Enabled = True poll data


Exit Sub
InitError:

MsgBox "Error connecting OPC server: " & Err.Number & " " &
Err.Description

End Sub

Tips
5.7 Example of an application
SIMATIC NET (XP) for SIMOTION
52 Product Information, 05/2009

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 53
Notes on the Online Help and Documentation
6

Overview
Table 6- 1 Online help and documentation
What to do? Names Content
SIMOTION SCOUT
Online Help
Is part of the SIMOTION SCOUT
software
Provides help for the user interface
SIMOTION System Overview Overview of the product family
SIMOTION SCOUT, Operator's
Guide
Describes the SIMOTION SCOUT
engineering system, i.e. details on the
installation and Workbench
SIMOTION MCC, Programming
Guide
Describes the graphics-based
SIMOTION programming language
Motion Control Chart
SIMOTION ST, Programming
Guide
Describes the text-based SIMOTION
programming language Structured
Text
SIMOTION LAD/FBD,
Programming Manual
Describes the programming language
LAD/FBD
SIMOTION C230-2, Manual Describes the hardware and
commissioning
SIMOTION Technology Functions
of Motion Control (divided in
several manuals and lists of
references)
Describes the effects of technology
objects for Motion Control and
contains reference lists for system
variables and functions
SIMOTION Function Blocks,
Manual
Supplement for the CP and FM
modules
SIMOTION P350, Manual Describes hardware, software and
installation
Entire documentation
on the SIMOTION
software installation
DVD
SIMOTION D4x5, Manual Describes hardware, software and
installation
All documents on
documentation CD
"SIMATIC NET Manual
Collection"
"SIMATIC NET Manual Collection" Amongst other subject items, details of
the installation, OPC interface, OPC
Server


Note
A detailed breakdown of the documentation for SIMOTION can be found in the SIMOTION
"References" manual.


Notes on the Online Help and Documentation

SIMATIC NET (XP) for SIMOTION
54 Product Information, 05/2009

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 55
Service and support
A
A.1 Service and support
Additional information
Sources of additional information about the products described in the manual are listed
under "Contact" in the following table:

Requirement Contact
Representatives and
sales offices
http://www.siemens.com/automation/partner
Additional technical
documentation
http://www.automation.siemens.com/portal/index.htm
Training center http://www.sitrain.automation.siemens.com/sitrain/
Technical support http://www.support.automation.siemens.com
Online support
request form
http://www.siemens.com/automation/support-request
Service http://www.siemens.com/automation/service

Service and support
A.1 Service and support
SIMATIC NET (XP) for SIMOTION
56 Product Information, 05/2009

SIMATIC NET (XP) for SIMOTION
Product Information, 05/2009 57
Index
A
access times, 31
Arrays, 39
C
C230-2/D4x5 configuration, 16
Communication and Handling, 13
Consistency status, 24
Consistent data access, 38, 39
Creating a user program, 39
D
Data types, 35
Design stage, 6
Device, 19
F
File name extension, 14
ForceShutdown, 42
I
Installation directory for data, 14
Interface, 20
O
OPC alarm/event, 18
OPC SCOUT, 47
OPC server
Create in HW Config, 47
Instantiating, 50
Quitting, 50
Restoring a connection, 50
Starting, 42
Stopping, 42
OPC_AE.xml, 18
OPC_DATA, 18
P
P350 configuration, 17
PDU, 39
Protocol, 20, 40
Q
Quality Bad, 47
Quitting OPC clients, 42
R
Router configuration, 19, 21, 22
Routing, 21
runtime, 8
S
SIMATIC NET, 5
SIMOTION Kernel, 5
SIMOTION OPC File Manager, 27
Delivery and program call, 27
Description of an application in principle, 29
File selection, 28
Routing definition, 31, 33
Time zone definition, 29
SIMOTION SCOUT, 5
Storage paths, 14
Symbol file OPC_DATA, 14
System variables, 35
T
Time for data transmission, 39

Vous aimerez peut-être aussi