Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Build OPC Items

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Build OPC Items

Getting Started Guide

GE Intelligent Platforms, Inc.


2500 Austin Drive
Charlottesville, VA 22911
www.ge-ip.com
The information in this manual is subject to change without notice and does not represent a commitment on the part of GE Intelligent
Platforms, Inc. The software described in this manual is furnished under a license or nondisclosure agreement. This software may be used
or copied only in accordance with the terms of this agreement. No part of this manual may be reproduced or transmitted in any form or by
any means, electronic or mechanical, including photocopying and recording, for any purpose other than the purchaser's personal use
without the written permission of GE Intelligent Platforms, Inc.

© Copyright 2009 by GE Intelligent Platforms, Inc.


All rights reserved. All brand names and product names are trademarks or registered
trademarks of their respective companies.
SA06-120-100609

The text and screen shots in this document are compatible with Workbench Version 8.3.0 and subsequent releases. If you are running a previous
version, please contact Technical Support.
3
Build OPC Items Getting Started

Contents
SECTION 1 – BUILD OPC ITEMS OPERATION ............................................................................................... 4
SECTION 2 – BUILD OPC ITEMS INTERNALS ................................................................................................ 5
SECTION 3 – TROUBLESHOOTING ................................................................................................................. 7

GE Intelligent Platforms, Inc. October 2009


4
Build OPC Items Getting Started

Section 1 – Build OPC Items Operation

Following a successful strategy compilation, a project’s symbolic tags can be automatically exported to, and
viewed from within, the Universal Server. To export tags to the Universal Server, you must configure the
system to automatically launch an external application.
1. First, the external application must be installed on your system.
a. Insert the CD into your drive and launch Windows Explorer to view the CD’s contents.
b. Double-click the setup.exe file. If Microsoft .NET Framework is not detected on your system,
the installation program will load it first; otherwise, you will be taken immediately to the
following step.
c. Click Next on the first screen if you wish to install the Build OPC Items application.
d. Select Yes to accept the license agreement.
e. The application is stored, by default, in <installation_directory>\Utilities\BuildOPCItems. If
you chose to install the program to another location, browse to that directory and click Next.
f. A window appears asking whether OPC items should be automatically built for each project. If
you answer yes, the ExternalApps.ini file (described below) will be automatically added to
the projects subdirectory. The appropriate entry will automatically be added to the
ExternalApps.ini file to build OPC items after a compilation.
g. The program installed to the specified folder. Click Finish.
2. Next, the External Applications feature can be used to configure the system for launching the program
that was just installed.
a. To build OPC items for all projects, create an “ini” file named ExternalApps.ini (if it does not
already exist) and store it in the Projects directory that was created when the system was
installed. (This step is performed automatically if you answered Yes to step f, above.)
b. To build OPC items for a specific project (xxx), create an “ini” file named ExternalApps.ini (if
it does not already exist) and store it in the particular project directory (proj_xxx) that was
created when the project was created in the Workbench.
c. To build OPC items for a specific controller (yyy), create an “ini” file named ExternalApps.ini
(if it does not already exist) and store it in the particular controller directory (ctrl_yyy) that was
created when the controller was created in the Workbench.
d. Open the “ini” file in a text editor and add a line to the end of the “ini” file in the following
format: (This step is automatically performed for .ini files added at the project level when Yes
is the response for Step f, above.)
path\ExportTagsToUS.exe,<server>,<databasename>,<username>,<password>,
<controller>
Where path is the location of the BuildOPCItems folder installed by the Build OPC Items
Installation program. The default path is <installation_directory>\Utilities\BuildOPCItems.

GE Intelligent Platforms, Inc. October 2009


5
Build OPC Items Getting Started

Section 2 – Build OPC Items Internals

The installation program is named Build OPC Items; however, the executable it installs is called
ExportTagsToUS.exe. This section describes the ExportTagsToUS executable.

The program is called with the following command line parameters:


• server - The name of the node on which the SQL database is running
• databasename - the name of the project database in the form MTL_xxx_Project
• username - database user name (sa in most cases)
• password - user’s database password
• controller - controller defined in the Universal Server and in the project. These names must match.

Given the command line parameters, the program extracts a controller’s tag data from the CSVReal and
CSVDiscrete project database tables. Data are extracted from the CSVReal table, the RealName (Tag Name),
Comment (Tag Description), MinRaw, MaxRaw (item scaling), MinEU, MaxEU (engineering unit scaling), and
ItemName (Modbus Starting Address). The ItemName is in the form of xxxxxx [F:S] where xxxxxx is the
address and the square brackets enclose an optional modifier. The address followed by F signals a floating
point; the address followed by S signals a signed integer (short), and the address without any additional
information signals the default, an unsigned integer (short). The ItemName is decoded to pass the address,
default client data type, and field data type to the server. Other real information passed to the server includes:
• Addresses per register - always 1
• Bytes per Register - 2
• High Bit - not used for Reals
• Low Bit - not used for Reals
• Number Registers (2 for floating point; 1 for signed/unsigned integer)
• Access Flags - Read Only if the address < 400000; otherwise read/write; Auto Scanning always
enabled and Scaling always enabled.

From the CSVDiscrete table, the DiscreteName (TagName), Comment (TagDescription), and ItemName
(Address) data are extracted. A discrete’s starting address takes two forms. An address in the register range
below 200000 is a discrete 1 bit value, but addresses in the 300000-400000 range could be a discrete bit
mask within an integer value. For this reason, register addresses in the 300000-400000 range will appear as
xxxxxx:yy where xxxxxx is the Modbus starting address and the :yy defines the bit number to mask. The
ItemName is decoded to pass the address, default client data type and field data type to the server. For
discrete data, the following additional information is passed to the server:
• Addresses per register - 1
• Bytes per Register - 1
• High Bit - not used
• Low Bit - the bit number if this is an integer bit mask
• Number Registers - 1
• Access Flags - Read Only if the address >= 100000 (this includes bit masked values); otherwise,
read/write and auto reset enabled. Auto Scanning is always enabled.

GE Intelligent Platforms, Inc. October 2009


6
Build OPC Items Getting Started
Once tag data has been collected, it is passed to the server. The server returns the status of each item added.
All failed items are reported to the application event log. The event log is also used to signal the start and end
of processing along with any errors that occur in between.

GE Intelligent Platforms, Inc. October 2009


7
Build OPC Items Getting Started

Section 3 – Troubleshooting

Since this application does not have a user interface, refer to the Microsoft Application Event Log for all error
messages. The errors will be self-explanatory; however, the following are a few of the more common
problems:
• The controller name sent to ExportTagsToUS.exe must match the device name defined in the
Universal Server.
• The Universal Server will not allow item updates from the ExportTagsToUS.exe if it has the device
locked in edit mode.
• The Universal Server will not add or update duplicate items.

GE Intelligent Platforms, Inc. October 2009

You might also like