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

Using DDE

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

Using DDE

Proprietary Notice The manual and software contain confidential information which represents trade secrets of GE Fanuc International, Inc. and/or its suppliers, and may not be copied or disclosed except as provided in the license with GE Fanuc International, Inc. The information in this manual is subject to change without notice and should not be construed as a commitment by GE Fanuc International, Inc. GE Fanuc International, Inc. assumes no responsibility for any errors that may be in this document. 2003 GE Fanuc International, Inc. ALL RIGHTS RESERVED.

Trademarks 2003 GE Fanuc International, Inc. All rights reserved. Microsoft is a registered trademark of Microsoft Corporation. All other brands or names are property of their respective holders. iFIX Version 3.5 - 07.03

Contents
Why You Should Read This Manual ..................................................................................................ix 1. DDE Overview .................................................................................................................................. 1 iFIX DDE Client Support .......................................................................................................... 1 iFIX DDE Server Support ........................................................................................................ 2 2. Understanding the DDE Address .................................................................................................. 5 DDE Addressing ...................................................................................................................... 5 NetDDE Addressing ................................................................................................................ 6 3. Using DDE Client Support .............................................................................................................. 9 Understanding DDE Client Support ......................................................................................... 9 DDE I/O Driver Configuration ................................................................................................ 10 Using DDE Client Support in the Database ........................................................................... 10 Using DDE Client Support in Input Blocks ................................................................ 11 Using DDE Client Support in Output Blocks ............................................................. 11 Using DDE Client Support in Digital Blocks .............................................................. 12 Sharing Data Between iFIX DDE Databases ............................................................ 12 Troubleshooting DDE Client Support in the Database .......................................................... 12 DDE Client Task Messages ...................................................................................... 13 DDE Client Task Dialog Box ..................................................................................... 13 DDE Client Task Items ............................................................................................. 19

Contents

iii

4. Getting Started Using the DDE Server ........................................................................................ 21 Understanding the DDE Server .............................................................................................. 21 DDE Server Configuration ..................................................................................................... 22 Configuring DDE Server Support ............................................................................. 22 Configuring NetDDE Server Support ........................................................................ 22 iFIX DDE Addresses............................................................................................................... 27 iFIX DDE Local Addresses ....................................................................................... 27 iFIX NetDDE Addresses ........................................................................................... 28 Starting DDE .......................................................................................................................... 28 Setting the Update Time ........................................................................................... 29 5. System Messages ......................................................................................................................... 31 6. Startup Messages ......................................................................................................................... 33 7. Communication Messages .......................................................................................................... 35 Index ................................................................................................................................................... 37

iv

Using DDE

Figures
Figure 1-1: Figure 1-2: Figure 3-1: Figure 3-2: Figure 3-3: Figure 3-4: Figure 4-1: Figure 4-2: Figure 4-3: Figure 4-4: Figure 4-5: DDE Client Support in the Database......................................................................... 2 DDE Server Support ................................................................................................. 3 DDE Client Illustration ............................................................................................... 9 DDE Client Task Dialog Box ................................................................................... 14 Active Advise Loops Dialog Box ............................................................................. 17 Setup Dialog Box ................................................................................................... 18 DDE Server Illustration............................................................................................ 21 DDE Shares Icon .................................................................................................... 23 DDE Shares Dialog Box.......................................................................................... 24 DDE Shares Icon .................................................................................................... 26 Trusted Share Properties Dialog Box...................................................................... 26

Figures

vi

Using DDE

Tables
Table 3-1: Table 4-1: Table 4-2: Table 4-3: Table 5-1: Table 6-1: Table 7-1: DDE Client Task Items............................................................................................ 19 Real-Time Data Syntax ........................................................................................... 27 NetDDE Real-Time Data Syntax............................................................................. 28 Update Time Options .............................................................................................. 29 DDE System Messages .......................................................................................... 31 DDE Client Startup Messages ................................................................................ 33 Communication Messages...................................................................................... 35

Tables

vii

viii

Using DDE

Why You Should Read This Manual


The Using DDE manual is intended for iFIX software users who need to incorporate DDE data in the process database. Reference Documents For related information about iFIX, refer to the following documents: Trending Historical Data Building a SCADA System Setting up the Environment Implementing Alarms and Messages

Why You Should Read This Manual

ix

Using DDE

1. DDE Overview
Dynamic Data Exchange (DDE) is a form of communication that uses shared memory to exchange data between applications. iFIX supports Microsofts DDE. Your iFIX DDE client and server support allows you to: Pass process information into other applications such as MRP (Materials Requirements Planning) or SPC (Statistical Process Control) programs. Incorporate data from other applications into the process database to perform alarming and trending.

DDE differs from the clipboard method of data transfer in that it is typically used for ongoing updates. Data is updated automatically between applications, without user intervention. When sharing data, the application that requests the information is referred to as the client and the application that supplies the data is considered the server. An application can be a DDE client, a DDE server, or both a DDE client and a DDE server. The syntax used to reference the data is called a DDE address. Each program that uses DDE as a form of transferring data uses a specific DDE address to reference its data. Refer to the Understanding the DDE Address chapter for more information about the addressing syntax used to transfer data. iFIX provides both client and server support. DDE server support allows you to pass process information from iFIX to other applications for analysis. DDE client support allows you to pass information from other applications into iFIX for use in the database.

iFIX DDE Client Support


iFIX DDE client support lets you use data from other applications in your process database. It allows you to read from and write to DDE addresses. Using the DDE I/O Driver and a DDE address in your block configuration, you can incorporate

Chapter 1. DDE Overview

information in your process database from another application, a DDE device driver, or another SCADA node. Because the data is available in the database, you can incorporate the data in chains and perform alarming and trending. The following figure illustrates how data is transferred from a DDE server application, in this case Excel, to an iFIX database block.

Excel Shift Report 1. The user enters a new value in the spreadsheet. 2. The DDE I/O Driver automatically transfers the data from the server to the client. 3. The database block updates with the new value. Temperature PPM 65 106

DDE I/O Driver iFIX Process Database DI DO AO AI 65

Figure 1-1: DDE Client Support in the Database For more detailed information on how to configure your database blocks to use DDE addresses, refer to the Using DDE Client Support chapter and the Building a SCADA System manual.

iFIX DDE Server Support


iFIX DDE server support lets you transfer data from your iFIX database to other DDE client applications. The following figure illustrates how a DDE server application, in this case Excel, is updated with real-time data to provide timely reports.

Using DDE

iFIX Process Database 1. The I/O device updates the iFIX database with new values. 2. The DDE server automatically transfers the data to the client as the value changes. Excel 3. The pre-defined links update with the latest process information. Shift Report Temperature PPM 57 106 DI DO AO AI 57

DDE Server

Figure 1-2: DDE Server Support

Chapter 1. DDE Overview

Using DDE

2. Understanding the DDE Address


A DDE client requests data from a DDE server using a DDE address. The syntax used in the DDE address is different depending on whether the server is local or remote. A local DDE server is a DDE application that is located on the same computer as the client application. A remote DDE server is a DDE application that is located on a different computer than the client application. The following sections describe the addressing used by both local and remote DDE servers.

DDE Addressing
A local DDE server is accessed using a three part address know as an ATI, or a remote reference formula if you are using Excel. The address consists of the application, the topic, and the item. The documentation for the DDE server that you are using provides the specific syntax you must use in order to access its data. The following is a general description of the parts of a DDE address: Application the name of the DDE server where the data resides. In many cases, the software program uses its name as the application name. Topic the name of the group of data on the DDE Server. The topic name can be the spreadsheet or file name containing the data to access. Item the individual piece of data to transfer. The item name depends on the method by which data is stored in the server application. IMPORTANT: If the Item name contains a hyphen (-), you must enclose it in single quotes. Example To access data in an Excel workbook, use the following syntax:
=EXCEL|[FILE.XLS]SHEET1!R1C1

Chapter 2. Understanding the DDE Address

Excel allows you to create multiple sheets within a workbook. In this example, the DDE address retrieves the value in the first row and column of SHEET1 in the FILE.XLS workbook. NOTE: iFIX can access any third-party software package that uses DDE addressing. Refer to your third-party software documentation for more information on the proper DDE address for your software package. I/O addresses are used in process database blocks. When entering an I/O address, the application name can use up to 26 characters, the topic name can use up to 20 characters, and the item name can use up to 79 characters. If the item name contained a hyphen (-), you must enclose it in single quotes. For example:
=DMDDE|DATA!NODE1.REPORT-TEST.F-CV

NetDDE Addressing
iFIX allows you to use the NetDDE server and client support that is provided as part of your operating system. NetDDE allows a DDE-compliant application to request and receive data from another DDE-compliant application on a remote node within the network. If you are accessing information on a remote DDE server using NetDDE, the DDE address syntax is different from the addressing described in the DDE Addressing section. The NetDDE address consists of the following four parts:
=\\Computername\NDDE$|DDEShare.DDE!Item

Computername the computer or workstation name of the server node. This name is defined in the Computer Name field of the Network settings, accessed by clicking the Network icon in the Control Panel and selecting the Identification tab. NDDE$ the reserved name that indicates that NetDDE is used to transfer data. DDEShare the DDEShare name that you configure for each application and the topic with which you will communicate. The DDEShare name is an alias that you define. Make sure you include .DDE in the share name when you specify the address. For more information on defining DDEShare names, refer to the DDE Server Configuration section.

Using DDE

Item the individual piece of data to transfer. The item name depends on the method by which data is stored in the server application. IMPORTANT: If the Item Name contains a hyphen (-), you must enclose it in single quotes. Example Assume you have an Excel workbook, FILE.XLS, with two worksheets, SHEET1 and SHEET2. Also assume a DDEShare is set up for each worksheet. To access information in SHEET2 of the FILE.XLS workbook, use the following syntax:
=\\NODE1\NDDE$|$SHIFT2.DDE!R1C1

Where NODE1 is the remote server node's computer name, NDDE$ indicates that NetDDE is used, $SHIFT2.DDE uses the DDEShare name for SHEET2, and R1C1 uses the first column and row. When entering an NetDDE address, up to 26 characters can be used for the computer name and the reserved name NDDE$, up to 20 characters can be used for the DDEShare name, and up to 79 characters can be used for the item name. If you are trying to access iFIX data from an Excel spreadsheet using NetDDE, you must enclose the Computer Name and NDDE$ keyword, and the DDEShare name in single quotes. For example:
=\\NODE1\NDDE$|DMDATA.DDE!SCADA1.AI1.A_CV

If the Item Name contains a hyphen (-), you must enclose it in single quotes. For example:
=DMDDE|DATA!NODE1.REPORT-TEST.F_CV

Chapter 2. Understanding the DDE Address

Using DDE

3. Using DDE Client Support


DDE client support is available in iFIX. This chapter explains how to configure DDE client support and how to troubleshoot your DDE connections.

Understanding DDE Client Support


DDE client support allows you to pass data into iFIX for use in the process database. If you want to incorporate DDE data into your process database, you must purchase the DDE I/O Driver. The following figure illustrates how your iFIX DDE client support works with application programs that use Dynamic Data Exchange.

DDE Server
AI DO AO DI

iFIX Process Database

Figure 3-1: DDE Client Illustration NOTE: If your source data contains multiple fields, such as spreadsheet data, iFIX only reads data up to the first carriage return and line feed. All other data is not used.

Chapter 3. Using DDE Client Support

DDE I/O Driver Configuration


To use DDE data in the process database, you must purchase and configure the DDE I/O driver. The DDE I/O driver can be installed as one of your I/O driver selections during software installation. The DDE driver requires the DDE Client Task to function properly. If you add the DDE driver during software installation, and an SCU file exists, the DDE Client Task, DDECLNT.EXE, is not added to the configured task list in the SCU. Once installation is complete, ensure that the DDE Client Task has been added to the configured task list in the SCU. If it does not appear, add the DDE Client Task to your configured task list manually. Refer to the Setting up the Environment manual for instructions on adding a task to the configured task list. Alternatively, you can delete the DDE driver from the SCU and then add it back manually. When you add the DDE driver manually, the DDE Client Task is automatically added for you. For more information on configuring iFIX, refer to the Setting up the Environment manual.

Using DDE Client Support in the Database


iFIX DDE client support allows you to read and write information from another DDE application, a DDE device driver, or another SCADA node using the DDE I/O driver. Because the data is available in the process database, you can incorporate the data into your strategy to: Pass data in chains. Alarm on DDE data. Trend DDE data.

You can enter a DDE address as an I/O address in any I/O-based database block. The data updates on a time-based or exception-based rate depending upon how you configure the scan time in the block. Do not use a one-shot scan time when you are configuring a block to use DDE data.

10

Using DDE

The following example demonstrates how to configure the Hardware Specifications section of an I/O-based block to access DDE information:
Device: DDE Hardware Options: I/O Address: =EXCEL|[FILE.XLS]SHEET1!R1C1 Signal Conditioning:

In this example, the device driver entry (DDE), indicates that the source of the data is a DDE server. The DDE address entered into the I/O Address field requests data from the first row and column of Sheet1 of the Excel workbook, FILE.XLS. Signal conditioning is not performed on DDE data and the Hardware Options field is not used. NOTE: Your operating system's International Number Format must be configured identically in the nodes sharing data. All iFIX applications use this configuration. For more detailed information on how to configure your database blocks, refer to the Building a SCADA System manual.

Using DDE Client Support in Input Blocks


You can include DDE data in the database using input blocks, such as the Analog Input block. The standard alarming configuration in the blocks can be used to trigger alarms. Because the information is stored in the database, it can be passed in a chain and used to perform both historical and real-time trending.

Using DDE Client Support in Output Blocks


You can write to DDE locations using output blocks, such as the Analog Output block. By addressing the output block, as shown in the previous example, the output is sent to the DDE address when the output block is processed. NOTE: When using Analog Register and Digital Register blocks, you cannot use offsets greater than zero.

Chapter 3. Using DDE Client Support

11

Using DDE Client Support in Digital Blocks


Information that is brought into iFIX using the DDE I/O driver is in ASCII format. This can present a problem when using Digital Input blocks since the ASCII version of the blocks current value is a user-definable text string. In order for the value to be properly stored in the database, ensure that the values you use in the DDE server application are the same as the OPEN and CLOSE labels you configured in the destination database block. The Multistate Digital Input block uses OPEN and CLOSE as its defaults for the 0 (zero) and 1 (one) values, respectively.

Sharing Data Between iFIX DDE Databases


Using the DDE I/O driver and your iFIX DDE server, you can transfer data between SCADA nodes. This method automatically updates both databases when information changes, eliminating unnecessary duplicate connections to an I/O device. For example, you can configure two SCADA nodes, NODE1 and NODE2, to share data. Using this configuration, the blocks in NODE2 update when the data updates in NODE1. This allows you to use the same source information from an I/O device in two different databases without creating two separate connections to the I/O device. NOTE: Using your iFIX DDE server, only ASCII fields (A_) can be used to write data. Both ASCII (A_) and Floating Point (F_) fields can be used to read data. For more information on your iFIX DDE server and DDE addressing for iFIX, refer to the iFIX DDE Local Addresses section.

Troubleshooting DDE Client Support in the Database


iFIX provides the following methods for accessing troubleshooting information about your DDE client communication sessions: DDE Client Task Messages. DDE Client Task Dialog Box. DDE Client Task Items.

12

Using DDE

DDE Client Task Messages


The iFIX DDE Client Task can be configured to display messages on startup and during run-time. Messages generated by the DDE Client Task are sent to all configured message destinations. The DDE Client Task displays the following types of messages: Startup problems. Failure to establish a DDE conversation. Failure to establish a DDE advise loop. Failure to complete an output.

Refer to the Startup Messages and Communication Messages chapters for a complete listing of the messages generated by the DDE Client Task. For more information about configuring message destinations and filtering, refer to the Implementing Alarms and Messages manual. NOTE: iFIX messages are not sent to the Alarm Summary Link. They can be configured to go to a file, a printer, or the Alarm History window. For more information about configuring startup tasks, refer to the Setting up the Environment manual.

DDE Client Task Dialog Box


The DDE Client Task dialog box displays statistical information about your DDE client sessions. This information can be used to: Monitor DDE updates and outputs. Enable and disable DDE client messages. View run-time error messages.

When you maximize the DDE Client Task, the DDE Client Task dialog box appears, as shown in the following figure.

Chapter 3. Using DDE Client Support

13

Figure 3-2: DDE Client Task Dialog Box This dialog box contains several counters and error messages that you can use to troubleshoot your DDE connections. The counters are reset to the number zero (0) or the word None under the following conditions: Starting the DDE Client Task. Reloading the database. Resetting the counters manually using the Reset button.

The following list describes the fields and buttons on the dialog box:

14

Using DDE

Runtime Error displays any problem that caused the DDE Client Task to suspend its operations. Most run-time errors occur during DDE Client Task startup and indicate a resource or memory problem. Conversations DDE conversations are the connections to a DDE server through the application and topic portions of the DDE address. If you are using NetDDE for communication, the application column displays the computer name, and the topic column displays the DDEShare name of the NetDDE address. Active displays the number of currently active DDE conversations. NOTE: If you are using NetDDE to communicate between two iFIX nodes and the DDE server software is not running, the number of active conversations toggles between one and zero. This value first indicates an active session with local NetDDE. The value then changes to reflect the remote NetDDE conversation status as inactive. Failed displays the number of failed attempts to establish a DDE conversation since the DDE Client Task was started or reset. This number increases if the DDE server is not active, network problems are present, or the topic is bad. Last Error displays the last error that occurred when trying to establish a DDE conversation. Refer to the Communication Messages chapter for a complete listing of the messages that can appear in this field. Advise Loops An advise loop is a connection to an individual item. You may have multiple advise loops within one conversation. Active displays the number of currently active advise loops. Failed displays the number of failed advise loops since the DDE Client Task was started or reset. This number increases if the item is incorrect. Last Error displays the last error that occurred trying to establish an advise loop. Refer to the Communication Messages chapter for a complete listing of the messages that can appear in this field.

Chapter 3. Using DDE Client Support

15

Outputs Successful displays the number of successful writes from iFIX to the DDE application since the DDE Client Task was started or reset. Failed displays the number of failed writes from iFIX to the DDE application since the DDE Client Task was started or reset. Last Error displays the last output-related error that occurred. Refer to the Communication Messages chapter for a complete listing of the messages that can appear in this field. Buttons Pause/Resume allows you to pause or resume updating all of the counters and errors in the dialog box. When you select Pause, the button toggles to Resume and the counters stop updating. When you select Resume, the button toggles to Pause and the counters update with the additional counts that occurred during the pause. Reset resets all the fields in the dialog box. The counters are set to zero (0) and the last error fields are reset to None. Set Messages On/Off enables or disables the sending of DDE messages to the message destinations. These messages can be used to troubleshoot your DDE connections. See the DDE Client Task Messages section for more information on how to enable messages using the /M command line parameter. Show Advise Loops displays the Active Advise Loops dialog box shown in the following figure.

16

Using DDE

Figure 3-3: Active Advise Loops Dialog Box This dialog box displays all active advise loops on this node. Each currently active DDE address, or advise loop, is listed. The dialog box also displays the number of updates that have been recorded for each active advise loop in the Exceptions column. Setup allows you to modify the Access Period and Maximum Links configuration parameters for the DDE Client Task. The following dialog box appears when you select Setup.

Chapter 3. Using DDE Client Support

17

Figure 3-4: Setup Dialog Box Maximum Links defines the maximum number of DDE addresses or links that can be active on this node. The default is 100. The valid range of entries is 1 to 10000. A warning message is sent to all configured message destinations when all slots are in use. If this occurs, additional linked blocks do not go on scan or send outputs. NOTE: If you modify the Maximum Links value, you must restart iFIX for the change take effect. Currently in Use displays the number of DDE addresses or links that are currently active in the node. This number can be compared to the number of Maximum Links for optimization purposes. Access Period controls the length of time that advise loops remain active after the last request for data. The access period is defined once for all of the advise loops on the node. The access period is defined by selecting Enable and entering an access time. The default access period is 30 seconds. The valid range of entries is 0 to 172800 seconds. Selecting Disable allows advise loops to remain open indefinitely. The Setup dialog box configuration is saved in the DDE Client Task initialization file, DDECLNT.INI, each time OK is selected.

18

Using DDE

NOTE: Advise loops to blocks with a scan time, such as Analog Input blocks, do not become inactive regardless of the access period. Save to File saves the current counter values, error messages, and active advise loops into a text file. When you select Save to File, the Save As dialog box appears and you can define the filename and path of the text file.

DDE Client Task Items


DDE Client Task Items can be accessed by reading the information into tags. The data can also be used in the database to perform alarming, trending, and calculations. The latest error messages can be read using Text blocks. For more information on using DDE client information in the database, refer to the Using DDE Client Support in the Database section. The following example demonstrates how to build the DDE address syntax for DDE Client Task Items:
=DDECLNT|DIAG!ACTIVE-CONV

where DDECLNT is the Application name, DIAG is the Topic name, and ACTIVECONV is the Item name. The following table lists the DDE Client Task Item names. The Application and Topic names are the same for each item. The database block type you would build to include the data in the database and a description of the item are also listed. For more information about each item, refer to the DDE Client Task Dialog Box section. Table 3-1: DDE Client Task Items Item Block Type AI AI TX Description

ACTIVE-CONV FAILED-CONV LAST-CONV-ERROR

Displays the number of currently active conversations. Displays the number of failed conversations. Displays the last error that occurred while trying to establish a conversation.

Chapter 3. Using DDE Client Support

19

Table 3-1: DDE Client Task Items (continued) Item ACTIVE-ADV FAILED-ADV LAST-ADV-ERROR SUCC-OUTPUT FAILED-OUTPUT LAST-OUTPUT-ERROR RESET RUNTIME-ERROR Block Type AI AI TX AI AI TX DO TX Description Displays the number of currently active advise loops. Displays the number of failed advise loops. Displays the last error that occurred while trying to establish an advise loop. Displays the number of successful writes to a DDE server. Displays the number of failed writes to a DDE server. Displays the last error that occurred while writing to a DDE server. Resets the counters and messages to zero (0) or None when any value is written to the block. Displays the message of any problem that caused the DDE Client to suspend its operations.

20

Using DDE

4. Getting Started Using the DDE Server


This chapter describes the DDE Server and how to start creating reports using the DDE Server and any DDE compliant application.

Understanding the DDE Server


The DDE Server allows you to pass real-time and historical data from iFIX to any other DDE compliant application. The following figure illustrates how your iFIX DDE server works with application programs that use Dynamic Data Exchange.

iFIX

Process Database

DDE Server

DDE Client Application


Figure 4-1: DDE Server Illustration

Chapter 4. Getting Started Using the DDE Server

21

DDE Server Configuration


To use your iFIX DDE server software, you need to ensure that your PC is set up correctly with the correct versions of software. This section explains how to configure your iFIX node to use DDE and NetDDE server software.

Configuring DDE Server Support


The following software must be installed on your computer to use a DDE client application with the DDE server: Microsoft Windows. DDE-compliant application used to request and receive data from iFIX. iFIX software.

Configuring NetDDE Server Support


iFIX supports the NetDDE feature of your operating system. To configure NetDDE server support on your iFIX node, your operating system's environment must have both a NetDDE server node and a client node. These nodes must contain the following applications:

NetDDE Server Node iFIX software iFIX DDE server One or more configured DDEShares

NetDDE Client Node DDE-compliant application used to request and receive data from iFIX.

NetDDE addresses use DDEShare names to access a DDE application on a remote server. In order to create a DDEShare on a Windows NT or Windows 2000 node, you need to use the DDEShare utility. This utility lets you create each DDEShare you need by assigning different levels of permissions to the owners you select.

22

Using DDE

When you select a permission (for example, read-access), the owners you have selected are granted that type of permission for the specified DDEShare. For example, assume you create a DDEShare called $TEST. Also assume you assign the owners John and Fred to the share. If you select read-access for these owners, when either John or Fred access the share $TEST, they are granted read-access only. To create a DDEShare and assign permissions on a Windows NT or Windows 2000 node: [1] [2] [3] [4] Select Run from the Windows Start menu. The Run dialog box appears. Enter DDESHARE in the Open field. Click OK. The DDE Share on \\NT dialog box appears. Click the icon shown below:

Figure 4-2: DDE Shares Icon The DDE Shares dialog box appears. [5] Click the Add a Share button and complete the DDE Share Properties dialog box as shown below:

Chapter 4. Getting Started Using the DDE Server

23

Figure 4-3: DDE Shares Dialog Box NOTE: The values shown in the dialog box above are for real-time data. To set up a DDEShare for historical data, complete the dialog box with the values in column two of the following table. To create a DDEShare for a DDE application running on a server to provide iFIX with data, in this example Excel, complete the dialog box with the values in column three. Once you have created this alias, you can use $NETEXCEL in any of your NetDDE addresses

24

Using DDE

to search for the requested data in SHEET1 of the workbook, FILE.XLS. You must create a different DDE Share name for each Excel sheet and workbook combination that you need to use.

Share Name Application Name, Old Style Topic Name, Old Style Application Name, New Style Topic Name, New Style

$DMHTR DMDDE HTR DMDDE HTR

$NETEXCEL EXCEL [FILE.XLS]SHEET1 EXCEL.SHEET.5 FILE.XLS

[6]

Click the Permissions button. The DDE Share Name Permissions dialog box appears. Select the users and groups you want to have access to the DDEShare from the Name list. Select the type of access you want the selected users to have from the Type of Access list. Click OK twice.

[7]

[8]

[9]

After you assign permission for each DDEShare you create, you need to set the trust for the share. A trusted share lets an application share data and gives the currently logged-in owner rights to access shared applications. If several operators locally log into the same computer over the course of a day, you need to assign trusted shares for each operator individually. To set the trust for a DDEShare: [1] [2] [3] Select Run from the Windows Start menu. The Run dialog box appears Enter DDESHARE in the Open field. Click OK. The DDE Share on \\NT dialog box appears.

Chapter 4. Getting Started Using the DDE Server

25

[4]

Click the icon shown below:

Select this icon to create a DDE Share

Figure 4-4: DDE Shares Icon The DDE Shares dialog box appears. [5] [6] Select a share name from the DDE Shares list and click the Trust Share button. Complete the Trusted Share Properties dialog box as shown below:

Figure 4-5: Trusted Share Properties Dialog Box [7] Click the Set button and then click OK.

26

Using DDE

iFIX DDE Addresses


You can use iFIX data in other DDE client applications whether they reside on the local computer or a remote computer. The following subsections describe the DDE addresses you need to use to access iFIX data.

iFIX DDE Local Addresses


DDE addressing syntax is used to transfer data from iFIX to other applications on the same computer. Refer to the following table for the syntax used to transfer real-time data. Table 4-1: Real-Time Data Syntax String Part Application (or Service) name Topic name Item name Real-time DMDDE

DATA Node:Tag.Field (A_)

Real-Time Data Syntax An example of the syntax used to transfer real-time data is:
=DMDDE|DATA!NODE1.AI1.A_CV

where DMDDE is the Application or Service Name, DATA is the Topic Name, and NODE1.AI1.A_CV is the Item Name. If the Item Name contains a hyphen (-), you must enclose it in single quotes. For example:
=DMDDE|DATA!NODE1.REPORT-TEST.F_CV

Chapter 4. Getting Started Using the DDE Server

27

iFIX NetDDE Addresses


NetDDE addressing is used to access real-time data in iFIX. Refer to the following table for the syntax used to transfer real-time data. Table 4-2: NetDDE Real-Time Data Syntax String Part Application (or Service) name Topic name Item name Real-time \\Server Name\NDDE$

$DMDATA.DDE Node:Tag.Field (A_)

NetDDE Real-Time Data Syntax An example of the syntax used to transfer real-time data is:
=\\ABC\NDDE$|$DMDATA.DDE!NODE1.AI1.A_CV

where ABC is the computer or workstation name, NDDE$ indicates that NetDDE is used, DMDATA is the DDEShare name for real-time data, and NODE1.AI1.A_CV is the Item Name. If the Item Name contains a hyphen (-), you must enclose it in single quotes. For example:
=DMDDE|DATA!NODE1.REPORT-TEST.F_CV

Starting DDE
After starting iFIX, you can start the DDE server manually.

28

Using DDE

To start the DDE server manually when iFIX is running: [1] [2] Select Run from the Windows Start menu. The Run dialog box appears Enter the full path to the DMDDE.EXE file in the Open field. For example, C:\DYNAMICS\DMDDE. Click OK. The DDE task window opens to indicate that DDE is running.

[3]

You can also start the DDE server automatically by adding it to the Configured Tasks list in the SCU. See the Setting up the Environment manual for more information.

Setting the Update Time


DDE automatically updates worksheets every two seconds. You can adjust the worksheet update time from the DDE task window. To change the update time, press the spacebar when the DDE task window is active. The options shown in the following table appear. Table 4-3: Update Time Options Press... + To... Increase update speed. Each time you press the + key, the DDE update speed increases by .2 seconds to a minimum update time of every .2 seconds. Decrease update speed. Each time you press the - key, the DDE update speed decreases by .2 seconds to a maximum update time of 40 seconds. w x Minimize or maximize the DDE task window. Exit the DDE program.

The update options above are only valid for the current session. The update time reverts to the 2 second default when you exit or return to DDE again.

Chapter 4. Getting Started Using the DDE Server

29

NOTE: If you are using DDE to perform continuous reads and writes, and some points are not updating, decrease the interval between updates to allow the DDE server task more CPU time.

30

Using DDE

5. System Messages
The following table describes the system messages and corresponding explanations associated with the DDE server. Table 5-1: DDE System Messages Error Code 1150 1209 1212 1213 1314 1608 1620 1624 1750 2005 2302 1620 ?E100 E-1? ERROR:99 Explanation iFIX is not running. Invalid field. Fields value not known or block may be off scan. Invalid field. Invalid field. Network-related problem. Session not established. Cannot find remote node. Session with remote node has been lost. Tag is not defined in the database. Network-related problem. Either waiting for data or node name is not in the network table. Session not established. Cannot find remote node. Invalid node, tag, or field entered, or problem returning data. No communication established with DDE. Invalid node, tag, or field entered, or problem returning data.

Chapter 5. System Messages

31

32

Using DDE

6. Startup Messages
The following table describes the messages and corresponding explanations that can occur when starting the DDE Client Task. The error will be displayed in the Runtime Error field and the configured message destinations. Table 6-1: DDE Client Startup Messages Message Cannot initialize DDEML Explanation A connection could not be made to the DDEML.DLL file. Either the file does not exist or it is not in the Windows search path. The system ran out of memory trying to set up the conversation list. There are too many tasks running simultaneously. You should shut down a task to free up a timer for the DDE Client task timer.

Cannot create conversation list (Check memory) Out of timer resources

Chapter 6. Startup Messages

33

34

Using DDE

7. Communication Messages
The following table describes the errors, associated messages, and corresponding explanations associated with the DDE Client task. These messages appear in the Last Error fields on the DDE Client Task dialog box and in the configured message destinations. Table 7-1: Communication Messages Message None Cannot establish conversation. Server rejected request. Explanation No communication problems have occurred. If the connection is local, the error indicates that either the server is not running or the topic does not exist. iFIX prompts you to start the server the first time this error is detected. If the connection is through NetDDE, this error may indicate a network problem. Cannot establish conversation, cannot create advise list. Cannot establish conversation, cannot add to list. Cannot start advise loop, server rejected request. Cannot start advise loop, cannot add to list. Cannot start advise loop, server rejected data request. The system has run out of memory while the DDE Client Task is attempting to make a connection to a server. The system has run out of memory while the DDE Client Task is attempting to make a connection to a server. The conversation with the DDE server has started but there is a problem with the item. The system has run out of memory while attempting to establish communication. The server rejected the initial request for data made by the client. The advise loop has been successfully established but the server refuses to pass data back to the client. This may indicate the server is overloaded.

Chapter 7. Communication Messages

35

Table 7-1: Communication Messages (continued) Message Cannot start advise loop, request timed out. Explanation The server took too long to acknowledge a request by the client to start an advise loop and the client timed out. This indicates the server is temporarily overloaded. The DDE client attempted to execute a command on the server. The server was overloaded while a DDE transaction was attempted. The server was low on memory while a DDE transaction was attempted. The server was low on memory while a DDE transaction was attempted. The user attempted to shut down the DDE Client Task but does not have sufficient security rights to do so. The user must have the Background Task Exit application feature in his user profile in order to shut down the DDE Client Task. The user has entered an invalid character or a value out of range in the Maximum Links field. The valid range is 1 - 1000. The user has entered an invalid character or a value out of range in the Access Period field. The valid range is 0 to 172800 seconds. The system has run out of memory while establishing communication with a server. The system ran out of memory while the user was opening the Active Advise Loops dialog box.

Cannot execute command, request timed out. Server is busy. Low on memory. Memory allocation failed. User does not have rights to shut down the DDE Client Task.

Invalid Maximum Links.

Invalid access period.

Cannot create I/O list (check memory). Cannot create advise loop list.

36

Using DDE

Index
C
configuring DDE server support 22 NetDDE server support 22 DDE server support communication messages 35 configuration 22 described 2, 21 startup messages 33 system messages 31 digital blocks using DDE client support 12 Dynamic Data Exchange See DDE

D
DDE overview 1 DDE addresses described 5 local 27 overview 5 DDE client support Analog Register block 11 database 1, 10 described 1, 9 Digital Register block 11 obtaining statistical information about sessions 13 reading and writing information 10 troubleshooting 12 using in digital blocks 12 using in input blocks 11 using in output blocks 11 DDE client task items 19 messages 13 DDE database sharing data 12 DDE I/O driver configuring 10 DDE server starting 28 update time 29

I
I/O driver, DDE configuring 10 input blocks using DDE client support

11

M
messages DDE client task 13

N
NetDDE addresses 6, 28 server configuration 22

O
output blocks using DDE client support 11

Index

37

S
Setup dialog box 18 system messages DDE server 31, 33, 35 troubleshooting DDE client support

T
12

U
update time DDE server 29

38

Using DDE

You might also like