DDE - Schneider Electric

DDE - Schneider Electric
Dynamic Data Exchange
Summary
Dynamic Data Exchange (DDE) allows two applications to share the same data. The two
interacting programs are called the server and the client. The DDE server is the application that
provides data, and the DDE client is the application that receives the data from the server. This
exchange of information is referred to as a DDE link.
This section describes the standard elements of a DDE link and the procedures you should
follow for bringing data in and out of ION Enterprise through DDE. Procedures for establishing a
DDE link across a network are also provided. DDE can be particularly useful in integrating thirdparty devices with ION software.
Summary
DDE Fundamentals
Server
Topic
Item
Command Line Parameters
Importing DDE Data
Importing DDE Data into Vista
Importing DDE Data into the Virtual Processor
Exporting DDE Data
Export ION Meter Data to Excel
Networked DDE
Configuring a Networked Third-Party Server
More Information
DDE Fundamentals
You may configure ION software as a DDE client or a DDE server (or both for different pieces of
data). You can share power-monitoring information with third party applications, or share thirdparty data with ION software. DDE can be particularly useful in integrating third-party devices
with ION software.
Avoid using DDE to share data between two ION software applications. DDE is supported by
ION software for the purpose of sharing data with third-party applications.
ION software allows you to share real-time, alphanumeric data through a DDE link. These DDE
links are “hot links” - new information is transferred to the DDE client only when there is a
change in the source.
Waveform and logged data cannot be shared via DDE. If a link is made to a data type not
supported by ION software, an EXCEPTION TYPE error will appear in the client application.
To initiate a link, the client must request a Server name, followed by a Topic name, followed by
an Item name. These three names identify the exact source of the data in a server application
that is to be linked.
Server
The server name identifies the application that is acting as the DDE server. Typically this is the
name of the executable file without any file extension. The ION software DDE server is
“ion_link.” With ION Enterprise, the DDE server automatically runs as a Windows Service.
Topic
The topic name identifies a logical context for the data. In the case of file-based applications,
this is typically a file name. The topic name for the ION Enterprise DDE Server is the name of
the ION-compliant meter as it appears in the Management Console (i.e. Group.Meter).
Item
The item name identifies the specific data element used in the link. The item name for the ION
DDE Server is the data handle, in either hexadecimal (prefaced by 0x) or decimal, of the
register containing the data (i.e. the ION handle “0x5800” is the meter reference for “Vln a”).
As mentioned earlier, the client must request a Server name, followed by a Topic name,
followed by an Item name, in order to initiate a link. For example, a DDE Link from ION's DDE
Server to a DDE Client may look like this: =ION_LINK|ION7600.Substation3 ! '0x5800'
With ION software acting as the provider of shared information, the request for data must
come from the client application. Every DDE software package has a unique syntax for
specifying a DDE link. Refer to the documentation of your client application for specific details.
No data is provided to the client if there is no change in the source.
NOTE: Some Windows applications offer a command called Paste Link (under the edit menu)
that is often used for DDE linking. Be aware that you cannot use this command to display ION
data in your application because the ION information is not file-based.
You can stop this ION service like any other Windows service. When DDE Server is started,
which it is configured to do automatically, it spawns the Windows Network DDE services.
Command Line Parameters
Parameter
-service
-unregserver
-x
Description
This is used for Windows NT Service
registration; the DDE Server is registered
as an NT service.
This parameter deletes the ION DDE
server.
This is the update period. The command
line parameter -xn is used. This is the time
delay between update requests, where n is
a decimal # of seconds in the range 0…
3600 (i.e. -x240 gives a 4-minute delay).
The default value of this parameter is -x5
(a 5-second delay).
Importing DDE Data
The following section provides instructions on importing data in the Vista component of ION
Enterprise and importing data into the ION Virtual Processor.
Importing DDE Data into Vista
By default, Vista acts as a built in DDE Client. As long as a DDE server is available, you can
configure a link to any external data source that is made available by this server.
As an Example, Microsoft Excel can act as a DDE server; this is demonstrated in the following
procedure:
1. Start Excel.
2. Create a new numeric object within Vista.
3. Right-click the object and select Properties.
4. Select the Link tab, choose the DDE radio button, and then click the Edit Link button.
5. Specify the following information:
•
Server: excel
•
Topic: sheet1 - the general location of the data to be imported
•
Item: r2c2 - the specific data to be read
6. Click OK to accept the configuration. Notice that the NUMERIC object shows a Link Created
message.
7. Enter — in Excel — a number in Row 2 Column 2 of Sheet 1. It helps to reduce Excel's
window size and place on top of Vista so that changes can be observed more easily.
If the Vista Numeric Object does not update the diagram, you may need to close and reload the
diagram to accept the link.
Importing DDE Data into the Virtual Processor
If you wish to perform operations with data brought into ION software from a third-party
server, the Virtual Processor can also be used to import the data and potentially record -- or
otherwise manipulate -- the data as if it were a standard ION data value.
The ION Virtual Processor service must interact with the desktop for DDE to work (see “Using
DDE Import Module” on page 22). Alternatively, the Virtual Processor can be run as an
application instead of a service.
The Virtual Processor can be configured with Designer, as summarized below:
1. Start Designer and open the Virtual Processor Node Diagram.
2. Create a DDE Input module, access its Setup registers, and enter the correct Server, Topic,
and Item names.
3. Configure the Virtual Processor to perform further operations on the imported data by
linking the DDE Input module to other modules (which may also have to be created and
configured).
4. “Send and Save” the new Virtual Processor Node Diagram so that your changes take effect.
5. Open Vista and link a diagram object to the desired output register in the Virtual Processor
node.
Exporting DDE Data
You can share data from your power-monitoring network with third-party applications through a
DDE link by utilizing the ION_Link software component as the ION DDE Server service. With
ION Enterprise, the DDE Server runs as a Windows Service automatically.
With ION_Link acting as the shared information provider, the data request must come from the
third-party application. Every DDE software package has a unique syntax for specifying a DDE
link; however, this syntax always utilizes the Server, Topic and Item values. Refer to the
documentation of your client application for specific details.
Export ION Meter Data to Excel
As an example of the ability to export data, we can once again use Excel to, this time, act as a
DDE client. With the DDE Server (ion_link) running, open Excel and do the following:
1. Choose a cell where you would like to insert the ION meter data.
2. Input the following formula with careful recognition of the exact syntax:
•
=ion_link|GroupName.MeterName!'0x5808' (the ION meter value for Ia)
•
Server: ion_link
•
Topic: GroupName.MeterName
•
Item: 0x5808
The pipe character | the exclamation mark ! and the single quotes ' ' are part of the Excel
syntax.
Experiment by adding additional cells with different Items for different real-time meter values.
Use the ION Handles manual in the Power Library to get a list of all of the possible handle
references.
If the Communications Server linked to the device or Virtual Processor node is lost, the
information shared by the DDE Server will cease to be updated. To re-establish communication
between the DDE Server and the node, you may have to restart the Communications Server
(and the Virtual Processor, if applicable). Remember that no data is provided to the client if
there is no change in the source.
Networked DDE
DDE can be used to share data between two applications running locally on the same machine,
or it can operate across a network where the client and server are on separate workstations.
The terms “DDE client” and “DDE server” refer to application data - not the workstations
themselves. It is entirely possible to have a DDE application (including ION software) behave as
a client and a server at the same time for different pieces of data.
If the Network DDE Service is not started on your workstation, you must start it using the
Services application in Control Panel. For detailed information refer to your Windows or thirdparty documentation.
Once the workstation running the ION_Link DDE server has been configured, and network DDE
services have been started on the client workstation, you may create a request for data in the
client application. Every DDE software package has a unique syntax for specifying a DDE link.
Refer to the documentation of your client application for specific details.
Configuring a Networked Third-Party Server
1. Start Network DDE services through the Services application in Control Panel.
2. Scroll down the list of services to find Network DDE. If it is not already started, select it and
click the Start button.
You must create a networked DDE share for the third-party server application before a
networked DDE link can be established. Refer to your Windows and third party software
documentation for details on creating the networked DDE shares required.
For information on using DDE Share in Windows, run DDESHARE.EXE and click the Help menu.
The only significant difference between the local and the networked DDE scenarios is that the
Server names must first reference the Server workstation name. For example, if the server
application is Microsoft Excel and the name of the server workstation is SUN; \\SUN\excel
would be the correct Server name.
More Information
•
ION Enterprise 5.0 Online Help
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement