Reference Manual
748384-C
September 2003
1-40 Introduction
Rosemount Analytical Inc. A Division of Emerson Process Management
NGA2000 Reference
c. Details
Variables are continuously updated by their
source modules. If the module has been
bound to another, they will be updated onto
the network and sent to whichever nodes it
has been bound to, if only the control mod-
ule.
Certain LON devices can listen in to this
traffic, but the DDE servers provided either
by Echelon or Rosemount Analytical are not
capable of doing this, they have to specifi-
cally request data. They also need to have
a variable data base so as to be able to un-
derstand the data. This has to be provided
externally to the Echelon server by the
Rosemount Analytical MAKE_API program;
the Rosemount Analytical server makes its
own database automatically.
If analyzers are used with no control mod-
ule, it is helpful to disable their autonomous
outputting of data. They have normally
been checked out with a control module,
and therefore think that it is still there, and
so they try to communicate with it. You can
disable this by running the MAKE_API pro-
gram with the switch "-c", i.e. MAKE_API
-c. This will improve the performance of
such networks.
The Rosemount Analytical DDE server pro-
gram provides a number of features that are
optimized for the NGA system, and thus is
the preferred solution. In particular it re-
ports the population and identity of modules
on the network, allowing applications to
configure themselves automatically and re-
moving the need for user to understand
what is happening.
The following is a brief explanation of how
to use the Rosemount Analytical DDE
server program.
DDE is a Windows feature that allows pro-
grams to communicate with each other. It is
organized as a "conversation", with topics
and data. You start a conversation, deter-
mine a topic and request or write (Poke in
Visual Basic, or Excel) data.
d.
Using Excel with the DDE Server
Basic DDE Points In Excel
Excel can either read variables directly into
the spreadsheet using a formula, or it can
read them by requesting the data in a
macro. It can only write into a variable us-
ing a macro.
Macros in Excel (v5.0 or later) are written in
a kind of Visual Basic (called VBA, Visual
Basic for Applications). The examples
given here are written in that language.
Please see the Microsoft documentation for
definitions of the terms used in the following
paragraphs.
When reading a variable, the result is re-
turned as an array of characters. If this is
written into a cell in a worksheet, it is auto-
matically turned into a number or string or
whatever is appropriate - except for dates,
which are helpfully translated into the date
serial number. You can translate it back by
formatting the cell as a date.
If you try to assign a DDE request into a
VBA variable, unless you declare the vari-
able to be of type variant, or declare it to be
an array of strings, it will give you an error.
If you want the variable to be a number, or a
string, you have to convert it in some way.
The easiest way is to write it into a work-
sheet cell, and then read it back. Otherwise
you can use a function to do it, an example
of which is
"LON-into-string0" in the excel spreadsheet
examples.
The only way to write (or poke) a variable is
to write a spreadsheet cell. You cannot
write a value of a cell, or a variable. If there
'is an error in defining the cell, the poke
function will fail and it will not tell you why.
The cell must be formatted as text, you
cannot write a number or a date.