Rosemount NGA 2000 DDE Server-Rev A Manuals & Guides

NGA 2000
DDE
S
ERVER
Rosemount Analytical
N
OTICE
The information contained in this document is subject to change without notice. Rosemount Analytical's system of NGA 2000 Modular Gas Analyzers and Controllers are patented,
under U.S. Patent 5.787.015.
Excel™, Visual Basic™, Windows™ and Windows NT™ are trademarks of Microsoft Corporation.
®
MS-DOS Echelon
is a U.S. registered trademark of Microsoft Corporation .
®
is a U.S. registered trademark of Echelon Corporation. LONTALK™ is a trademark of Echelon Corporation. IBM® is a U.S. registered trademark of International Business Machines. National Instruments® and LabVIEW® are registered trademarks of National Instruments Corp.
Manual Part Number 748368-A December 1997 Printed in U.S.A.
Rosemount Analytical Inc.
4125 East La Palma Avenue Anaheim, California 92807-1802
C
ONTENTS
P
REFACE
SUMMARY ........................................................................................................P-1
CUSTOMER SERVICE, TECHNICAL ASSISTANCE AND FIELD SERVICE ......P-2
RETURNING PARTS TO THE FACTORY ...........................................................P-2
TRAINING ........................................................................................................P-2
DOCUMENTATION..............................................................................................P-2
S
ECTION
1.1 OVERVIEW ..............................................................................................1-1
1.2 SYSTEM REQUIREMENTS.....................................................................1-1
1.3 INSTALLING THE NGA DDE SERVER ....................................................1-2
1.4 STARTING THE NGA DDE SERVER ......................................................1-4
S
ECTION
2.1 THE MAIN MENU.....................................................................................2-1
2.2 THE FILE MENU.......................................................................................2-1
2.3 THE HELP MENU.....................................................................................2-6
1. G
1.2.1 NGA DDE Server Computer Requirements................................1-2
1.2.2 LONWORKS™ Interface Adapter Requirements........................1-2
1.3.1 Installed Components .................................................................1-3
2. U
2.2.1 Node List.....................................................................................2-1
2.2.2 Conversion List ...........................................................................2-3
2.2.3 Preferences .................................................................................2-4
2.2.4 Exit ......................................................................................2-5
2.3.1 Contents ......................................................................................2-6
2.3.2 About ......................................................................................2-6
ETTING STARTED
SING THE MENUS
748368-A
December 1997
Rosemount Analytical
i
NGA 2000 DDE S
ERVER
S
ECTION
3.1 NGA LON DATA.......................................................................................3-1
3.2 NGA VARIABLE TYPES..........................................................................3-1
3.3 NGA VARIABLE SYNTAX........................................................................3-2
3.4 NGA NODE SYNTAX...............................................................................3-2
S
ECTION
4.1 DDE THEORY OF OPERATION .............................................................. 4-1
4.2 TOPIC SUPPORT....................................................................................4-2
S
ECTION
5.1 OVERVIEW.............................................................................................. 5-1
3. NGA V
4. DDE C
4.2.1 Error .....................................................................................4-2
4.2.2 Netvar ......................................................................................4-3
4.2.3 Nodelist ......................................................................................4-4
5. I
5.1.1 Microsoft Excel Examples...........................................................5-1
5.1.2 Microsoft Excel Example Descriptions........................................5-1
5.1.3 Miccrosoft Excel Example Files..................................................5-1
NTERFACING TO MICROSOFT EXCEL
ARIABLE SPECIFICATIONS
OMMUNICATIONS
5.2 SIMPLE EXCEL DDE COMMUNICATIONS ............................................5-2
5.3 ADVANCED EXCEL DDE COMMUNICATIONS......................................5-3
5.3.1 VBA Variables and NGA Variables.............................................5-3
5.3.2 Excel DDE Conversations ..........................................................5-4
5.3.3 Reading a NGA Variable............................................................5-4
5.3.4 Writing a NGA Variable ..............................................................5-5
5.3.5 Reading the NGA Nodelist..........................................................5-6
A
PPENDIX
A.1 LONTALK ADAPTERS............................................................................A-1
A.2 LONTALK ADAPTER DRIVER INSTALLATION......................................A-1
A.3 ECHELON ROUTER................................................................................A-3
A
PPENDIX
B.1 REFERENCE SOURCES FOR MICROSOFT'S DDE PROTOCOL ........B-1
A. LONTALK D
A.2.1 Serial LONTALK Adapter Driver Parameters.............................A-1
A.2.2 PC LONTALK Adapter Driver Parameters.................................A-2
B. R
EFERENCE INFORMATION
EVICE CONFIGURATIONS
W
ARRANTY
ii
Rosemount Analytical December 1997
748368-A
F
IELD SERVICE AND REPAIR FACILITIES
F
IGURES
2-1 Node List .................................................................................................2-2
2-2 Change Node ..........................................................................................2-2
2-3 Conversion List........................................................................................2-3
2-4 DDE Server Preferences.........................................................................2-4
2-5 Mode Tab ................................................................................................2-4
2-6 Options Tab.............................................................................................2-5
C
ONTENTS
748368-A
December 1997
Rosemount Analytical
iii
NGA 2000 DDE S
N
OTES
ERVER
iv
Rosemount Analytical December 1997
748368-A
P
REFACE
S
UMMARY
NGA 2000 PC Interface Suite consists of software and hardware elements that allow communication between NGA components and a personal computer (PC). These packages allow the user bi-directional or read-only communication with commercially available software or Rosemount operating software for the PC workstation package.
The
NGA DDE Server
third part software packages, such as Microsoft Corporation's Excel, Microsoft Corporation's C Compiler and National Instruments LabVIEW.
The PC Interface addresses the network through the network port on the platf orm or directly to an Analyzer Module, and achieve data transfer through Echelon's LONWORKS™ communication protocol
The
NGA DDE Server
Platform
Basic Analog, Autocal, and System Autocal I/O Modules
Chemiluminescence (CLD) Analyzer Module
Wet NOx (WNX) Auxiliary module
Non-dispersive Infrared (NDIR) Analyzer Module
Paramagnetic (PMD) Analyzer Module
Flame Ionization Detector (FID) Analyzer Module
Multi-Channel NDIR/O2 Analyzer Module
software package includes several examples for interfacing to
supports operation of the following NGA 2000 products:
748368-A
Heated FID (HFID) Analyzer Module
December 1997
Rosemount Analytical
P-1
NGA 2000 DDE S
ERVER
C
USTOMER SERVICE
For order administration, replacement Parts, application assistance, on-site or factory repair, service or maintenance contract information, contact:
R
ETURNING PARTS TO THE FACTORY
Before returning parts, contact the Customer Service Center and request a Returned Materials Authorization (RMA) number. Please have the following information when you call:
Number.
Prior authorization by the factory must be obtained before returned materials will be accepted. Unauthorized returns will be returned to the sender, freight collect.
When returning any product or component that has been exposed to a toxic, corrosive or other hazardous material or used in such a hazardous environment, the user must attach an appropriate Material Safety Data Sheet (M.S.D.S.) or a written certification that the material has been decontaminated, disinfected and/or detoxified.
Model Number, Serial Number, and Purchase Order Number or Sales Order
, T
ECHNICAL ASSIST ANCE AND FIELD SERVICE
Rosemount Analytical Inc.
Process Analytical Division
Customer Service Center
1-800-433-6076
Return to:
Rosemount Analytical Inc.
4125 East La Palma Avenue
Anaheim, California 92807-1802
T
RAINING
A comprehensive Factory Training Program of operator and service classes is available. For a copy of the the Technical Services Department at:
D
OCUMENTATION
The following NGA 2000 DDE Server instruction materials are available. Contact Customer Service or the local representative to order.
748368 Instruction Manual (this document)
Current Operator and Service Training Schedule
Rosemount Analytical Inc.
Phone: 1-714-986-7600
FAX: 1-714-577-8006
contact
P-2
December 1997
748368-ARosemount Analytical
G
ETTING STARTED
1
1.1 OVERVIEW
Carefully examine all shipping cartons and their contents for signs of damage. Immediately notify the shipping carrier if the cartons or contents are damaged. Retain the cartons and packing material until all components are operational.
The
NGA DDE Server
to your hard drive. Before you can start using the Setup program.
This chapter will instruct you on the necessary steps to install the It is assumed that the user has a basic working understanding of the DDE (Dynamic
Data Exchange) concepts as specified by Microsoft. For more information pertaining to DDE services, please refer to Appendix B for additional books on this topic. The
NGA DDE Server
Platform
Basic Analog, Autocal, and System Autocal I/O Modules
Chemiluminescence (CLD) Analyzer Module
Wet NOx (WNX) Auxiliary module
Non-dispersive Infrared (NDIR) Analyzer Module
Paramagnetic (PMD) Analyzer Module
Flame Ionization Detector (FID) Analyzer Module
Setup program will decompress and copy all the necessary files
NGA DDE Server
supports operation of the following NGA 2000 products:
, you must use the
NGA DDE Server
.
Multi-Channel NDIR/O2 Analyzer Module
Heated FID (HFID) Analyzer Module
1.2 SYSTEM REQUIREMENTS
The following section describes all the necessary components to using and operating
748368-A
the
NGA DDE Server
.
December 1997
Rosemount Analytical
1-1
NGA 2000 DDE S
ERVER
1.2.1 NGA DDE S
To use the
ERVER COMPUTER REQUIREMENTS
NGA DDE Server
, the user is required to supply the following computer
hardware:
IBM PC or compatible. 80486 33MHz CPU is the minimum recommended
choice.
MS-DOS 5.0 or later version.
Windows 3.1 or Windows for Workgroups 3.11
At least 8 megabytes (MB) of RAM.
10Mb of hard drive space.
INTERF ACE ADAPTER REQUIREMENTS
1.2.2 LONWORKS
In order for this product to work, you must have either the Echelon Model 73000 Serial LONTALK™ Adapter (SLTA) or the Echelon Model 73100 PC LONTALK™ Adapter (PCLTA) adapter. These components must be installed before attempting to operate the NGA DDE Server.
1.3 INSTALLING THE NGA DDE SERVER
The following instructions explain the steps to installing the
NGA DDE Server
your computer. To install the
NGA DDE Server
.
Start Microsoft Windows Insert the disk labeled “
NGA DDE Server Setup
” into drive A: From the File menu in the Program Manager, choose Run... Type a:\setup in the Command Line: entry box. Press ENTER or click on the OK button. Click on the Add/Remove button and follow the instructions. After clicking on the Add/Remove button, you will have the opportunity to install the different
options available for the
NGA DDE Server
. All options are selected.
Note After installation of the
NGA DDE Server
, the computer will reboot, in order to
install the required device drivers.
onto
1-2
December 1997
748368-ARosemount Analytical
G
ETTING STARTED
1.3.1 I
NSTALLED COMPONENTS
FILE DESCRIPTION
\NGASUITE NGDDESRV.EXE NGACOM16.EXE BC453RTL.DLL BIDS47.DLL OWL253.DLL NGACTL16.DLL NGANET16.DLL PHRASES.BIN NGDDESRV.HLP LDVSLTA.SYS LDVPCLTA.SYS NGDDESRV.CFG \NGASUITE\DOCS 404AVAR.DOC NGDDESRV.HLP IMPVARS.TXT \NGA...\EXAMPLES\EXCEL NGACHECK.XLS
NGALOG.XLS
NGAPARM.XLS
NGATREND.XLS
TUTORIAL.XLS
\ NGA...\EXAMPLES\C NGCLIENT.EXE
NGCLIENT.MAK NGCLIENT.H NGCLIENT.RH NGCLIENT.RC NGCLIENT.DEF NGCLIENT.C
NGA DDE Server executable. NGA Network Communicator executable
NGA Phrases NGA DDE Server help file. Network driver for the SLTA Network driver for the PCLTA Setup configuration file.
This document in the Windows Help File format.
NGA Analyzer Module diagnostic worksheet that depicts detailed analyzer module diagnostics. NGA data-logging worksheet that allows variable data collection and averaging for a user-selectable time duration. NGA Analyzer module parameter set control worksheet that allows loading different sets of configuration parameters into analyzers. NGA internal datalog extraction spreadsheet that extracts 24 hours of 15 minute averaged data from an analyzer. Microsoft Excel Tutorial spreadsheet which has the examples from section
5.3 Advanced Excel DDE
Communications.
Sample application which views the PVA and current range of a selected analyzer. Microsoft C project file.
748368-A
December 1997
Rosemount Analytical
1-3
NGA 2000 DDE S
ERVER
1.4 STARTING THE NGA DDE SERVER
After installing the
NGA DDE Server
Manager, the NGA 2000 PC Interface Suite group is already open. Double-click on the icon that contains the
NGA DDE Server
, you can start the application. In Program .
At this point, the
NGA DDE Server
will start to query the LON.
1-4
December 1997
748368-ARosemount Analytical
2.1 THE MAIN MENU
Since the concept of the package to the NGA Analyzer family, the entries. These are listed as:
File
Help
Note
NGA DDE Server
U
SING THE
M
ENUS
2
was to be a simple communication
NGA DDE Server
employs only two menu
Make sure that the an icon on the bottom of the screen, double-click the icon, or single click the icon and select Restore.
NGA DDE Server
is opened as a window. If it is displayed as
2.2 THE FILE MENU
The File entry contains four choices which control the various components of the
DDE Server
Node list
Conversation List
Preferences
Exit
2.2.1 N
ODE LIST
The Node List command will display a simple dialog box, containing a list box. The list box displays all the modules currently active on the LON.
:
NGA
748368-A
December 1997
Rosemount Analytical
2-1
NGA 2000 DDE S
ERVER
IGURE
F
2-1. N
ODE LIST
To access the Node List Select File from the menu. Select Node list
Each entry has a node number, tag name, location and module type associated
with it.
Note
Before you start to use the
NGA DDE Server
, it is suggested that you identify all the nodes on the LON using the File|Node list. Without these identifications, such as node number or tag name, you will not be able to communicate with the
NGA DDE Server
.
Edit Node Dialog Box The Change Node dialog box is used to change the tag name and location field of the
selected module.
IGURE
F
2-2
2-2. C
HANGE NODE
December 1997
748368-ARosemount Analytical
U
SING THE MENUS
To access the Change Node Dialog box
Select File from the menu. Select Node list. Select the desired module. Click on the Edit button. Make necessary changes to the tag name and/or the location name. Press ENTER or click the OK button.
Note If a Control Module is attached to the LON, you can not change the location of
any module attached to the LON. In order to change any node’s location, power must first be removed from the Control Module.
2.2.2 C
ONVERSATION LIST
The Conversation List command will display a dialog box, containing a list of the currently open conversation.
IGURE
F
748368-A
2-3. C
ONVERSATION LIST
December 1997
Rosemount Analytical
2-3
NGA 2000 DDE S
ERVER
To access the Conversation List
1. Select File from the menu.
2. Select Conversation List The DDE Conversation List dialog box displays the conversation index number, DDE
item as requested by the client application and whether the items are native mode variables and advisable.
To cancel a conversation, simply select the desired conversation and click on the Cancel Link button.
Note When you cancel a conversation, all items which are listed under the specified
conversation number also terminated.
2.2.3 P
REFERENCES
The Preferences dialog box will display a tabbed dialog box with two option tabs, Modes and Options. This dialog box controls how the
NGA DDE Server
interfaces to
the client and LON.
IGURE
F
2-4. DDE S
ODE TAB
M
The Mode tab allows for the user to select the way the
ERVER PREFERENCES
NGA DDE Server
operates.
IGURE
F
2-4
2-5. M
ODE TAB
December 1997
748368-ARosemount Analytical
U
SING THE MENUS
Native NGA Module variables have certain predefined specifications as to how they are
displayed. Using the Native Mode format, you will see the variable as the platfor m module displays it.
Raw The Raw Mode will format variables as the Echelon DDE server would show
them. e.g. Floating point values have 6 decimal places, ENUM’s are displayed as integer values.
Logfile This option will log all transactions to a file called: LOG FI LE.TXT. This is a
troubleshooting tool only.
PTIONS TAB
O
The Options tab allows the user to make changes to the effected only at the start time of the
IGURE
F
2-6. O
Speed This is the update interval for which the
Dictionary The Phrase Dictionary is contained in a file known as PHRASES.BIN. These
PTIONS TAB
NGA Module variable from the LON. The fastest that the can retrieve a variable is 10ms. The system defaults to 10m s. The user has the option of changing it only at boot t im e.
phrases are the driving force behind ENUM variables. The Phra se Dict ionar y takes less than 64Kb of memor y. I f the Phrase Dictionary is not loaded at start time, the NGA DDE Ser ver will always operate in Raw Mode.
NGA DDE Server
NGA DDE Server
.
NGA DDE Server
that are
uses to retrieve one
NGA DDE Server
Note
It is highly recommended that the user run the This will make interpretation of data coming from the
2.2.4 E
The Exit command will terminate the To exit the NGA DDE Server
1. Select File from the menu
2. Select Exit, or press Alt - F4
748368-A
XIT
NGA DDE Server
NGA DDE Server
December 1997
in Native Mode.
NGA DDE Server
easier.
and remove it from memory.
Rosemount Analytical
2-5
NGA 2000 DDE S
ERVER
2.3 THE HELP MENU
2.3.1 C
ONTENTS
To get additional help for the
NGA DDE Server.
Select Help from the menu. Select Contents.
2.3.2 A
BOUT
To get additional information about the
Select Help from the menu. Select About.
The
NGA DDE Server
DDE Server
, copyright notices, and other information which is pertinent to have when
About dialog box has information on the version of the
calling in for technical support on this product.
NGA DDE Server
.
NGA
2-6
December 1997
748368-ARosemount Analytical
NGA V
ARIABLE SPECIFICATIONS
3
3.1 NGA LON DATA
NGA analyzers operate over a digital network called the LON . All of the internal data is available over thi s netw ork.
Data is sent over the LON as discrete packets called “Variables”. These correspond with normal programming variables, except that they are available to anything on the LON capable of reading them.
There are also other packets of information used by the NGA system, but these are not accessible to non-NGA devices.
The complete NGA analyzer module library that identifies all variable tag names by description, units and variable type is provided in the document,
Manual
.
NGA Reference
3.2 NGA VARIABLE TYPES
LON variables may be of four basic types, floating point, integer, enumerated or string. In addition, all but string variables may be packaged into arrays, with a maximum of seven floating point numbers per array, or fifteen integer or enumerated ty pes per ar ray .
The complete listing of variables ty pes is li sted as follow s:
TYPE DEFINITION
Floating Point
Floating Point Array
Integer Integer value (-32,767 to 32,767) Integer Array Up to 10 integers packaged in an array and separated by commas Enumerated Integer value whic h equates to a pre-deter mined phrase w ithin the NGA
Enumerated Array
String Alphanumeric value that contains up to 31 characters . Manufacturing
Accurate number value with decimal point and significant fig ures. All primary and secondary v ariables are thi s type
Up to 7 accurate numbers with decimal point and si gnificant figures packaged in an array and separated by commas
phraseology. Enable/disable messag es and certain status var iables are this type
Up to 10 enumerated variables packaged i n an array and separ ated by commas
dates, serial numbers and service i nformation are this type.
748368-A
December 1997
Rosemount Analytical
3-1
NGA 2000 DDE S
ERVER
3.3 NGA VARIABLE SYNTAX
In order to communicate to a variable on the network, there are several pieces of information which are required on the item parameter line.
NODE.<SUBNODE:>VAR<[ARRAY INDEX]>
TYPE DEFINITION
Node The node can be referenced either by node number, location name,
or tag name. See the section below:
Subnode Integer value. (0-15).
This is only valid on analyzer which have multiple sub nodes.
MLT.2:PVA Variable Any variable name Array Index Integer value. (1-15)
This is only valid on variables which are arrays.
FID1.AFT90_[2]
NGA Node Parameter
.
Note Variables which are arrays will return the first element if you do not specify an
element index.
3.4 NGA NODE SYNTAX
Node parameter of the NGA variable syntax has three methods of identification.
TYPE DEFINITION
Location Name This is a simple 4 character name, which can be set using the
Nodelist item from the menu. IR1.PVA
Node Number You can also reference a node by its number. In order to do this,
you must enclose the number within quotes ("), followed by a period (.): "1".PVA
When adding a node to a NGA network, the number may change, so this is not the most flexible method.
Tag Name The last method is via the Tag name. This is a 31 character name,
which can be set using the Nodelist item from the menu. A Tag name must be enclosed within quotes ("), followed by a period (.):
"My FID - 1/1/95".PVA
3-2
December 1997
748368-ARosemount Analytical
DDE C
OMMUNICATIONS
4
4.1 DDE THEORY OF OPERATION
Microsoft Windows and Windows based applications, support three mechanisms of inter-application communication, Dynamic Data Exchange (DDE), the Clipboard, and Object Link Embedding (OLE).
The DDE services are a client/server based communication protocol, which uses the built-in messaging system of Microsoft Windows. Two applications carry on a “conversation” by sending messages to each other.
In order to carry on a conversation with a server, the client must know the name of the server, topic and item which is being requested. These three items are a hierarchical method of transferring data.
The server name is the actual DDE server application name. In the case of the
DDE Server
The topic name is a category of items that a server can provide. For instance, the
NGA DDE Server
information and specific analyzer information. These topics are listed in the next section, along with their respective items which they support.
The item is the actual unit of information that the user wants provided. The
Server
Network. Each variable is an item. Data can be retrieved in two ways. One is to request a single piece of data, once. This
is sometimes called a “cold link”. This means that, every time you would like to get newer information, you must request it.
The second method of communication is to request data as advised. This method will keep an open link between the client and server. When the server finds that the data has changed, it will automatically notify the client. This is sometimes called a “hot link”.
One of the easiest applications to use as a client to the Excel. Each cell can contain a conversation with a single DDE server on a single topic and item. Every cell that has a conversation with a server becomes automatically a “hot link”.
, the service name is NGDDESRV.
has data available regarding error messages, general network
can retrieve information about any of the variables on the NGA Analyzer
NGA DDE Server
is Microsoft
NGA
NGA DDE
748368-A
See Section 5, Using the NGA DDE Server with Microsoft Excel for more information.
December 1997
Rosemount Analytical
4-1
NGA 2000 DDE S
ERVER
4.2 TOPIC SUPPORT
The
NGA DDE Server
from an NGA Analyzer Network. These are as follows:
Error
Netvar
Nodelist
supports several topics which allow for communication to and
4.2.1
ERROR
The
NGA DDE Server
has the built in capability of reporting different errors which can
occur while interacting with an NGA Analyzer Module.
ENERAL
G
This item will always report the last error that occurred on the
NGA V
ARIABLE
This allows for any NGA variable interaction status. The values which the
NGA DDE Server
will return to the client application are shown
in Table 4-1.
ERROR VALUE DESCRIPTION
NO_ERROR The variable existed and communication was processed. NOT_ADVISE
NOT_A_VAR
The item which you are attempting to make advisable is not an advisable item.
The requested variable either was not spelled correctly, or doesn't exist.
NOT_A_TOPIC The topic is not a supported topic name. NOT_A_ITEM
NO_CHANGE NEW_VAL MEMORY_ERROR
The topic which you are requesting does not support the requested item.
The variable which you are requesting has not changed since last time that it was requested.
The variable which you are requesting has changed since last time that it was requested.
The process which was requested could not be completed due to lack of memory.
NGA DDE Server
.
4-2
December 1997
748368-ARosemount Analytical
DDE C
OMMUNICATIONS
4.2.2 NETVAR
The NGA DDE Server is designed to communicate with NGA Analyzer Modules. Interaction with the an analyzer is accomplished with the item,
netvar
retrieve all available variables from the analyzer. Writable variables can be poked.
. It is possible to
NGA V
ARIABLE
This allows for any NGA variable interaction status. The parameter switches for the netvar item is shown in Table 4-2.
PARAMETER
SWITCH
DESCRIPTION
Display in Native format.
-n
This is a manual override for when the NGA DDE Server is set in the Raw Mode.
Display in decimal format, using the format string. The format
-d[format]
string can contain numbers and decimal points, i.e. -d2.2 or -d1. This is a manual override for when the NGA
in the Native Mode.
-x
When the
NGA DDE Server
a specific element or return the entire variable array in a comma delimited format. The -x command will return the number of
deals with arrays, it can either pull
elements in the specified array. This is a parameter intended only for compatibility to the
-a Boolean
Echelon DDE Server. The Boolean value may be set to True or False.
This parameter allows for the user to select the priority level of a
-p nnnnn
variable. The values may be set from 1 - 5. The default value is
5. The Boolean value may be set to True or False. This is a
-p Boolean
parameter intended for compatibility to the Echelon DDE Server. It is the equivalent of setting -p 1
This is a parameter intended only for compatibility to the
-I nnnnn
Echelon DDE Server. The parameter value is a number between 0 and 32767.
This is a parameter intended only for compatibility to the
-r nn
Echelon DDE Server. The parameter value is a number between 0 and 15.
DDE Server
is set
748368-A
Note The parameter switches can be entered in any order. The
NGA DDE Server
will
parse them upon request.
Variables can be retrieved and formatted in two fashions; Native Mode and Raw Mode. Native Mode will display the variable as the Control Module displays it. This includes any additional information displayed with the values such as, temperature format ('F' or 'C'), ppm, what ever. Raw Mode will display the variable in its raw numerical or string format.
December 1997
Rosemount Analytical
4-3
NGA 2000 DDE S
ERVER
4.2.3 NODELIST
The nodelist topic will retrieve information regarding the NGA Analyzer Network. This information is limited to the number of nodes and some basic information regarding each node.
This topic can only be requested, and not advised.
ITEM DESCRIPTION
This command will retrieve the number of nodes on the NGA
number
get
Analyzer Network. The return string is in the format of “A<number>“.
This command will retrieve the full node list. The data is structured as an array of text elements, separated by commas.
The
item will return a data array in the following format:
get
node number, analyzer module type, tagname,
Note Note the comma at the end of the data array.
4-4
December 1997
748368-ARosemount Analytical
I
NTERFACING TO MICROSOFT EXCEL
5
5.1 OVERVIEW
The
NGA DDE Server
spreadsheet software. Using Microsoft Excel, the user can carry out many standard I/O Module functions like setting alarms and triggering calibration functions. In addition, the user can create custom screens that display data in groupings specific to the user's application.
can easily be integrated with Microsoft Corporation's Excel
For more information regarding DDE communications and the
Microsoft Excel User’s Guide
5.1.1 M
5.1.2 M
ICROSOFT EXCEL EXAMPLES
The Excel-based examples provided in this package give the user has bi-directional communication capabilities (i.e., data can be written as well as read on the network).
The Excel-based example files are located in the installed directory under \EXAMPLES\EXCEL.
ICROSOFT EXCEL EXAMPLE DESCRIPTION
The Microsoft Excel spreadsheet examples support NGA 2000 analyzers in the foll owing wa ys:
Allows access to all NGA 2000 network variables
Updates variable displays
Provides basic trending graphics
Archives variable data
Prints reports
.
Microsoft Excel
, please see
5.1.3 M
This package includes four example files that the user can copy to create customized worksheets. The four example files include:
748368-A
Extracts internally logged data within each analyzer module
Provides alternative configurations for analyzers
ICROSOFT EXCEL EXAMPLE FILES
December 1997
Rosemount Analytical
5-1
NGA 2000 DDE S
ERVER
NGALOG.XLS
- NGA data-logging worksheet that allows variable data
collection and averaging for a user-selectable time duration.
NGACHECK.XLS
- NGA Analyzer Module diagnostic worksheet that depicts
detailed analyzer module diagnostics.
NGAPARM.XLS
- NGA Analyzer module parameter set control worksheet that
allows loading different sets of configuration parameters into analyzers.
NGATREND.XLS
- NGA internal datalog extraction spreadsheet that extracts
24 hours of 15 minute averaged data from an analyzer.
TUTORIAL.XLS
- This spreadsheet has the examples from section
Advanced Excel DDE Communications.
5.2 SIMPLE EXCEL DDE COMMUNICATIONS
Microsoft Excel supports direct reference links to any third party DDE server from with in a cell. The cell must contain a formulae which links to the required DDE server. This is done by using the following format:
=SUM(Service|Topic!Item)
5.3
or
=Service|Topic!Item
This will automatically establish a link between the Excel spreadsheet cell and the specified DDE server. When the value of the data changes, Microsoft Excel will show the most current value as passed back from the DDE server.
The user can also change the manner which the link functions by choosing from the Excel menu, Edit|Links...
Note For more information regarding data links, please see the Excel User’s Guide,
Chapter 41, “Sharing Data and Graphics with Other Applications”
To illustrate the idea more clearly, here are a few examples: To get a reading on the PVA variable for an analyzer, you would enter the following:
=NGDDESRV|netvar!my_fid.PVA
To get the latest error code, you code use the following:
=NGDDESRV|error!general
5-2
In order to use any of the formatting codes, you must place the item within single quotes ('):
=NGDDESRV|netvar!'my_fid.PVA -d1.4'
December 1997
748368-ARosemount Analytical
I
NTERFACING TO MICROSOFT EXCEL
5.3 ADVANCED EXCEL DDE COMMUNICATIONS
With the release of Microsoft Excel 5.0, Microsoft created a new macro language, called Visual Basic for Applications (VBA). This is a subset of the standard Visual Basic language package.
The Microsoft Excel spreadsheet examples that are included in this software package are written in VBA. For more information regarding Visual Basic for Applications or for definitions of the terms used in the following sections please see the help file,
Basic Reference
The following sections are code examples for VBA. These examples are entered as macros. To create a macro in Excel, select from the menu Insert|Macro|Module. A blank sheet without columns or rows will appear, labeled usually as the macro worksheet.
.
Module1
Visual
. This is
5.3.1 VBA V
ARIABLES AND
NGA V
ARIABLES
VBA variables are named symbolic definitions of pieces of data. These symbolic definitions are references to place holders in memory where the actual data values are stored. These variables are declared within modules or procedures that are contained in a macro. Each variable is declared with a name and a data type,
currency, single
(floating point),
string
, or
variant
. This is done by the following Excel
Boolean, integer
macro statement: Dim a_number_variable As Integer When requesting a variable from the
NGA DDE Server
, the result is returned as an array of characters, regardless of the NGA variable type, i.e. integer, float, string or enumerated. Therefore, you must declare the VBA variable which will receive the
DDE Server
variable, as type variant, or as an array of strings. An example of this in
an Excel macro statement would be:
Dim myPVA As Variant myPVA = DDERequest( ... )
If you want the
NGA DDE Server
variable to be stored as a number in a VBA variable, you will have to convert it. The easiest way is to write it into a worksheet cell, and then read it back. Otherwise you can use a function to do it, an example of which is “LON_into_string()” in the Excel spreadsheet examples.
,
NGA
748368-A
Note VBA variables that are stored into a cell in a worksheet, are automatically
converted into a the appropriate cell format, i.e. number or string, with the exception of dates. Dates are stored in Excel cells in the Julian date format. You can convert the Julian date forma t by formatting the cell as a date afte r storing the variable to that cell.
December 1997
Rosemount Analytical
5-3
NGA 2000 DDE S
ERVER
5.3.2 E
XCEL
DDE C
In order for an Excel macro to communicate with the
ONVERSATIONS
NGA DDE Server
, a conversation
must be established. Initiation of a conversation can be illustrated as follows: Dim NGA_Conversation As Integer NGA_Conversation = DDEInitiate( NGDDESRVR, netvar ) The function
DDEInitiate
returns an integer value, which if successful, is necessary
for any other DDE transactions during that conversation’s duration. When the conversation is complete, and all the required
NGA DDE Server
have been successfully transmitted, it is necessary to close down the open conversation. This is down by the follow macro statement:
DDETerminate( NGA_Conversation ) If you fail to terminate the conversation when the macro is done running, the
conversation will still be open. Also, if you stop the macro in mid-operation, you will also leave the conversation open. You must then terminate the conversation via the
NGA DDE Server’s
menu command, File|Conversation List.
variables
See Section
5.3.3 R
EADING A
2.2.2. Conversation List
NGA V
Reading a variable from the As seen in section
NGA DDE Server
ARIABLE
NGA DDE Server
5.2. Simple Excel DDE Communications
, and continuously request data.
in this manual.
is one of the easiest operations to do.
, you can link a cell to the
Excel allows for a higher level of sophistication when reading a NGA variable. You simply create a macro which will poll the variable that is desired.
The macro
DDERead
is an example of requesting a single variable from an NGA analyzer. Please substitute the analyzer location (“IR1”) with the appropriate analyzer at your location.
To outline the steps of the
DDERead
function, we can break them down as:
Macro declaration. Variable declarations. Initialization of the DDE conversation. Retrieval and display of the DDE server’s data. Termination of the DDE conversation.
5-4
December 1997
748368-ARosemount Analytical
I
NTERFACING TO MICROSOFT EXCEL
Sub DDERead() Dim dde_conv As Integer Dim dde_ret_var As Variant dde_conv = DDEInitiate("NGDDESRV", "netvar") dde_ret_var = DDERequest(dde_conv, "IR1.TAG") Worksheets("Sheet1").Cells(2, 1).Value = dde_ret_var DDETerminate( dde_conv ) End Sub
5.3.4 W
RITING A
NGA V
Writing to an NGA variable on the
ARIABLE
NGA DDE Server
isn’t as simple as reading. With reading a variable, you can store the data directly into a VBA variable. When writing, you must use data from a spreadsheet cell.
The cell must be formatted as text. Numbers must be placed into the cell as character types, rather than literal number values. If there is an error in the format of the cell, the poke function will fail, and Excel will not give any error messages to explain why.
The macro
DDEWrite
is an example of poking a single cell into an NGA analyzer. Please substitute the analyzer location (“IR1”) with the appropriate analyzer at your location.
To outline the steps of the
DDEWrite
function, we can break them down as:
1. Macro declaration.
2. Variable declarations.
3. Initialization of the DDE conversation.
4. Retrieval of the worksheet’s cell data and writing it into the NGA DDE Server.
5. Termination of the DDE conversation.
5.3.5 R
The
748368-A
Sub DDEWrite() Dim dde_conv As Integer dde_conv = DDEInitiate("NGDDESRV", "netvar") DDEPoke dde_conv, "IR1.TAG",
Worksheets("Sheet1").Cells(2, 2) DDETerminate( dde_conv ) End Sub
EADING THE
NGA N
NGA DDE Server
ODELIST
provides a list of the analyzers and their types which are
December 1997
Rosemount Analytical
5-5
NGA 2000 DDE S
ERVER
present on the LON. This can be obtained by using the topic Using the topic
number
analyzers on the LON. Using the topic get, the
, the
NGA DDE Server
NGA DDE Server
will return to you the number of
the nodes.
Sub DDE_Node_List() Dim dde_conv As Integer Dim nodenums As String Dim nodelist As Variant dde_conv = DDEInitiate("NGDDESRV", "nodelist") nodenum = DDERequest(dde_conv, "number") Worksheets("Sheet1").Cells(1, 1).Value = nodenum nodelist = DDERequest(dde_conv, "get") Worksheets("Sheet1").Cells(2, 1).Value = nodelist DDETerminate (dde_conv) End Sub
nodelist
.
will return an array of
It is also important to know that the item
number
returns a string “An”, where n is the number of nodes. The following macro statement will strip off the A and also convert n into a integer value.
Dim nodenum As Integer nodenum = Right(nodenums, Len(nodenums) - 1)
The
item will return a data array containing the node number, analyzer module
get
type and tagname. Each item is separated by commas. To learn how to extract each element of the array, please see the macro call
Analyze_network()
in spreadsheet
NGACHECK.XLS.
5-6
December 1997
748368-ARosemount Analytical
LONTALK D
EVICE CONFIGURATIONS
A
A.1 LONTALK™ ADAPTERS
To communicate between the NGA digital network to the PC, you must use LonWorks gateway hardware, which consists of the following items:
DESCRIPTION
Echelon Serial LONTALK™ Adapter. (SLTA) 903659 730000 Echelon PC LONTALK™ Adapter, single channel.
(PCLTA) Echelon Router 903660 71000
The Serial LONTALK™ Adapter allows for the PC to connect through a serial port to the NGA digital network.
The PC LONTALK™ Adapter allows for the PC to connect via a bus slot to the NGA digital network.
The Echelon Router is required when more than one NGA platform is interfaced to a single PC (one router for each Platform). This will eliminate conflicts with node assignments between analyzer modules and their respective platforms.
ROSEMOUNT
PART NO.
904631 73100-11
ECHELON
PART NO.
A.2 LONTALK™ ADAPTER DRIVER INSTALLATION
Depending on which LONTALK™ Adapter is installed, the program will install and configure the appropriate driver in the CONFIG.SYS file.
NGA DDE Server
setup
This section briefly explains what these drivers are and how they are configured.
A.2.1 S
The Serial LONTALK™ Adapter provides communication to the NGA digital network through the PC’s communication port (COM1: or COM2:). This device driver must be loaded by a as follows:
748368-A
ERIAL
LONTALK™ A
DEVICE
command in your CONFIG.SYS file. The syntax for this driver is
DAPTER DRIVER PARAMETERS
December 1997
Rosemount Analytical
A-1
NGA 2000 DDE S
DEVICE=C:\NGASUITE\LDVSLTA.SYS /Pn /Dn /In /On /a
PARAMETER DESCRIPTION
/P
n
/D
n
/I
n
/O
n
/a
ERVER
Sets the serial communication port for which the Echelon SLTA is attached to. Valid settings are 1-4.
Defines the device unit number, where n is a number between 1-9. For the device driver to work with the
NGA DDE Server
, the setting
must be 1. This sets the size of the input buffer. Valid buffer sizes are from 2-
258. The default is 2. Each buffer is 255 bytes in size. This sets the size of the output buffer. Valid buffer sizes are from
2-258. The default is 2. Each buffer is 255 bytes in size.
A.2.2 PC LONTALK™ A
DAPTER DRIVER PARAMETERS
The PC LONTALK™ Adapter provides communication to the NGA digital network through the PC’s internal bus slot. This device driver must be loaded by a command in your CONFIG.SYS file. The syntax for this driver is as follows:
DEVICE=C:\NGASUITE\LDVPCLTA.SYS /Pn /Dn /Un /In /On
PARAMETER DESCRIPTION
/P
n
Sets the device address for which the Echelon PCLTA is attached to. Valid address settings are from 200-3FC(hex). This address must match the PCLTA I/O address set in the
/U
DIP switches at S1. Please see the
Communicator
n
Sets the PCLTA interrupt request number to n. The valid
document under PCLTA for more information.
NGA Network
interrupts are 5, 9, 10, 11, 12 or 15. The default IRQ setting is
15.
/D
n
Defines the device unit number, where n is a number between 1-9. For the device driver to work with the
NGA DDE Server
the setting must be 1.
/I
n
This sets the size of the input buffer. Valid buffer sizes are from 2-258. The default is 2. Each buffer is 255 bytes in size.
/O
n
This sets the size of the output buffer. Valid buffer sizes are from 2-258. The default is 2. Each buffer is 255 bytes in size.
DEVICE
,
A-2
December 1997
748368-ARosemount Analytical
LONTALK D
(
)
(
)
(
)
EVICE CONFIGURATIONS
A.3 ECHELON ROUTER
See the figure below for an illustration of how a multiple-Platform system might be configured in conjunction with the
NGA DDE Server
package.
PC Running
DDE Server
NGA 2000
Analyzer Module
Analyzer Module
Analyzer Module
Router
Standard Platform
rear view
Analyzer Module
Analyzer Module
Analyzer Module
Analyzer Module
Analyzer Module
Analyzer Module
Standard Platform
rear view
Analyzer Module
Analyzer Module
Analyzer Module
Analyzer Module
Analyzer Module
Analyzer Module
RouterRouter
Standard Platform
rear view
Analyzer Module
Analyzer Module
Analyzer Module
Note the daisy-chaining function of the Echelon Model 71000 Router, which interconnects with the Platform on one side and both routers and SLTAs on the other.
The router must be configured correctly. To configure the router, please see the document
748368-A
NGA Network Communicator
.
December 1997
Rosemount Analytical
A-3
NGA 2000 DDE S
N
OTES
ERVER
A-4
December 1997
748368-ARosemount Analytical
R
EFERENCE INFORMATION
B
B.1 REFERENCE SOURCES FOR MICROSOFT’S DDE
PROTOCOL.
The information listed here is a index of books and magazines which have information pertaining to the use and application of (DDE) services.
Microsoft Windows Dynamic Data Exchange
"
!
Microsoft Windows
"Windows DDE Protocol Definition."
"
!
Microsoft Windows
22.
"Programming Windows," Second Edition (Charles Petzold, Microsoft Press),
!
Chapter 17.
"Developing Windows 3.1 Applications with Microsoft C/C++," Second Edition
!
(Brent E. Rector, Sams Publishing).
Microsoft Systems Journal Articles - Vol. 5 No. 1 (January 1990), "Simplifying
!
Complex Windows Development Through the Use of a Client-Server Interface."
Software Development Kit Reference Volume 2," Chapter 15,
Software Development Kit Guide to Programming," Chapter
748368-A
December 1997
Rosemount Analytical
B-1
NGA 2000 DDE S
N
OTES
ERVER
B-2
December 1997
748368-ARosemount Analytical
ARRANTY
W
Goods and part(s) (excluding consumables) manufactured by Seller are warranted to be free from defects in workmanship and material under normal use and service for a period of twelve (12) months from the date of shipment by Seller. Consumables, glass electrodes, membranes, liquid junctions, electrolyte, o-rings, etc., are warranted to be free from defects in workmanship and material under normal use and service for a period of ninety (90) days from date of shipment by Seller. Goods, part(s) and consumables proven by Seller to be defective in workmanship and/or material shall be replaced or repaired, free of charge, F.O.B. Seller's factory provided that the goods, part(s) or consumables are returned to Seller's designated factory, transportation charges prepaid, within the twelve (12) month period of warranty in the case of goods and part(s), and in the case of consumables, within the ninety (90) day period of warranty. This warranty shall be in effect for replacement or repaired goods, part(s) and the remaining portion of the ninety (90) day warranty in the case of consumables. A defect in goods, part(s) and consumables of the commercial unit shall not operate to condemn such commercial unit when such goods, part(s) and consumables are capable of being renewed, repaired or replaced.
The Seller shall not be liable to the Buyer, or to any other person, for the loss or damage directly or indirectly, arising from the use of the equipment or goods, from breach of any warranty, or from any other cause. All other warranties, expressed or implied are hereby excluded.
IN CONSIDERATION OF THE HEREIN STATED PURCHASE PRICE OF THE GOODS, SELLER GRANTS ONLY THE ABOVE STATED EXPRESS WARRANTY. NO OTHER W ARRANTIES ARE GRANTED INCLUDING, BUT NOT LIMITED TO, EXPRESS AND IMPLIED WARRANTIES OR MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
Limitations of Remedy. SELLER SHALL NOT BE LIABLE FOR DAMAGES CAUSED BY DELAY IN PERFORMANCE. THE SOLE AND EXCLUSIVE REMEDY FOR BREACH OF WARRANTY SHALL BE LIMITED TO REPAIR OR REPLACEMENT UNDER THE STANDARD W ARRANTY CLAUSE. IN NO CASE, REGARDLESS OF THE FORM OF THE CAUSE OF ACTION, SHALL SELLER'S LIABILITY EXCEED THE PRICE TO BUYER OF THE SPECIFIC GOODS MANUFACTURED BY SELLER GIVING RISE TO THE CAUSE OF ACTION. BUYER AGREES THAT IN NO EVENT SHALL SELLER'S LIABILITY EXTEND TO INCLUDE INCIDENTAL OR CONSEQUENTIAL DAMAGES. CONSEQUENTIAL DAMAGES SHALL INCLUDE, BUT ARE NOT LIMITED TO, LOSS OF ANTICIPATED PROFITS, LOSS OF USE, LOSS OF REVENUE, COST OF CAPITAL AND DAMAGE OR LOSS OF OTHER PROPERTY OR EQUIPMENT. IN NO EVENT SHALL SELLER BE OBLIGATED TO INDEMNIFY BUYER IN ANY MANNER NOR SHALL SELLER BE LIABLE FOR PROPERTY DAMAGE AND/OR THIRD PARTY CLAIMS COVERED BY UMBRELLA INSURANCE AND/OR INDEMNITY COVERAGE PROVIDED TO BUYER, ITS ASSIGNS, AND EACH SUCCESSOR INTEREST TO THE GOODS PROVIDED HEREUNDER.
Force Majeure. Seller shall not be liable for failure to perform due to labor strikes or acts beyond Seller's direct control.
Rosemount Analytical
4125 E
AST LA PALMA AVENUE
• A
F
EBRUARY 1997 • 7485189-C • PRINTED IN USA
Rosemount Analytical Inc.
NAHEIM
, C
ALIFORNIA
92807-1802 • 714-986-7600 • FAX 714-577-8006
(blank)
IELD SERVICE AND REPAIR FACILITIES
F
Field service and repair facilities are located worldwide.
U.S.A.
To obtain field service on-site or assistance with a service problem, contact (24 hours, 7 days a week):
National Response Center
1-800-654-7768
INTERNATIONAL
Contact your local Rosemount Sales and Service office for service support.
FACTORY
For order administration, replacement Parts, application assistance, on-site or factory repair, service or maintenance contract information, contact:
Rosemount Analytical Inc.
Process Analytical Division
Customer Service Center
1-800-433-6076
RETURNING PARTS TO THE FACTORY
Before returning parts, contact the Customer Service Center and request a Returned Materials Authorization (RMA) number. Please have the following information when you call:
Model Number, Serial Number, and Purchase Order Number or Sales Order Number.
Prior authorization by the factory must be obtained before returned materials will be accepted. Unauthorized returns will be returned to the sende r, f re ight collect.
When return ing any product or compon ent that has been expo sed to a toxic, co rrosive or other hazardous material or used in such a hazardous environment, the user must attach an appropriate Material Safety Data Sheet (M.S.D.S.) or a written certification that the material has been decontaminated, disinfected and/or detoxified.
Return to:
Rosemount Analytical Inc.
4125 East La Palma Avenue
Anaheim, California 92807-1802
4125 E
AST LA PALMA AVENUE
• A
Rosemount Analytical Inc.
, C
NAHEIM
ULY 1997 • 748190-G • PRINTED IN USA
J
ALIFORNIA
92807-1802 • 714-986-7600 • FAX 714-577-8006
(blank)
Loading...