0% found this document useful (0 votes)
13 views54 pages

Eio0000003723 01

The OPC DA User Guide provides essential information on the installation, configuration, and troubleshooting of the OPC DA server, which facilitates data access between clients and controllers in automation systems. It emphasizes safety precautions and the necessity for qualified personnel to handle the equipment, while also detailing the technical standards and terminology relevant to the OPC server technology. The guide includes various sections such as safety information, general information on OPC DA, installation procedures, and troubleshooting FAQs to assist users effectively.

Uploaded by

galot12971
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views54 pages

Eio0000003723 01

The OPC DA User Guide provides essential information on the installation, configuration, and troubleshooting of the OPC DA server, which facilitates data access between clients and controllers in automation systems. It emphasizes safety precautions and the necessity for qualified personnel to handle the equipment, while also detailing the technical standards and terminology relevant to the OPC server technology. The guide includes various sections such as safety information, general information on OPC DA, installation procedures, and troubleshooting FAQs to assist users effectively.

Uploaded by

galot12971
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 54

OPC DA

User Guide

EIO0000003723.01
03/2021

www.se.com
Legal Information
The Schneider Electric brand and any trademarks of Schneider Electric SE and its
subsidiaries referred to in this guide are the property of Schneider Electric SE or its
subsidiaries. All other brands may be trademarks of their respective owners.
This guide and its content are protected under applicable copyright laws and
furnished for informational use only. No part of this guide may be reproduced or
transmitted in any form or by any means (electronic, mechanical, photocopying,
recording, or otherwise), for any purpose, without the prior written permission of
Schneider Electric.
Schneider Electric does not grant any right or license for commercial use of the guide
or its content, except for a non-exclusive and personal license to consult it on an "as
is" basis. Schneider Electric products and equipment should be installed, operated,
serviced, and maintained only by qualified personnel.
As standards, specifications, and designs change from time to time, information
contained in this guide may be subject to change without notice.
To the extent permitted by applicable law, no responsibility or liability is assumed by
Schneider Electric and its subsidiaries for any errors or omissions in the informational
content of this material or consequences arising out of or resulting from the use of the
information contained herein.
Table of Contents
Safety Information ......................................................................................5
About the Book...........................................................................................6
General Information on OPC DA ..................................................................9
General Information ..............................................................................9
Installing the OPC Server .......................................................................... 11
Installing the OPC Server .................................................................... 11
EcoStruxure Machine Expert Logic Builder Configuration ............................12
Declaring a Variable to Be Used With OPC ...........................................12
OPC Server Configuration.........................................................................14
General Information on the OPC Configuration Tool...............................14
OPC Server Configuration of EcoStruxure Machine Expert
Controllers with the OPC Configuration Tool..........................................17
Establishing a Connection to the OPC Server .............................................22
Establishing a Connection to the OPC Server .......................................22
Groups and Items..............................................................................22
Appendices ................................................................................................25
OPCServer.ini File ....................................................................................26
OPC Server Configuration via OPCServer.ini ........................................26
OPCServer.ini - General Information...............................................26
OPCServer.ini - Server Area ..........................................................26
OPCServer.ini - Controllers Area ....................................................27
Configuration Options According to the Interface.........................................30
Configuration Options According to the Interface ...................................30
Communication in Distributed Systems ......................................................32
Connections to the OPC Server Running on Another Computer..............32
Specific Information for PacDrive M Controllers ..........................................33
Creating a Project and Starting (PacDrive M) ........................................33
Creating a Project and Starting (PacDrive M)...................................33
Symbol File Configuration (PacDrive M) ...............................................33
Configuring Symbol File (PacDrive M) - General Information ............33
Individual Symbol Configuration with Pragma Instruction..................34
Hide PLC Configuration Parameters ...............................................34
Data Objects and Items Offered by the OPC Server .........................35
Additional Information on the Symbol File (PacDrive M) .........................35
When is a Symbol File Created?.....................................................35
Where are the Symbol Files Stored?...............................................36
Best Practices...............................................................................37
Troubleshooting and FAQ..........................................................................38
Checklist ............................................................................................38
Checklist for Establishing a Connection to a Controller .....................38
Detected Errors and Possible Solutions ................................................39
Issue: Message Function CoCreateInstanceEx failed is
Displayed .....................................................................................39
Issue: Items Are Not Available in the OPC Client .............................40
Issue: ProgID not Displayed in the Browser Window of the
Client ...........................................................................................41
Issue: Message IOPCServer Interface not Found or Class
not Registered is Displayed ......................................................41

EIO0000003723.01 3
Issue: OPC Client Displays the Status OPC_NOCONFIG....................42
Issue: Slow Update of Values of the Items in the Client.....................42
Issue: Error Message Quality BAD is Displayed When Reading
Items............................................................................................42
Issue: Error Message No Gateway with These Settings
Found is Displayed .......................................................................43
Issue: No Gateway Server Icon in the Notification Area and No
Connection to the Controller...........................................................44
Issue: Error Message CoDeSysOPC.exe - Entry Point not
Found Is Displayed .......................................................................44
Issue: Random Access Memory Demand of the OPC Server
Increases with Increasing Runtime up to the System Limit................44
Issue: Free Hard Disk Space of the OPC Server Decreases with
Increasing Runtime and the Visualization Computer is Becoming
Very Slow .....................................................................................45
Issue: Message Server is busy is Displayed ...............................45
Issue: Long Reconnection Time Between Visualization and
Controller .....................................................................................46
Issue: Reading and Writing to Controller in Multi-PLC
Configuration in Constant Intervals Delayed ....................................46
Errors Sporadically Detected..........................................................47
Log File - General Information..............................................................49
Log File - General Information ........................................................49
Glossary .....................................................................................................51
Index ...........................................................................................................53

4 EIO0000003723.01
Safety Information

Safety Information
Important Information
Read these instructions carefully, and look at the equipment to become familiar
with the device before trying to install, operate, service, or maintain it. The
following special messages may appear throughout this documentation or on the
equipment to warn of potential hazards or to call attention to information that
clarifies or simplifies a procedure.

The addition of this symbol to a “Danger” or “Warning” safety label indicates that an
electrical hazard exists which will result in personal injury if the instructions are not
followed.

This is the safety alert symbol. It is used to alert you to potential personal injury
hazards. Obey all safety messages that follow this symbol to avoid possible injury or
death.

! DANGER
DANGER indicates a hazardous situation which, if not avoided, will result in death or serious
injury.

! WARNING
WARNING indicates a hazardous situation which, if not avoided, could result in death or
serious injury.

! CAUTION
CAUTION indicates a hazardous situation which, if not avoided, could result in minor or
moderate injury.

NOTICE
NOTICE is used to address practices not related to physical injury.

Please Note
Electrical equipment should be installed, operated, serviced, and maintained only
by qualified personnel. No responsibility is assumed by Schneider Electric for any
consequences arising out of the use of this material.
A qualified person is one who has skills and knowledge related to the construction
and operation of electrical equipment and its installation, and has received safety
training to recognize and avoid the hazards involved.

EIO0000003723.01 5
About the Book

About the Book


Document Scope
This document provides general information about the OPC DA server. It lists the
configuration steps that are required in the different software tools to start the
OPC DA server automatically whenever a connection between the OPC DA client
(for example, a visualization) and the controller is established in order to provide
the variable values of the controller to the OPC DA client.
The information provided in this user guide is dedicated to persons experienced in
OPC server technology.
The file OPC_V3_how_to_use_E.pdf , that is automatically installed with
EcoStruxure Machine Expert in the directory C:\Program Files\Schneider Electric
\EcoStruxure Machine Expert\Tools\OPCServer provides a more detailed
description of how to configure the OPC server.

Validity Note
This document has been updated for the release of EcoStruxureTM Machine
Expert V2.0.

Related Documents
Title of Documentation Reference Number
EcoStruxure Machine Expert Programming EIO0000002854 (ENG);
Guide
EIO0000002855 (FRE);

EIO0000002856 (GER);

EIO0000002857 (ITA);

EIO0000002858 (SPA);

EIO0000002859 (CHS);

You can download these technical publications and other technical information
from our website at www.se.com/ww/en/download/ .

6 EIO0000003723.01
About the Book

Product Related Information

WARNING
LOSS OF CONTROL
• The designer of any control scheme must consider the potential failure
modes of control paths and, for certain critical control functions, provide a
means to achieve a safe state during and after a path failure. Examples of
critical control functions are emergency stop and overtravel stop, power
outage and restart.
• Separate or redundant control paths must be provided for critical control
functions.
• System control paths may include communication links. Consideration must
be given to the implications of unanticipated transmission delays or failures
of the link.
• Observe all accident prevention regulations and local safety guidelines.1
• Each implementation of this equipment must be individually and thoroughly
tested for proper operation before being placed into service.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

1 For additional information, refer to NEMA ICS 1.1 (latest edition), "Safety
Guidelines for the Application, Installation, and Maintenance of Solid State
Control" and to NEMA ICS 7.1 (latest edition), "Safety Standards for Construction
and Guide for Selection, Installation and Operation of Adjustable-Speed Drive
Systems" or their equivalent governing your particular location.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Only use software approved by Schneider Electric for use with this
equipment.
• Update your application program every time you change the physical
hardware configuration.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

Terminology Derived from Standards


The technical terms, terminology, symbols and the corresponding descriptions in
this manual, or that appear in or on the products themselves, are generally
derived from the terms or definitions of international standards.
In the area of functional safety systems, drives and general automation, this may
include, but is not limited to, terms such as safety, safety function, safe state, fault,
fault reset, malfunction, failure, error, error message, dangerous, etc.
Among others, these standards include:

Standard Description

IEC 61131-2:2007 Programmable controllers, part 2: Equipment requirements and tests.

ISO 13849-1:2015 Safety of machinery: Safety related parts of control systems.

General principles for design.

EN 61496-1:2013 Safety of machinery: Electro-sensitive protective equipment.

Part 1: General requirements and tests.

ISO 12100:2010 Safety of machinery - General principles for design - Risk assessment
and risk reduction

EIO0000003723.01 7
About the Book

Standard Description

EN 60204-1:2006 Safety of machinery - Electrical equipment of machines - Part 1: General


requirements

ISO 14119:2013 Safety of machinery - Interlocking devices associated with guards -


Principles for design and selection

ISO 13850:2015 Safety of machinery - Emergency stop - Principles for design

IEC 62061:2015 Safety of machinery - Functional safety of safety-related electrical,


electronic, and electronic programmable control systems

IEC 61508-1:2010 Functional safety of electrical/electronic/programmable electronic safety-


related systems: General requirements.

IEC 61508-2:2010 Functional safety of electrical/electronic/programmable electronic safety-


related systems: Requirements for electrical/electronic/programmable
electronic safety-related systems.

IEC 61508-3:2010 Functional safety of electrical/electronic/programmable electronic safety-


related systems: Software requirements.

IEC 61784-3:2016 Industrial communication networks - Profiles - Part 3: Functional safety


fieldbuses - General rules and profile definitions.

2006/42/EC Machinery Directive

2014/30/EU Electromagnetic Compatibility Directive

2014/35/EU Low Voltage Directive

In addition, terms used in the present document may tangentially be used as they
are derived from other standards such as:

Standard Description

IEC 60034 series Rotating electrical machines

IEC 61800 series Adjustable speed electrical power drive systems

IEC 61158 series Digital data communications for measurement and control – Fieldbus for
use in industrial control systems

Finally, the term zone of operation may be used in conjunction with the description
of specific hazards, and is defined as it is for a hazard zone or danger zone in the
Machinery Directive (2006/42/EC) and ISO 12100:2010.
NOTE: The aforementioned standards may or may not apply to the specific
products cited in the present documentation. For more information concerning
the individual standards applicable to the products described herein, see the
characteristics tables for those product references.

8 EIO0000003723.01
General Information on OPC DA

General Information on OPC DA


General Information
What is OPC DA?
OPC DA (Open Platform Communications Data Access) is a standardized
interface for access to process data. It is based on the Microsoft standard COM/
DCOM2 (Component Object Model / Distributed COM) that has been extended
due to the requirements of data access in automation, where the interface is used
to read data from or write data to the controller.
Whenever the short form OPC is used throughout this document, it is referring to
OPC DA.
Examples of OPC DA clients
• Visualizations
• Programs collecting operating data
Examples of providers of OPC servers
• Controller systems
• Fieldbus interface cards

What is an OPC Server?


The OPC server is an executable component that you install on your local PC.
Whenever you establish a connection between an OPC DA client and a controller,
the OPC server is started automatically. It provides information to the OPC DA
client about variable values or states that have changed.
The OPC server provides the variables (referred to as Items in OPC) that are
available on the controller (Item Pool or Address Space). These items are
managed within a Data Cache that helps to provide fast access to their values.
Also possible is a direct, non-cached access to the items of the controller.
In the OPC server, the items can be organized in Groups (Private and Public).
The private groups can be composed in the client arbitrarily from particular items.
Initially, they do not affect the groupings in the OPC server, but if necessary can be
transformed to Public Groups. Working with Private Groups, for example, is
useful in order to be able to activate or deactivate certain groups of variables with
just one single command, depending on whether they are to be accessible or not.
Grouped data is normally read from the OPC server coherently, i.e., the variables
are to be read concurrently. However, this is not always possible in case of target
systems with restricted communication buffers.
Due to the characteristics of COM / DCOM, it is possible to access an OPC server
running on another computer. More than one client can access the data source
simultaneously.
The OPC server is based on the PLCHandler of 3S - Smart Software Solutions
GmbH. This communication module permits a direct communication to those
controllers that are programmable with CoDeSys.
The OPC server V3 or later supports the following OPC specifications:
• OPC Common Definitions and Interfaces Version 1.0
• Data Access Custom Interface Standard Version 1.0
• Data Access Custom Interface Standard Version 2.05A
• Data Access Custom Interface Standard Version 3.0
• Data Access Automation Interface Standard Version 2.0

EIO0000003723.01 9
General Information on OPC DA

Communication between an OPC server and the EcoStruxure Machine Expert


controller can be carried out via the following interface:
• Gateway V3 (parameter Interface > GATEWAY3 in the OPC configuration
tool, page 16)
NOTE: You can configure the OPC server for simulation with the parameter
Interface > SIMULATION3, but the values of the configured variables cannot
be read or written.
For information on PacDrive M controllers, refer to the Appendix, page 33.

Basic Architecture

Symbol File
The symbol file is the basis for exchanging data via the CoDeSys OPC server. If a
project from Logic Builder is loaded to the controller, a symbol file is generated at
the same time (also refer to, Declaring a Variable with EcoStruxure Machine
Expert Logic Builder, page 12).
In the EcoStruxure Machine Expert environment, the symbol file on the controller
is integrated into the application. Additionally, it is saved to the data system as an
XML file with the extension *.xml in the project directory in the computer on which
the project has been created. You can open the XML file to display the generated
symbols.
The symbol file contains variables that are referred to as items in OPC. Use these
items to address variable values in the controller.

10 EIO0000003723.01
Installing the OPC Server

Installing the OPC Server


Installing the OPC Server
Installation with Schneider Electric Software Installer
The OPC server is available for installation with the Schneider Electric Software
Installer.
No OPC server icon is available in the Windows notification area. It is listed in the
Windows Task Manager as a process.

Executing the OPC Client on a PC not Running EcoStruxure Machine Expert


To be able to execute the OPC client on a PC where EcoStruxure Machine Expert
is not installed, proceed as follows:
• Install the gateway component on the PC where the OPC client is running.
Depending on the OPC client, you need to launch the WinCoDeSysOPC.exe
file.
• Copy the file OPCServer.ini to the same directory where the
WinCoDeSysOPC.exe is installed.

EIO0000003723.01 11
EcoStruxure Machine Expert Logic Builder Configuration

EcoStruxure Machine Expert Logic Builder


Configuration
Declaring a Variable to Be Used With OPC
Declaring a Variable with EcoStruxure Machine Expert Logic Builder
Proceed as follows to declare a variable with EcoStruxure Machine Expert Logic
Builder to be used with OPC:

Step Action Example

1 In EcoStruxure Machine Expert Logic Builder, create an empty project. ExampleOPC

2 Add and select a controller by executing the Add Device command. –

3 Rename the controller by selecting the controller node and clicking it again to make it MyPLCexample
editable.
4 Create a PROGRAM in your application by right-clicking the Application node and Program:
executing the command Add Object > POU.... Declare a variable in this POU (refer to
the Example column). Increment a UINT variable:
VARIABLEEXAMPLE
5 Configure the name of the program POU. MyPOUexample

6 Add a task in your application by right-clicking the Application node and executing the MyPOUexample
command Add Object > Task Configuration....

7 Double-click a task and associate the program to the task. Task name: MAST

Program name:
MyPOUexample

8 Execute the Build All command from the Build menu and verify that no error is detected. –

9 Create a Symbol Configuration object in your application by right-clicking the –


Application node and executing the command Add Object > Symbol Configuration....

10 Click the Build button from the Symbol Configuration toolbar. –

11 Expand the variables in the list of symbols. –

12 Select the variable(s) you want to share with your OPC client from your program. Variable example:
VARIABLEEXAMPLE

Program example:
MyPOUexample

13 Execute the Build All command from the Build menu and verify that there is no error Remark:
detected during execution of the Build command.
In the directory where you have
stored your project, an XML file
is created. It provides a list of
the variables which are
accessible for the OPC client.
14 Close the tab Symbol Configuration. –

15 Log in to your controller and start the downloaded application. –

For further information, refer to the Symbol Configuration Editor chapter in the
Programming Guide (see EcoStruxure Machine Expert, Programming Guide).

12 EIO0000003723.01
EcoStruxure Machine Expert Logic Builder Configuration

XML File Listing the Variables Accessible for the OPC Client
In the directory where you have stored your project, an XML file is created which
describes the list of the variables which are accessible for the OPC client.
The XML file is used in SIMULATION3 mode. Also refer to the Project name
parameter, page 16 for controller configuration. When the GATEWAY3 or ARTI3
mode is selected, the XML file is not used and cannot be entered as Project
name in the OPC configuration tool. In these modes, the OPC client retrieves the
variables shared by the symbol configuration via the OPC server from the
controller.

EIO0000003723.01 13
OPC Server Configuration

OPC Server Configuration


General Information on the OPC Configuration Tool
Starting the OPC Configuration Tool
Since the OPC server is independent of EcoStruxure Machine Expert Logic
Builder, use the OPC configuration tool to configure the OPC server and to share
the information on the EcoStruxure Machine Expert project.

Step Action

1 Go to your installation directory:

...\Tools\OPCServer
2 Double-click the OPCConfig.exe file.

The OPC configuration tool OPCconfig.exe allows you to generate an INI file. The
INI file is required to initialize the OPC server with the parameters of your choice
for the communication between the OPC clients and one or more controllers.
After you have started the tool, the dialog box opens with the default settings:

The dialog box contains the following elements:


• Menu bar
• Tree view for mapping the assignments of one or several controllers to the
server
• Configuration parameters that correspond to the selected node in the tree
view

File Menu of the OPC Configuration Tool


The File menu provides commands for loading and saving the configuration files
to / from the OPC configuration tool:

Command Shortcut Description

Open Ctrl+O For editing an existing configuration.

The dialog box for opening a file is displayed. Browse to an existing INI file. The
filter is set to OPCconfg Files *.ini.

The configuration described in the selected INI file is loaded to the OPC
configuration tool.

New Ctrl+N For creating a new configuration.

14 EIO0000003723.01
OPC Server Configuration

Command Shortcut Description

If a configuration is open, you are requested to decide whether it is to be saved


before closing.

The OPC configuration tool displays the default settings for the new
configuration.

Save Ctrl+S Saves the configuration to the loaded INI file.

Save as – Saves the configuration to a new file by assigning a name that you can specify in
the dialog box.

<n> recently opened – List of INI files which have been edited since the tool has been started.
INI-files
You can select a file to reload it to the OPC configuration tool.

Exit – Terminates the OPC configuration tool.

If modifications to the configuration have not yet been saved, you are requested
to do so.

Edit Menu of the OPC Configuration Tool


The Edit menu provides commands for editing the configuration tree in the left
part of the dialog box.

Command Shortcut Description

New Ctrl+G A redundant group node is inserted below the Server node. If there are already
Redundancygroup controller or redundant groups listed in the tree, the new redundant group is
appended at the end. By default, a new entry is named Redundant<n>, with
<n> being a consecutive number starting with 1.

To rename the node, select it in the tree and execute the command Edit >
Rename PLC or click it twice to make it editable.
Append PLC Ctrl+A A controller node is inserted below the Server node. A new controller is
appended at the end of the tree structure. By default, a new entry is named
PLC<n>, with <n> being a consecutive number starting with 1.

To rename the node, select it in the tree and execute the command Edit >
Rename PLC or click it twice to make it editable.
Delete PLC Ctrl+D The selected controller entry is removed from the configuration tree.

Rename PLC Ctrl+R The selected controller entry can be renamed.

Reset PLC Ctrl+Z The settings of the selected controller are reset to the default values defined in
the PLC Default Settings.

Configuration Parameters for the Server


If a Server node is selected in the tree view of the OPC configuration tool, the
following parameters are displayed in the configuration view on the right-hand side
of the dialog box:

EIO0000003723.01 15
OPC Server Configuration

Parameter Default Description

Update rate (ms) 200 ms Update rate of the OPC server in milliseconds.

Minimum: 50 ms This is the cycle time according to which the variable values are read from the controller.
The data are written to the cache with which the client communicates according to a
Typical: 200...500 separately defined update rate.
ms
Typically, a client also provides an update rate. This determines the interval which the
client reads the values from the cache of the server. That value must be greater than or
equal to the rate specified here.

The greater the interval, the less resource consumption for the OPC server and the
client, but with less granularity.
NOTE: Some OPC clients automatically adapt their update rate to that of the OPC
server, or display the message UNSUPPORTED_RATE if the update rate OPC
server client/server is less than the update rate server - controller.
NOTE: Together with the status information the server also provides the parameter
Bandwidth usage that specifies the proportional relationship between the update
rate to the configured update rate.

Sync init Selected Synchronous initialization:

The OPC server is available during start-up after the symbol configuration has been
loaded. Select this option to facilitate server start. Refer to the parameter Wait time (s)
in the controller configuration view, page 16 of this dialog box.

Writes produce data 2 Corresponds to the ReadCyclesAfterWrite parameter in the OPCServer.ini file, page 26.
change calls

Writes produce data 1 Corresponds to the UseColonAsPlcDevider parameter in the OPCServer.ini file, page
change calls 26.

Suppress callbacks on 1 Corresponds to the GroupUpdateBehaviour parameter in the OPCServer.ini file, page
add/remove 26.
Logging The option Enable Options for tracing results in a .log file.
• Enable logging logging (default
events) is If the option Enable logging (default events) is selected, actions and errors detected
(default events)
selected on the OPC server are written to the OPCServer.log file in the installation directory. You
• Log Additional can select the tracing of additional (Log Additional Events) and debugging events
Events (Add Debug Events (slow)) for error analysis.
• Add Debug Events
After you have quit the OPC server, you can analyze the .log file. The messages of
(slow!)
several OPC server sessions are written to the same .log file until the file has reached a
size greater than 1 Mb. Then, the .log file name OPCServer<date>.log is extended by
the date, for example OPCServer12.10.2008.log and saved. For further tracings, a new
.log file is created.
NOTE: Activating logging options has an impact on the system performance.

Configuration Parameters for the Controller


If a controller node is selected in the tree view of the OPC configuration tool, the
following parameters are displayed in the configuration view on the right-hand side
of the dialog box:

Parameter Default Description

Interface – Select the interface that is used for communication between the OPC server and the
controller.

The selection list contains the following interface types:


• ARTI, ARTI3, GATEWAY, SIMULATION for CoDeSys V2.3 projects
• ARTI3, GATEWAY3, and SIMULATION3 for CoDeSys V3 projects

Project name – Name of the symbol file which is to be used in case of simulation.

If no path is specified, the OPC server directory is used.

The file name corresponds to the following syntax:


• CoDeSys V3: <Project name>.<Device>.<Application>.xml
• CoDeSys V2.3: <Project name>.sdb
NOTE: This entry is only used if the SIMULATION interface or the SIMULATION3
interface is used.
Timeout (ms) 10000 If the OPC server has not received a response from the controller within this time, it is
closed automatically.

Number of Tries 3 Number of attempts to transfer a data block.

16 EIO0000003723.01
OPC Server Configuration

Parameter Default Description

As soon as the configured number of attempts have been unsuccessful, a message


indicating communication interruption is generated.

(This parameter is only relevant for drivers that support communication via blocks, level
2).

Buffer Size (Byte) 0 Size of the communication buffer on the target device.

If the value is 0, the size is retrieved from the driver. If no size is retrieved, an unlimited
buffer size is assumed.
Wait time (s) 10 Time (in seconds) the OPC server waits until communication to the controller is available
(after an automatic start of the controller).

Reconnect Time (s) 15 Interval the OPC server waits to retry to connect to the controller via the gateway.

Active Selected If this option is selected, the controller is taken into account by the OPC server.

Motorola Byte Order Not selected Activate the Motorola byte order for controllers based on the Motorola chip set. Not used
in SoMachine Motion and EcoStruxure Machine Expert based applications. Make sure
that the same setting is selected in the communication setting of the controller.

No Login Service Not selected Select this option for target systems that require a login service, for example, PacDrive
M.
Logging Enable logging Options for tracing results in a .log file.
(Defaultevents)
selected You can select the tracing of additional (Log Additional Events) and debugging events
(Add Debug Events (slow)) for error analysis.
NOTE: Activating logging options has an impact on the system performance.

OPC Server Configuration of EcoStruxure Machine Expert


Controllers with the OPC Configuration Tool
Configuring the OPC Server
Configure the OPC server for communication with EcoStruxure Machine Expert
controllers as follows:

EIO0000003723.01 17
OPC Server Configuration

Step Action

1
Right-click the Server node, and execute the Append PLC command from the contextual menu:

2
Select the entry GATEWAY3 from the Interface list.

For further information on the available interfaces, refer to the chapter Configuration Options According to the Interface,
page 30.

For a general description of the available parameters for controller configuration, refer to the section Configuration
Parameters for the Controller, page 16.

3
Select the PLC1 node to rename it (MyPLCexample in this example).

18 EIO0000003723.01
OPC Server Configuration

Step Action

4 Select the Connection node, and click the Edit button.

Result: The PLC address dialog box is displayed:

5 Enter the node name or address of the controller (for example: MyPLCexample) to be able to access your variable from
your OPC client.

Alternatively, you can activate the option Use TCP/IP blockdriver and enter the IP address of PLC and the IP port of PLC
in the boxes that become editable with this option enabled. This function is not available for all supported controllers.
Consult the Programming Guide specific to your controller for further information.

The address is provided in the EcoStruxure Machine Expert Communication


Settings dialog box of your project. The address can be physical or logical. To
avoid address value reconfiguration when there are many devices in your project,
it is a good practice to use logical addresses.

Modifying / Retrieving the Name of the Controller


In the example provided, the controller name MyPLCexample is used. To modify
the name of the controller in the Communication Settings tab of the device
editor, refer to the section Specifying Unique Device Names (NodeNames) in the
Programming Guide (see EcoStruxure Machine Expert, Programming Guide).
NOTE: You can also use this process to retrieve the present controller name
for pasting it into the PLC name or address box of the PLC address dialog
box.

EIO0000003723.01 19
OPC Server Configuration

Physical Addressing
In the Communication Settings tab in controller selection mode, you can copy the nodename of the controller
selected in the list of controllers from the Nodename box:

Proceed as follows:

Step Action

1
Paste the nodename as new value in the PLC name or address box of the PLC address dialog box:

2 Click the OK button.

Result: The following dialog box is displayed:

20 EIO0000003723.01
OPC Server Configuration

Step Action

3 From the File menu, execute the command Save As.

Result: The following dialog box is displayed:

4 Enter or select, if available, the file name OPCServer.ini, and click the Save button.
NOTE: The name of the file must be OPCServer.ini. Do not use another file name.
For further information, refer to the OPCServer.ini File chapter in the Appendix, page 26.

EIO0000003723.01 21
Establishing a Connection to the OPC Server

Establishing a Connection to the OPC Server


Establishing a Connection to the OPC Server
Overview
To establish a connection to the OPC server, you can use an OPC client of your
choice that complies to the OPC standard.
Adapt these general steps to the OPC client you are using to establish a
connection to the OPC server:

Step Action

1 Start the OPC client.


2 Use the browse function specific to your OPC client to find the OPC server.

3 Select the CoDeSys.OPC.DA entry.


NOTE: If the OPC server is not in the list, it has not been installed correctly or a
filter is applied in the client.

4 Establish the connection to the OPC server.

The OPC server is started automatically by the operating system as soon as a


client establishes a connection. The OPC server terminates automatically as soon
as the clients have closed their connections to the server.

Groups and Items


Overview
As soon as a connection to the OPC server has been established, you can add
client Groups.
Most OPC clients generate default names for these groups. However, it is a good
practice to assign meaningful names to the Groups.
By default, the OPC server provides two Items that work independent of
configured symbol files:
• __CommState
• __CommStateOk

__CommState Item
__CommState items can be analyzed by different OPC clients and can have the
following states:
• STATE_TERMINATE = -1
• STATE_PLC_NOT_CONNECTED = 0
• STATE_PLC_CONNECTED = 1
• STATE_NO_SYMBOLS = 2
• STATE_SYMBOLS_LOADED = 3
• STATE_RUNNING = 4
• STATE_DISCONNECT = 5
• STATE_NO_CONFIGURATION = 6

22 EIO0000003723.01
Establishing a Connection to the OPC Server

__CommStateOk Item
The __CommStateOK item is a Boolean variable. TRUE indicates that
communication with the OPC server is available. The suffix of the variable
indicates the name of the controller.
FALSE indicates that communication is not possible, as for example, during a
download.
In redundant groups, status variables are generated for each controller of the
group. In order to differentiate them, the names are generated according to the
following syntax:
• __CommStateOK<ControllerName>
• __CommState<ControllerName>

EIO0000003723.01 23
Appendices
What’s in This Part
OPCServer.ini File..........................................................................................26
Configuration Options According to the Interface ..............................................30
Communication in Distributed Systems ............................................................32
Specific Information for PacDrive M Controllers ................................................33
Troubleshooting and FAQ ...............................................................................38

EIO0000003723.01 25
OPCServer.ini File

OPCServer.ini File
What’s in This Chapter
OPC Server Configuration via OPCServer.ini ..................................................26

OPC Server Configuration via OPCServer.ini


OPCServer.ini - General Information

Overview
The OPCServer.ini file is saved in the directory C:\Program Files (x86)\Schneider
Electric\EcoStruxure Machine Expert\Tools\OPC Server\OPCServer.ini.
The path is protected by administrator rights. If you have the suitable rights, you
can edit the OPCServer.ini file with an ASCII editor of your choice.

OPCServer.ini - Server Area

Settings
Settings that are relevant for the OPC server are displayed in the [Server]
section of the OPCServer.ini file. Some of the parameters listed here can be
configured in the OPCServer.ini using the OPC configuration tool.
However, some parameters are only available for configuration when manually
editing the OPCServer.ini file.

Parameter / entry Meaning

PLCs=1 Number of controllers


PLCx=[<PLC name>] The name of a controller is allocated to this variable.

The placeholder x refers to the index from 0 to number of controllers -1.

Logevents=1 Enabling the log mechanism

Logfilter=15 Filter for log file

Memloginterval=1 Specifies the interval (in seconds) for generating log entries indicating
memory consumption. Value 1 indicates that a log entry is generated
every second. This parameter is used if the log entries for the memory
consumption are enabled with the parameter Log filter.

ReadCyclesAfterWrite= A callback is executed after each write job of the client for a value to
1 retransfer the present value to the client after 2 update cycles. This
setting is required for values that are changing quickly.

UseColonAsPlcDevid- If a value greater than 0 is configured, the first dot . (for example, the dot
er=1 after the controller name) is replaced by a colon.

Updaterate=200 Update rate (in milliseconds)

GroupUpdateBeha- Data-changed callbacks (callback function for file modifications) are


viour=1 generated for the enabled/disabled item.

If the value is 0, callback functions are generated for the items of the
group when one (or several) items within the group is/are being enabled
or disabled.

Log Filter Options


The following table lists the Log filter options. To enable several entries, add them
and enter the result under log filter.

26 EIO0000003723.01
OPCServer.ini File

Log filter Description

15 (16#0000000F) Generating default log entries.

32 (16#00000020) Generating additional entries.

48 (16#00000030) Generating debug entries.

512 (16#00000200) Generating log entries on memory consumption.

The entry is generated in intervals specified with the memloginterval


parameter of the Settings section.

OPCServer.ini - Controllers Area

Settings
In the [PLC:<PLC name>] sections, the connection settings for the
corresponding controllers are defined.
Some of the parameters can be configured in the OPC configuration tool.
The controller address is configured in this section. The parameters that are
available depend on the interface type.

Example of an INI File for the V3 Interface

Entry Meaning

[Server] Settings for the OPC server

PLCs=1 Number of supported controllers

PLC0=PLC1 Name of the first controller PLC 1


logevents=1 Enabling the log mechanism

logfilter=15 Generating default log entries

ReadCyclesAfterWrite=2 A callback is executed after each write job of the client for a
value to retransfer the present value to the client after 2
update cycles. This setting is required for values that are
changing quickly.

UseColonAsPlcDevider=1 If a value greater than 0 is configured, the first dot after the
controller name is replaced by a colon.
NOTE: Not supported by all clients.

updaterate=200 Update rate (in milliseconds)

[PLC:PLC1] Settings for the first controller PLC 1. If several controllers


are used, the first is configured, followed by an analog
section for the second, etc.

interfacetype=GATEWAY3 A connection to the controller is established via the


GATEWAY3 interface.
Active=1 Controllers set active are taken into account by the OPC
server.
Timeout=2000 If the OPC server has not received a response from the
controller within this time (in milliseconds), it is closed
automatically.

Tries=3 Number of attempts to transfer a data block.

Project=OPC.Device.Application. Name and path of the generated symbol file that is for a
xml simulation.

If no path is specified, the OPC server directory is used.

reconnecttime=5 Time for reconnecting

waittime=10 Time (in seconds) the OPC server waits until communication
to the controller is available (after an automatic start of the
controller).

EIO0000003723.01 27
OPCServer.ini File

Entry Meaning

gateway=Tcp/Ip Address of the configured controller to be accessed from the


computer on which the OPC server is running.
Gatewayadress=localhost

Gatewayport=1217

Device=TCP/IP Parameters for the connection to the controller from the


computer on which the OPC server is running. The value
Parameters=1 entered for value0 is the CoDeSys node address. It must
be identical to the nodename defined in the programming
Parameter0=Address system, page 20.
Value0=050C NOTE: If several hex address parts are displayed
separated by a dot . in Logic Builder, enter the complete
address (0000.050C). Alternatively, you can use the
node name.

Example of an INI File for the V2.3 Interface

Entry Meaning

[Server] Settings for the OPC server

PLCs=2 Number of supported controllers

PLC0=PLC_A Name of the first controller PLC A

PLC1=PLC_B Name of the second controller PLC B

logevents=1 Enabling the log mechanism

Logfilter=16#ffffffcf Enabling display of detected errors and information, no


details
ReadCyclesAfterWrite=2 A callback is executed after each write job of the client for a
value to retransfer the present value to the client after 2
update cycles. This setting is required for values that are
changing quickly.

UseColonAsPlcDevider If a value greater than 0 is configured, the first dot . (for


example, the dot after the controller name) is replaced by a
colon.
Updaterate=200 Update rate (in milliseconds)

[PLC:PLC_A] Settings for PLC A

active=1 Controllers set active are taken into account by the OPC
server.
interfacetype=GATEWAY A connection to the controller is established via the
GATEWAY interface.
Motorola=0 Motorola byte order

nologin=1 Select this option for target systems that require a login
service, for example, PacDrive M.

timeout=2000 If the OPC server has not received a response from the
controller within this time (in milliseconds), it is closed
automatically.

tries=3 Number of attempts to transfer a data block.

waittime=10 Time (in seconds) the OPC server waits until communication
to the controller is available (after an automatic start of the
controller).

reconnecttime=5 Time for reconnecting

buffersize=0 The value 0 indicates that the buffer size is retrieved from
the controller.
Project=OPC.pro Name and path of the symbol file that is used for a
simulation. If no path is specified, the OPC server directory
is used.
Gateway=TCP/IP Settings for the connection to the controller PLC_A
(connection of the client to the local gateway via TCP/IP)
gatewayaddress=localhost

gatewayport=1210

28 EIO0000003723.01
OPCServer.ini File

Entry Meaning

device=TCP/IP Parameters for the connection to the target computer where


the controller PLC_A is running (dialog communication
parameters=5 parameter, page 20.
parameter0=Address

value0=127.0.2.1
parameter1=Port

value1=1200
parameter2=Motorola byte order

value2=No
Parameter3=TargetID

Value3=0 Target ID of the controller. It is used for routing at a routing


communication driver to which the OPC server is to connect.
Parameter4=SymbolFilePath Optional entry for the PLChandler; path to the last loaded
symbol file. After analyzing the project ID of the file, it is
determined whether the symbol file has to be reloaded.

[PLC:PLC_B] Settings for controller PLC_B

EIO0000003723.01 29
Configuration Options According to the Interface

Configuration Options According to the Interface


What’s in This Chapter
Configuration Options According to the Interface .............................................30

Configuration Options According to the Interface


Interfaces
The following interfaces are available for OPC communication:

Interface Description
designation

ARTI The CoDeSys V2.3 ARTI interface is used to establish connections via
SymARTI. It is not supported by PacDrive M controllers.

GATEWAY The GATEWAY interface is used to configure PacDrive M controllers –


CoDeSys V2.3.

SIMULATION The SIMULATION interface is used to configure PacDrive M projects –


CoDeSys V2.3 – for the simulation mode.

GATEWAY3 The GATEWAY3 interface is used to configure EcoStruxure Machine Expert


controllers – CoDeSys V3.

SIMULATION3 The SIMULATION3 interface is used to configure EcoStruxure Machine


Expert projects – CoDeSys V3 – for the simulation mode.

GATEWAY (PacDrive M Controllers – CoDeSys V2.3)


First, configure the symbol file in Logic Builder, as described under Configuring
Symbol File (PacDrive M, page 33).
Configure the connection to a PacDrive M controller as follows:

Step Action

1 Mark the root node Server in the OPC configurator.

2 Select the menu command Edit > Append PLC.


Result: Another controller with the file name PLC1 is inserted.
3 Replace the default name PLC1 by a meaningful name (for example, cartoner).

4 Configure the parameters as follows:

Interface: GATEWAY

Project name:

Timeout (ms): 10000 (default)

Number of tries: 3 (default)

Buffer Size (Byte): 1500 (If a new Cx00 object is created the value of Buffer Size must
be changed to 5000)

Wait time (s): 10 (default)

Reconnect time (s): 15 (default)

Active: Activated (standard)

Motorola byte order: inactive (default)

No login service: Activated

Logging: > Enable logging (default events) activated (standard)

Logging: > Log additional events disabled (default)

Logging: > Add debug events (slow) disabled (default)

30 EIO0000003723.01
Configuration Options According to the Interface

Step Action

5 Select the subnode Connection.


6 Click the Edit button.

Result: The Communication parameters dialog box is displayed.

7 Select the desired controller or add further controllers via New....


8 Click the OK button.
9 Save the OPCServer.ini file, for example, via the menu command File > Save.

SIMULATION (PacDrive M Projects – CoDeSys V2.3 – Simulation Mode)


Create a project in Logic Builder with symbol configuration. In contrast to the
configuration with the GATEWAY interface, a new project file is required. For the
Project name parameter, specify a path and use the file extension .pro when you
enter a name. No further communication settings are required.

GATEWAY3 (EcoStruxure Machine Expert Controllers – CoDeSys V3)


Configure the connections to EcoStruxure Machine Expert controllers as
described in chapter EcoStruxure Machine Expert Configuration, page 12 and
following in this manual.

SIMULATION3 (EcoStruxure Machine Expert Projects – CoDeSys V2.3 – Simulation


Mode)
The symbol file generated by the CoDeSys V3 project is required for the
simulation with the V3 interface.
This file can be saved to any directory, however, the OPC server directory is
recommended. The following must be entered under Project name: <File path>
\<Name of the symbol file>.xml.
If the XML symbol file is located in the OPC server directory, you do not have to
specify the path.

EIO0000003723.01 31
Communication in Distributed Systems

Communication in Distributed Systems


What’s in This Chapter
Connections to the OPC Server Running on Another Computer ........................32

Connections to the OPC Server Running on Another Computer


Overview
You can run the OPC clients and the OPC servers on different computers. In order
to establish a remote connection between the OPC client and the OPC server, call
the tool MMC comexp.msc /32 via the command line interface, and enter the OPC
server (CoDeSysOPCDA).
You will then be able to establish a remote connection to the OPC server.
NOTE: The requirement for such a connection is that an OPC server is also
running on the local computer.

32 EIO0000003723.01
Specific Information for PacDrive M Controllers

Specific Information for PacDrive M Controllers


What’s in This Chapter
Creating a Project and Starting (PacDrive M)...................................................33
Symbol File Configuration (PacDrive M) ..........................................................33
Additional Information on the Symbol File (PacDrive M)....................................35

Creating a Project and Starting (PacDrive M)


Creating a Project and Starting (PacDrive M)

Overview
Create your project as usual with the EPAS-4 automation toolkit.
For further information, refer to the EPAS-4 documentation No.: 17130061-000).

Symbol File Configuration (PacDrive M)


Configuring Symbol File (PacDrive M) - General Information

Overview
Communication between the PacDrive M controller and the OPC server is
performed via the gateway server V2. The OPC server receives the information
via the OPC items (variables) available in the symbol file. The symbol file is
created by EPAS-4 when building a project and is stored in the project directory.
To achieve this, select the option Generate symbol entries in EPAS-4, Project >
Options, category Symbol Configuration.
NOTE: If the option Create system entries is activated, the symbol file is
created when the project is built. As a result, the built process takes longer.
The symbol file is available to the OPC server or gateway server after it has
been downloaded to the controller.
NOTE: Make sure that in EPAS-4 the presetting for transferring the symbol file
is selected.
You can modify this setting by selecting the check box Update Symbolfile in the
Project > Options > Login dialog box.
NOTE: If the project is redownloaded to the controller without changing any
symbols, it may happen that an empty symbol file is transferred. Thus, no
symbols can be displayed via the OPC server.
To help to prevent this, you can insert a dummy variable that can be removed at a
later point in time.
NOTE: Assign individual project names and symbol file names to the different
controllers to help to differentiate them.
NOTE: The symbol file should only contain symbols that are required for one
visualization. A slim symbol file has a positive effect on the performance of the
OPC server.

Configuring the Size of the Symbol File


You can configure the size of the symbol file in EPAS-4 by executing the
command Project > Options. In the Symbol configuration dialog box, click the
button Configure symbol file....

EIO0000003723.01 33
Specific Information for PacDrive M Controllers

In the symbol file configuration dialog box, you can select the following entries for
each individual object:
Designation Description

Display the object The variables of the selected objects are added to the symbol file.
variables
Display collective For arrays and structures, an object is created in the symbol file. This allows,
entries for example, the entire array to be addressed via one object in a
visualization. The setting depends on output structure components and
output field components.
NOTE: Many visualizations do not support collective entries of fields
and structures.
Display the Structures (STRUCT) are added to the symbol file.
structure
NOTE: Collective entries of structures are treated as BYTE-ARRAY.
components
The OPC server is only provided the size of the variables. Access to the
structure components must be triggered by the client. To do so, it is
necessary for the client to be familiar with the structure setup. In
practice, structures are not used as collective entries for the OPC
server.
Display the field Fields (ARRAY) are added to the symbol file.
components

Write access Write access to variables can be locked.


NOTE: Confirm every modification for one or several objects in the
dialog box Set object attributes by clicking the OK button.

It is a good practice to define the variables which the OPC server is to access in a
global variable list and to add this global variable list to the symbol file generation
in the symbol configuration of EPAS-4.
This reduces the content of the symbol file to the necessary symbols and thus the
file size remains small. Resource consumption is kept to a minimum.
If variables of functions and function blocks are not available in the symbol file,
verify the following:
• Functions do not have a memory area.
• Function blocks have a memory area. Decide from which of the n instances
the variables should be transferred to the symbol file

Individual Symbol Configuration with Pragma Instruction

Overview
Using the pragma instruction, you can export individual variables to a symbol file
or exclude them from being exported. Read/write access to the variables can be
configured.

Variable Description

No-read The variable is exported to the symbol file without read access.

No-write The variable is exported to the symbol file without write access.

No-read, no-write The variable is not exported to the symbol file.

NOTE: The pragma instruction is only available as of EPAS-4 V00.16.10.

Hide PLC Configuration Parameters

Overview
In addition to accepting or omitting certain objects in the symbol configuration via
the dialog box, you can also use another property of the symbol setting.
The parameters of the controller configuration are automatically attached to the
alphabetically first global variable list.

34 EIO0000003723.01
Specific Information for PacDrive M Controllers

NOTE: In EPAS-4 versions before V00.14.00, all parameters of the controller


configuration are automatically attached to the alphabetically last global
variable list.
If you use a list for this purpose that contains no self-defined variables, you can
insert or remove the symbol configuration of all parameters of the controller
configuration to/from the symbol file by executing the command Project >
Options..., selecting the category Symbol configuration, and activating the
option Generate symbol entries.
NOTE: In multi-controller operation, each controller has its own symbol file.

Data Objects and Items Offered by the OPC Server

Overview
The OPC server provides the variables or items of a project that are saved to the
symbol file of the gateway server. The syntax is the same as in EPAS-4.

Examples

Item list name Description

PLC120.PLC_PRG.DIntTest The DIntTest variable in the POU (Programmable Organization


Unit) PLC_PRG in the PacDrive that has been configured with
the name PLC120 for the OPC server.
PLC120.PLC_PRG.Structure.X The fourth element of the X ARRAY, which is part of the
[4] Structure in the POU PLC_PRG in the PacDrive with the name
PLC120.
PLC120.g_bGlobVar1 The global variable g_bGlobVar1 in the PacDrive with the name
PLC120.

It is not possible to activate direct addresses as the quantity of these addresses


innately is too large. Variables that are located at these addresses can be read.

Additional Information on the Symbol File (PacDrive M)


When is a Symbol File Created?

Overview
A symbol file is generated when a project is built in EPAS-4. It contains the
following entries:
• Symbol file version
• Project ID
• Check sum
• Symbol file size

EIO0000003723.01 35
Specific Information for PacDrive M Controllers

In order to write symbol entries for the project variables, select the option
Generate symbol entries in the dialog box Project > Options, category Symbol
configurations.
Also refer to Configuring symbol file, page 33.

Where are the Symbol Files Stored?

Project Directory
When building a project, the symbol file <Projectname>.sdb is saved to the
project directory. If the generation of symbol files has been configured in EPAS-4,
this file contains the respective entries. (Also refer to When is a symbol file
created?, page 35)

Gateway Files Directory


When downloading (loading) a project to the controller, the symbol file
<Projectname>.sdb is copied to the gateway server to the directory Gateway
server (default C:\\WINNT\GATEWAY FILES).
Prerequisite: A connection is configured via EPAS-4 > Online > Communication
parameters....

On the Controller
When transferring the project to the controller, the symbol file can also be
transferred.
As of V12, two symbol files are available on the controller. This is necessary since
the controller as of V12 supports online change and program change. The
controller verifies that the symbol file provided matches the loaded program. Out-
dated symbol files are automatically deleted.
The symbol file download.sdb contains the files of the loaded program code. The
symbol file boot.sdb contains the information that corresponds to the program file
default.prg.

Boot.sdb File
If the option Update symbol file in EPAS-4 > Project > Options, category Login
is enabled, the symbol file is copied from the project directory to the controller
during project download where it is saved as boot.sdb.

Downoad.sdb File
When restarting the controller, the symbol file boot.sdb is automatically copied to
the download.sdb file. This helps to ensure that the download.sdb file matches the
boot project.
The download.sdb file is read if a client calls the symbol information from the
controller.

Upload Directory
If a client loads a project from the controller, the symbol file download.sdb is
retrieved from the controller and copied to the upload directory of the gateway
where it is saved as file named <Projectname>.sdb. (If the project name could not
be determined, the file is saved with the name download.sdb.)
Thus, in the case of further uploads the client can retrieve the symbol information
from this gateway directory, which takes less time than reading from the controller.

36 EIO0000003723.01
Specific Information for PacDrive M Controllers

Sequence
When the OPC server (which is the gateway server) establishes a connection, it
attempts to load the symbol file download.sdb from the controller. At first, it is
verified if the symbol file in the upload directory is identical to that on the controller.
If it is not identical, the file is uploaded from the controller to the upload directory.
If no symbol file is found on the controller, the symbol file is searched in the
Gateway files directory (of the gateway that is used for the communication).
If no symbol file is found there either, no data exchange is possible between client
and controller.

Best Practices

Symbol File Handling for PacDrive M Controllers


You might want to consider the following when handling symbol files with PacDrive
M controllers:
• It is a good practice to save the symbol file to the controller. In this case, you
must not use the same gateway server or the same communication settings
for downloading and uploading a project.
• If you do not want to save the symbol file on the controller, make sure that the
same gateway server is used for the communication between client and
controller.
This is required because the symbol file that matches the project running on
the controller is only found in the Gateway files directory of the gateway that
has been used for download to the controller.

EIO0000003723.01 37
Troubleshooting and FAQ

Troubleshooting and FAQ


What’s in This Chapter
Checklist ......................................................................................................38
Detected Errors and Possible Solutions ..........................................................39
Log File - General Information ........................................................................49

Checklist
Checklist for Establishing a Connection to a Controller

EcoStruxure Machine Expert Controllers


In order to establish a connection to EcoStruxure Machine Expert controllers,
verify the following:
1. Is the controller enabled?
2. Is there a physical connection to the controller?
3. Is the controller in the correct network?
4. Is the gateway tray application (Gateway Management Console) installed?
5. Is the gateway tray application (Gateway Management Console) enabled?
6. Is the respective symbol displayed in the Windows notification area?
7. Has the OPC server been properly installed?
8. Has the OPC server been properly registered?
9. Has a symbol configuration been attached to a EcoStruxure Machine Expert
project?
10. Have symbols been added to this symbol configuration?
11. Has the project been saved, built and a download been performed?
12. Is the OPCServer.ini configuration correct?
13. Is the correct interface configured in the OPCServer.ini?
14. Is the node address / node name / IP address in a EcoStruxure Machine
Expert project correct?
15. Are the parameters configured according to the default settings?

PacDrive M Controllers
In order to establish a connection to PacDrive M controllers, verify the following:
1. Is the controller enabled?
2. Is there a physical connection to the controller?
3. Is the controller in the correct network?
4. Is the gateway installed?
5. Is the gateway enabled?
6. Is the respective symbol displayed in the task bar?
7. Has the OPC server been properly installed?
8. Has the OPC server been properly registered?
9. Have symbols been added to this symbol configuration?
10. Have the required data types of the symbol configuration been added?
11. Has the project been saved, built and a download been performed?
12. Has the option Generate symbol file been selected in a PacDrive M project?
13. Is the selected gateway channel in a PacDrive M project OK?

38 EIO0000003723.01
Troubleshooting and FAQ

14. Is the OPCServer.ini configuration correct?


15. Is the correct interface set in the OPCServer.ini?
16. Is the IP address in a PacDrive M project correct?
17. Is NoLoginService marked for PacDrive M (interface: GATEWAY)?
18. Are the parameters set according to the default settings?

Detected Errors and Possible Solutions


Issue: Message Function CoCreateInstanceEx failed is Displayed

Issue
When you attempt to start the OPC server by an OPC client, the message
Function CoCreateInstanceEx failed might be generated (depending on the OPC
client you are using) and the OPC server cannot be started.
This behavior may have different causes that are described in the following
paragraphs with possible solutions.

Cause 1
The OPC server has not been registered correctly in the Windows operating
system. This may occur if the OPC server has been installed repeatedly or the
OPC server installation has been exchanged by copying and overwriting the
installation files.

Solution 1
To solve this issue, re-register the OPC server as follows:

Step Action

1 Enter cmd in the Windows command line (Windows > Start > Execute...).
2 Navigate to the OPC server directory.

By default, the directory is C:\Program Files (x86)\Schneider Electric\EcoStruxure


Machine Expert\Tools\OPC Server.

3 Enter the command WinCoDeSysOPC /unregserver to remove registrations.

4 Enter the command WinCoDeSysOPC /regserver to register the OPC server as


COM server as it is based on COM technology.

NOTE: Whenever manual registration is required to solve an issue, make sure


that these tasks are only performed by qualified personnel.
NOTE: The path of the WinCoDeSysOPC.exe file is used for installation.
Thus, the call up may only be performed from a local path.
NOTE: If several OPC servers have been installed in different directories, you
have to unregister them individually. To achieve this, execute the command
WinCoDeSysOPC /unregserver in each installation directory.
NOTE: The command unregserver also removes the service from the
control panel. However, with the command /regserver it is not installed. To
reinstall the service, enter the command WinCoDeSysOPC /Service in the
command line. Reconfigure the service and start it. Once started, the service
is executed until the system is shut down. The communication with the
configured controllers is maintained. The service is installed in the same
directory as the OPC server.

Cause 2
No OPCServer.ini is available in the OPC server folder.

EIO0000003723.01 39
Troubleshooting and FAQ

Solution 2
Make sure that the OPCServer.ini is available at C:\Program Files (x86)\Schneider
Electric\OPC-Server.

Issue: Items Are Not Available in the OPC Client

Issue
Not all items are provided in the OPC client (OPC state OPC_RUNNING).
The symbol file is not correct.

Cause 1
The symbol file has not been generated when the new project has been uploaded
to the controller. Thus, the OPC server is still processing the old symbol file.

Solution 1
Regenerate the symbol file by modifying the Logic Builder / EPAS-4 settings and
download the project to the controller. Also refer to symbol file configuration, page
35.

Cause 2
The project name has been changed but the OPCServer.ini file has not been
adapted. This cause is only available in simulation mode.

Solution 2
Adapt the settings via the OPC configuration tool.

Cause 3
The items have been changed in the project, but they have not been added to or
modified in the symbol configuration or symbol file.

Solution 3
In Logic Builder / EPAS-4, verify the symbol configuration. Modified variable
names are not automatically deleted. You must remove and reinsert them
manually.

Cause 4
New or modified items are not displayed, although the symbol configuration/
symbol file has been transferred correctly.
The OPC server is running as a service.

Solution 4
Step Action

1 Close the OPC client and the service for the OPC client.
2 Restart the service.
3 Restart the client.

40 EIO0000003723.01
Troubleshooting and FAQ

Cause 5
One or several controllers have been disabled in multi-controller operation.

Solution 5
Verify the configuration of the OPC server and enable the controllers.

Cause 6
The project in the controller has not been downloaded with Logic Builder via the
gateway server/Gateway Management Console used by the OPC server. Thus,
the OPC server is still processing the old symbol file.

Solution 6
Two solutions are available for EPAS-4/Logic Builder:
• Download the project with Logic Builder to the controller via the gateway
server/Gateway Management Console of the OPC server.
• Copy the symbol file from the EPAS-4/Logic Builder computer, and paste it on
the computer running the gateway server/Gateway Management Console of
the OPC server.

Issue: ProgID not Displayed in the Browser Window of the Client

Issue
The server name (ProgID) is not displayed in the browser window of the client.

Cause 1
The installation has not been completed successfully and the OPC server has not
or not correctly been registered in the Windows Registry.

Solution 1
Reinstall the OPC server.

Issue: Message IOPCServer Interface not Found or Class not Registered is


Displayed

Issue
The OPC server displays the message IOPCServer Interface not Found or
Class not Registered.

Cause 1
The OPC proxy is not registered or the OPC proxy has a not supported version.
Another OPC server has been installed with an earlier version of the proxy.

Solution 1
Reinstall the OPC server provided by Schneider Electric.

EIO0000003723.01 41
Troubleshooting and FAQ

Issue: OPC Client Displays the Status OPC_NOCONFIG

Issue
The OPC client displays the status OPC_NOCONFIG.

Cause 1
The gateway server/Gateway Management Console located on a different
computer than the client has not yet been started.

Solution 1
Start the gateway server/Gateway Management Console manually from the folder
...\Windows\SysWOW64\Gateway.exe as the OPC server can only start the
gateway server/Gateway Management Console automatically if it is located on the
same computer.
It is a good practice to add the gateway server/Gateway Management Console to
the autorun folder of Windows.

Issue: Slow Update of Values of the Items in the Client

Issue
The update of values of the items (variables) in the client is slow.

Cause 1
The transfer rate is too slow or the update intervals are too high.
The value for the Update rate (ms) parameter, page 15 of the OPC server is too
high.

Solution 1
Adapt the value for the Update rate (ms) parameter, page 15 of the OPC server.

Cause 2
The value for the Update rate (ms) parameter, page 15 of the OPC client is too
high.

Solution 2
Verify the setting of the update rate in your OPC client.

Issue: Error Message Quality BAD is Displayed When Reading Items

Issue
The error message Quality BAD is displayed when items (variables) are read.

Cause 1
No connection to the controller is established.

42 EIO0000003723.01
Troubleshooting and FAQ

Solution 1
Several solutions are available for this cause:
• Verify the status of the __CommState item as described under Groups and
Items, page 22 if it is supported by the client you are using.
• Start the server in test mode and read out an item. If the server returns the
quality status GOOD, verify the connection to the controller.

Cause 2
No connection is established between the OPC server and the gateway server/
Gateway Management Console.

Solution 2
Verify whether the icon of the gateway server/Gateway Management Console in
the Windows notification area is active. If necessary, restart the gateway.
If there are instances of the OPC server and the gateway server/Gateway
Management Console still active as processes in the memory, end these
Processes manually via the Windows Task Manager.

Cause 3
One single variable (or item) is greater than the buffer size (byte) set in the OPC
configuration tool.
Thus, the quality of all items is classified as BAD. The maximum buffer size for the
PacDrive M controller, for example, is 1500 byte.

Solution 3
Verify the setting of the buffer size in the OPC configuration tool. Verify whether a
single variable (for example, an array) is too large.

Cause 4
Group or item inactive.

Solution 4
Enable the group or the respective item in your OPC client.

Issue: Error Message No Gateway with These Settings Found is Displayed

Issue
The error message No Gateway with These Settings Found is displayed.

Cause 1
The gateway server/Gateway Management Console is located on another
computer and is not started.

Solution 1
Start the gateway server/Gateway Management Console on the other computer.

EIO0000003723.01 43
Troubleshooting and FAQ

It is a good practice to add the gateway server/Gateway Management Console to


the autorun folder of Windows.

Cause 2
The Network Device Identification server has not been added to the firewall.

Solution 2
Make sure that an exception is entered for the Network Device Identification
server in the firewall.

Issue: No Gateway Server Icon in the Notification Area and No Connection to the
Controller

Issue
The gateway server/Gateway Management Console icon is not displayed in the
Windows notification area and a connection to the controller cannot be
established.

Cause 1
The gateway server/Gateway Management Console has not been terminated
correctly. Since only one instance of the gateway server/Gateway Management
Console is allowed to be active on the computer, it cannot be restarted.

Solution 1
Manually remove the Gateway.exe from the Processes tab of the Windows Task
Manager by clicking the End Process button.

Issue: Error Message CoDeSysOPC.exe - Entry Point not Found Is Displayed

Issue
The error message CoDeSysOPC.exe - Entry point not found is displayed.
The procedure entry point GSymEnterVarListAccess has not been found in
the GSymbol.dll file.

Cause 1
The gateway server/Gateway Management Console is not updated.
The error message CoDeSysOPC.exe - Entry point not found is displayed if
the OPC server has not been installed correctly.

Solution 1
Reinstall the OPC server.

Issue: Random Access Memory Demand of the OPC Server Increases with Increasing
Runtime up to the System Limit

Issue
With increasing runtime of the OPC server, the random access memory required
by the OPC server is increased up to the system limit.

44 EIO0000003723.01
Troubleshooting and FAQ

Cause 1
Clients write cyclically asynchronous values and the OPC server cannot process
the queries in simultaneous speed. The effect is that increasingly more memory is
required than can be released. The computer does not provide the capacities
required for this application.

Solution 1
Use a computer with a higher capacity (RAM, CPU).

Cause 2
Cyclically asynchronous writing of item values.

Solution 2
Only write values if necessary.
If possible, write synchronously. This has the advantages that the sequence of
queries is retained and the return of the query indicates that the value has been
written to the controller.
NOTE: With synchronous reading, the client calls the method and waits for the
return value. This may have the effect, that the client is blocked for quite a long
time.

Issue: Free Hard Disk Space of the OPC Server Decreases with Increasing Runtime and
the Visualization Computer is Becoming Very Slow

Issue
With increasing runtime of the OPC server, the free disk space decreases and the
visualization computer (that is running the gateway server/Gateway Management
Console) is slowing down.

Cause 1
The Logging function is enabled in the gateway server V2.3.

Solution 1
The Logging function has been designed for debugging purposes. Disable the
Logging function in the gateway server V2.3 by right-clicking the gateway server
icon in the Windows notification area and executing the command Inspection >
Logging.

Issue: Message Server is busy is Displayed

Issue
After you have started the OPC client and you attempt to establish a connection to
the OPC server, the operating system message Server is busy is displayed.

Cause 1
When starting the OPC server, a connection to the controller cannot be
established immediately. In this case, the OPC server waits until the waiting time
has elapsed. It then retries to connect to the client.

EIO0000003723.01 45
Troubleshooting and FAQ

Solution 1
Reduce the value of the Wait time (s) parameter, page 16 in the controller
configuration of the OPC configuration tool.

Cause 2
The virtual RAM of the computer running the visualization is not sufficient.

Solution 2
Increase the virtual RAM of the computer running the visualization.

Issue: Long Reconnection Time Between Visualization and Controller

Issue
After the connection between visualization (computer) and controller has been
interrupted, reconnection takes long time. The first reconnection of the OPC
server takes approximately 15 minutes, each further reconnection takes
approximately 3 minutes.

Cause 1
Two network cards are available in the visualization computer running the OPC
server and the gateway. Both network cards are active and connected.

Solution 1
Swap the allocation sequence of the network cards on the visualization computer
by executing the command Control panel > Network and internet > Network
and sharing center > Change adapter settings > Menu advanced > Advanced
settings... > Register Adapter and allocations.

Issue: Reading and Writing to Controller in Multi-PLC Configuration in Constant


Intervals Delayed

Issue
The reading and writing to a controller in a multi-controller configuration is delayed
in constant intervals by approximately 5...6 seconds.

Cause 1
One controller that is part of the multi-controller configuration of the OPC server
has been powered down. It is written to another controller.
The OPC server constantly tries to communicate with the unconnected controllers
in defined intervals (also refer to the Reconnect time (s) parameter, page 16).
These attempts usually take 5...6 seconds.

Solution 1
• Enter only active controllers in the OPC configuration. Controllers that are not
active can be deselected in the configuration.
• Increase the value of the Reconnect time (s) parameter, page 16 to improve
the behavior.

46 EIO0000003723.01
Troubleshooting and FAQ

Errors Sporadically Detected

Overview
The following errors that are sporadically detected are described in this chapter:
• Writing values failed to <controller>, GatewayError=28
(affects gateway V2.3), page 47
• Define Symbol List failed. GatewayError=31 (affects gateway
V2.3), page 47
• Define VarList failed. GatewayError=31 (affects gateway
V2.3), page 47
• Writing values failed to <controller>, Write-List overflow,
GatewayError=32! (affects gateway V2.3), page 48
• Sync writing values failed to <Name>, Timeout expired!
affects gateway V2.3), page 48
• ProjectID mismatch of symbols and program on <controller>,
Project <Project.pro>: PLC=1234567, SYM=2345678 (affects
PacDrive M/ gateway V2.3), page 48
• COMM_FATALERROR[2] from <controller> (affects PacDrive M/
gateway V2.3), page 48
• PLC <controller> is not connected properly (affects PacDrive
M/ gateway V2.3), page 48

Issue: Message Writing values failed to <controller>,


GatewayError=28 (affects gateway V2.3) is Displayed
Cause 1: One controller that is part of the multi-controller configuration of the
OPC server has been powered off. It is written to another controller.
The OPC server constantly tries to communicate with the unconnected controllers
in defined intervals (also refer to the Reconnect time (s) parameter, page 16).
These attempts usually take 5...6 seconds.
A writing process is also delayed during this time.
Solution 1: Increase the value of the Reconnect time (s) parameter, page 16 to,
for example 10,000 ms.

Issue: Message Define Symbol List failed.


GatewayError=31 (affects gateway V2.3) is Displayed
Cause 1: This error message is displayed in the OPCServer.log if a single
variable (or item) is greater than the buffer size (byte) set in the OPC configuration
tool. Thus, the quality of all items is classified as BAD. The maximum buffer size
for the PacDrive M controller, for example, is 1500 byte.
Solution 1: Verify the setting of the buffer size in the OPC configuration tool.
Verify whether a single variable (for example, an array) is too large.

Issue: Message Define VarList failed. GatewayError=31


(affects gateway V2.3) is Displayed
Cause 1: This error message is displayed in the OPCServer.log if a variable
array is too large. The maximum buffer size for the PacDrive M controller, for
example, is 1500 byte.
Solution 1: Verify the setting of the buffer size in the OPC configuration tool.
Verify whether a single variable (for example, an array) is too large.

EIO0000003723.01 47
Troubleshooting and FAQ

Issue: Message Writing values failed to <controller>,


Write-List overflow, GatewayError=32! (affects
gateway V2.3) is Displayed
Cause 1: This error message is displayed in the OPCServer.log if a single
variable (or item) is greater than the buffer size (byte) set in the OPC configuration
tool. Thus, the quality of all items is classified as BAD. The maximum buffer size
for the PacDrive M controller, for example, is 1500 byte.
Solution 1: Verify the setting of the buffer size in the OPC configuration tool.
Verify whether a single variable (for example, an array) is too large
NOTE: If, for example, a list with 100 REAL values is written, 15 bytes are
required per item (in newer gateway versions, only 14 bytes) for the write
service. 100 x 15 bytes = 1500 bytes (+ additional bytes for service, number of
data, ...). Thus, the communication buffer is exceeded.

Issue: Message Sync writing values failed to <Name>,


Timeout expired! affects gateway V2.3) is Displayed
Cause 1: This error message is displayed in the OPCServer.log if the timeout has
expired.
Solution 1: Increase the value of the Timeout parameter in the OPC server
configuration.

Issue: Message ProjectID mismatch of symbols and


program on <controller>, Project <Project.pro>: PLC=
1234567, SYM=2345678 (affects PacDrive M/ gateway
V2.3) is Displayed
Cause 1: This error message is displayed in the OPCServer.log if the project on
the controller and the symbol file do not match. The symbol file is out-dated.
Solution 1: Regenerate the symbol file. If the symbol file of the gateway server is
loaded from the controller, also transfer the symbol file to the controller.

Issue: Message COMM_FATALERROR[2] from <controller>


(affects PacDrive M/ gateway V2.3) is Displayed
Cause 1: This error message is displayed in the OPCServer.log if the
communication has been interrupted.
Solution 1: Verify the communication line (for example, by executing a ping)
command.
Cause 2: The timeout for the configured in the OPC configuration tool has
expired.
Solution 2: Verify the value configured for the Timeout (ms) parameter, page 16.

Issue: Message PLC <controller> is not connected


properly (affects PacDrive M/ gateway V2.3) is Displayed
Cause 1: This error message is displayed in the OPCServer.log if the controller is
not correctly connected. The symbol file is available, but no symbols are available
in the file.
Solution 1:
Consult the gateway server inspector.

48 EIO0000003723.01
Troubleshooting and FAQ

Step Action

1 Verify the symbol file configuration in Logic Builder.

2 Regenerate the symbol file and transfer the project to the PacDrive controller.

In order to regenerate the symbol file in Logic Builder, it may be required to execute the
following commands:
• Project > Clear all
• Project > Build all

Log File - General Information


Log File - General Information

Introduction
The log file records actions executed by the OPC server which allows you to
analyze detected errors.
The log file is located in the directory of the OPC server C:\Users\<username>
\AppData\Local\VirtualStore\Program Files\Schneider Electric\OPC-Server
or C:\Programme (x86)\Schneider Electric\OPC-Server - depending on the
EcoStruxure Machine Expert version installed.
When exceeding a size of 1 Mb, the log file is split. It is extended by the date and
saved. A new log file is created.
NOTE: If you cannot solve your issues with the help of the log file, contact
your Schneider Electric service representative for further assistance.

EIO0000003723.01 49
Troubleshooting and FAQ

Example for a Log File with Explanations


;
***********************************************************-
***** ;
<loggername>C:\PROGRA~1\SCHNEI~1\OPC-SE~1\OPCServer.log</
loggername>;<logoptions> ; <maxfiles>0</maxfiles> ;
<maxfilesize>1048576</maxfilesize> ;</logoptions>
;
***********************************************************-
*****
(21.06.2011, 12:35:36.062) Path for ini file:
C:\PROGRA~1\SCHNEI~1\OPC-SE~1\OPCServer.ini
-> File path to the OPCServer.INI file
(21.06.2011, 12:35:36.062) Path for AE-Config:
C:\PROGRA~1\SCHNEI~1\OPC-SE~1\OPCServerA.ini
-> File path to the OPCServerA.ini file
(21.06.2011, 12:35:36.062) AE-Configuration unused.
-> Alarms and events are not used
(21.06.2011, 12:35:36.065) 1 PLCs configured
-> A controller has been configured
(21.06.2011, 12:35:36.084) [PLC1]: Try to open connection...
-> The OPC server attempts to establish a connection
(21.06.2011, 12:35:36.084) [PLC1] : Initial Connect started.
-> The OPC server initializes the connection
(21.06.2011, 12:35:36.084) [PLC1]: Open communication
successful
-> A communication has been established successfully
(21.06.2011, 12:35:36.084) [__CommState] : Initially added
implicit variable.
(21.06.2011, 12:35:36.084) [__CommStateOK] : Initially added
implicit variable.
(21.06.2011, 12:35:36.084) [PLC1]: CPLCHandler: Interface:
IT_SIMULATION used
(21.06.2011, 12:35:36.095) [PLC1]: CPLCHandler: Reconnect
[1]: Reconnect cycle begin...
(21.06.2011, 12:35:36.095) [PLC1]: CPLCHandler: Reconnect
[1]: STATE_PLC_NOT_CONNECTED: tries to open channel...
(21.06.2011, 12:35:36.095) [PLC1]: CPLCHandler: Reconnect
[1]: STATE_PLC_CONNECTED: tries to load symbols...
(21.06.2011, 12:35:36.123) [PLC1]: CPLCHandler: 2383 symbols
available
(21.06.2011, 12:35:36.123) [PLC1]: CPLCHandler: Reconnect
[1]: STATE_CONFIG_LOADED: try to check ProjectID...
(21.06.2011, 12:35:36.123) [PLC1]: CPLCHandler: Reconnect
[1]: STATE_RUNNING
(21.06.2011, 12:35:36.123) [PLC1]: CPLCHandler: Reconnect
[1]: Reconnect cycle end
(21.06.2011, 12:35:36.123) [PLC1]: CPLCHandler:
ReconnectThread ends with STATE_RUNNING
(21.06.2011, 12:35:36.220) [PLC1]: Open communication
successful
(21.06.2011, 12:35:36.220) [PLC1]: Starting adding new
symbols 2383...
(21.06.2011, 12:35:36.264) [PLC1]: Adding symbols finished
(21.06.2011, 12:35:36.584) OPC-Server started successful.
(21.06.2011, 12:35:39.482) [PLC1]: Open communication
successful
(21.06.2011, 12:35:39.482) [PLC1]: Active items=0
(21.06.2011, 12:35:41.718) COPCGroup::AddItems(dwNumItems=
2385, clientHandle=0)
(21.06.2011, 12:35:42.447) [PLC1]: Active items=2383
(21.06.2011, 12:36:13.730) [PLC1]: CPLCHandler: begin
shutdown...
(21.06.2011, 12:36:13.730) [PLC1]: CPLCHandler: State=STATE_
DISCONNECT

50 EIO0000003723.01
Glossary
H
HE10:
Rectangular connector for electrical signals with frequencies below 3 MHz,
complying with IEC 60807-2.

O
OPC DA:
OPC Data Access: Exchange of data (including values, time, quality information)
in accordance with the OPC DA specification.

P
POU:
(program organization unit) A variable declaration in source code and a
corresponding instruction set. POUs facilitate the modular re-use of software
programs, functions, and function blocks. Once declared, POUs are available to
one another.

R
RJ45:
A standard type of 8-pin connector for network cables defined for Ethernet.

T
terminal block:
(terminal block) The component that mounts in an electronic module and provides
electrical connections between the controller and the field devices.

EIO0000003723.01 51
Index
O
OPC DA .................................................................9
OPC server configuration................................. 14, 17

EIO0000003723.01 53
Schneider Electric
35 rue Joseph Monier
92500 Rueil Malmaison
France
+ 33 (0) 1 41 29 70 00
www.se.com

As standards, specifications, and design change from time to time,


please ask for confirmation of the information given in this publication.

© 2021 – Schneider Electric. All rights reserved.


EIO0000003723.01

You might also like