NetDDE

15
NETDDE GUIDE COPYRIGHT TECHMATION 1999 1 NetDDE USERS GUIDE Installing and using NetDDE with Protuner for Windows Version 5.03

Transcript of NetDDE

NETDDE GUIDECOPYRIGHT TECHMATION 1999

1

NetDDE USERS GUIDEInstalling and using NetDDE withProtuner

for WindowsVersion 5.03

NETDDE GUIDECOPYRIGHT TECHMATION 1999

2

IntroductionIntroductionProtunertm for Windows Version 5.03 is a DDE client application capable ofgathering data from any DDE server application. If the server and clientapplications are installed on the same computer the conversation betweenthe two applications is called a local DDE conversation and no specialcomputer setup is required. On the other hand, if the server application andthe client application are running on different computers networkedtogether, the conversation between the two applications is called a NetDDEconversation and some setup is required to allow the server and clientapplications to communicate. This guide is intended to provide a step bystep procedure for the installation and setup of NetDDE.

SummarySummaryWhen the DDE conversation is local, the server name is the name of theserver application. The topic name is defined in the server program andidentifies the type of data structure containing the item. The item nameidentifies the actual data channel to be exchanged between the twoapplications. When the DDE conversation is a NetDDE conversation thefollowing is required for such a conversation to take place.

1. The two computers must be on the same network.2. The DDE server application must be installed on the server workstation

computer.3. The Protunertm for Windows Version 5.03 DDE client software must be

installed on the client workstation computer.4. The workstation computer running the DDE server software must be

properly configured for NetDDE conversations.5. Both computers must be running NetDDE.EXE6. The Protunertm for Windows Version 5.03 data acquisition program

must be configured with the Generic DDE Interface driver.7. The Protunertm for Windows Version 5.03 channel setup must specify

the Server Name as \\server workstation computer name\ndde$ andthe Topic Name as “Share Name setup in the server workstation.”

CHAPTER

1

NETDDE GUIDECOPYRIGHT TECHMATION 1999

3

Network SetupNetwork SetupIn order to use NetDDE, the workstation computer running the serverapplication and the workstation computer running the client (Protunertm)application must be on a network. A complete network instruction manual isbeyond the scope of this document. If you have questions concerningcomputer networking, contact your systems administrator.

• If the DDE server application is installed on an NT workstation,standalone servers, or running Windows 95/98, then the workstationrunning the DDE client application must, at a minimum, havepermission to log on.

• If the DDE server application is installed on a Windows NT DomainServer, then all workstation computers running the DDE client softwaremust be Domain Users. In addition, each DDE client workstation mustbe a member of the NT Server Domain.

Verifying the Network SetupVerifying the Network SetupTo check if the computer workstation running the client (Protunertm) and thecomputer running the server application are on the same network, log on tothe client workstation. Right-click on the Network Neighborhood icon onthe Desktop and select Properties from the drop-down menu. Click on theIdentification tab along the top of the window.

CHAPTER

2

NETDDE GUIDECOPYRIGHT TECHMATION 1999

4

Figure 2.0 – Network dialog box identifying Computer Name, Workgroup,and Computer Description

Follow the same procedure on the workstation computer where the serverapplication resides. Write down the Computer Name for both workstationcomputers.

With the computer names written down, double-click on the NetworkNeighborhood icon on the Desktop; this will display all computers on theLocal Area Network. Look for the NetDDE server and client computernames. Both computer names where the client and server softwarepackages are installed should appear in the list of the computers in theNetwork Neighborhood. If they both do not appear in the NetworkNeighborhood the NetDDE conversations will not work.

NETDDE GUIDECOPYRIGHT TECHMATION 1999

5

NetDDE Setup NetDDE Setup for Workstationfor WorkstationComputer Where Server ApplicationComputer Where Server ApplicationResidesResidesThe following NetDDE setup procedure must be implemented for eachDDE topic configured in the DDE server software.

Windows 95/98 Server SetupWindows 95/98 Server SetupInstructionsInstructionsThe setup of the NetDDE server workstation involves editing the WindowsRegistry. To edit the Windows Registry download the Network DDE ShareManager from http://inet.uni-c.dk/~chlor/ndde/ddes311.zip and run thezipped DDESHARE.EXE file.

If you down-loaded the Network DDE Share Manager from http://inet.uni-c.dk/~chlor/ndde/ddes311.zip, you can more quickly and easily create DDEShares for use with NetDDE. Start the program from Windows by double-clicking on the DDESHARE.EXE file (unzipped from ddes311.zip). Figure3.0 shows the main program window.

Figure 3.0 - The Network DDE Share Manager main program window onthe left and the New Share window on the right.

CHAPTER

3

NETDDE GUIDECOPYRIGHT TECHMATION 1999

6

From the main program window, click Share and highlight New to displaythe New Share dialog box. You need to fill in the Share Name, ApplicationName, and Topic Name. The other entries are permissives and any entriesare optional. Click OK when completed.

• Share Name -Any name you choose followed by “$” and will be usedin the DDE client application as the Topic Name

• Application Name - DDE server application name• Topic Name - Topic Name setup in the DDE server application (See

NetDDE Client Setup for more information).

Windows NT Server SetupWindows NT Server SetupInstructionsInstructionsUnlike Windows 95/98, Windows NT comes with the DDE Share Manager.DDESHARE.EXE is located in the C:\WINNT\SYSTEM32 directory.Double-click on this file in Windows Explorer or start it from the Runwindow. Figure 3.1 shows the main DDE Share Manager window and theDDE Shares window.

Figure 3.1 - The main DDE Share manager window on the left and theDDE Shares window on the right.

NETDDE GUIDECOPYRIGHT TECHMATION 1999

7

To call the DDE Shares dialog box, click Shares from the menu bar.

In the DDE Shares dialog box (shown in Figure 3.1) click the Add aShare… button, to display DDE Share Properties dialog box shown inFigure 3.2.

Figure 3.2 - The DDE Share Properties dialog box

Fill in the following information in the DDE Share Properties dialog box:

• Share Name -Any name you choose followed by “$” and will be usedin the DDE client application as the Topic Name

• Application Name (Static) - Name of the program you intend on usingas the DDE Server application; in this example it’s Excel.

• Topic Name (Static) - Topic Name setup in the DDE serverapplication.

• Allow start application – Check this box.• Grant access to all items – Click radial box.

.Next, click the Permissions… button to open the window shown in Figure3.3.

NETDDE GUIDECOPYRIGHT TECHMATION 1999

8

Figure 3.3 - DDE Share Name Permissions Dialog box

In the DDE Share Name Permissions Dialog box, add either Read andLink or Full Control security to all desired users and groups.

Click OK to close the Permissions dialog box and then again to close theDDE Share Properties window. The new DDE share you created will nowbe listed in the DDE Shares window. In this example, the DDE share wascalled MyData$. Highlight your DDE Share and click the Trust Share…button. This action opens the Trusted Share Properties dialog box shownin Figure 3.4.

Figure 3.4 - DDE Shares window on the left and the Trusted ShareProperties dialog box on the right

NETDDE GUIDECOPYRIGHT TECHMATION 1999

9

In the Trusted Share Properties dialog box, click the Start ApplicationEnable and the Initiate to Application Enable and mark the check boxes.Next click the Set then OK buttons to complete the NetDDE setup.

NETDDE GUIDECOPYRIGHT TECHMATION 1999

10

Starting NetDDE.EXE Starting NetDDE.EXE ononthe Client and Server Workstationsthe Client and Server WorkstationsThis step is very easily overlooked since there is no direct indication on theDesktop that the NetDDE service has started. By default, NETDDE.EXE isnot loaded when starting Windows 95/98/NT, so you have to manually startNETDDE.EXE on your DDE Server computer workstation and the DDEclient computer workstation. On Windows 95/98 computers the program isin the C:\Windows\System directory. On computers running Windows NT,the program is in the C:\Winnt\System32 directory.

CHAPTER

4

NETDDE GUIDECOPYRIGHT TECHMATION 1999

11

NetDDE Client SetupNetDDE Client SetupThis section will describe the procedure for configuring the Protunertm DataAcquisition (Psadaq) to gather data using NetDDE.

Server Computer WorkstationServer Computer WorkstationSetupSetup1. Install and configure the DDE server application in the Server

computer workstation2. Run and setup DDEShare.exe on the Server computer workstation3. Run NetDDE.EXE on the Server workstations

Client Computer WorkstationClient Computer WorkstationSetupSetup1. Install the Protunertm for Windows Version 5.03 application in the

Client computer workstation2. Run NetDDE.EXE on the Client workstation3. Run Protunertm Data Acquisition (Psadaq)

Configuring the Configuring the ProtunerProtunertmtm DataDataAcquisition (Acquisition (Psadaq) for Psadaq) for NetDDENetDDE1. From menu bar click File and New Interface2. Select Generic DDE Interface and click OK

CHAPTER

5

NETDDE GUIDECOPYRIGHT TECHMATION 1999

12

3. From the menu bar click Configure to display the Interface Setupdialog box

4. To set up a new Available Channel, click the Add button to display theChannel Setup dialog box

NETDDE GUIDECOPYRIGHT TECHMATION 1999

13

• Tag Name – The name you choose for the Item being setup

• Raw Min – The minimum raw value of the Item

• Raw Max – The maximum raw value of the Item

• Sq. Root – Unchecked to record linear values

• Server – “\\Name of server workstation computer where the DDEserver is running\ndde$”

• Topic – Share Name setup in Network DDE Share Manager(protuner1$)

• Item – Item to be recorded (The Item name is the same for both localand NetDDE conversations. See the Server Application instructionmanual.)

The only differences between local and NetDDE in the Channel Setupdialog box are the Server and Topic entries. All the other entries are thesame.

NETDDE GUIDECOPYRIGHT TECHMATION 1999

14

ReferencesReferences• 1997, H. Schou, J. Seedorff, A. Melander, P. Hudson. NetDDE

example, Excel 5.0, NetDDE FAQ, at http://inet.uni-c.dk/~chlor/ndde/netdde.htm on the World Wide Web.

• 1998, Microsoft Corporation. About Network DDE, athttp://msdn.microsoft.com/library/sdkdoc/network/netdde_3mcl.htm onthe World Wide Web.

• 1992-1998, Microsoft Corporation. Direct Network DDE Example,Windows for Workgroups 3.1 Resource Kit, Microsoft TechNet,November 1998.

• 1995, Steven C. Gallafent. Using DDE with Clarion for Windows, athttp://www.pointosale.com/developer/netdde.html on the World WideWeb.

• 1988, TA Engineering Co., Inc. AIMAX and Network DDE, How to useNetwork DDE with AIMAX, at http://www.ta-eng.com/faq/NetDDE/NetDDE.htm on the World Wide Web.

• 1998, Wonderware Corporation. Common Questions About NetDDE,at http://www.jmtek.com.tw/product/wware/netddeq2.htm on the WorldWide Web.

• 1998, Protunertm for Windows Version 5.03 Users Manual athttp://www.protuner.com on the World Wide Web.

CHAPTER

6

NETDDE GUIDECOPYRIGHT TECHMATION 1999

TABLE OF CONTENTS

CHAPTER 1INTRODUCTION.............................................................................................2Summary..........................................................................................................2

CHAPTER 2NETWORK SETUP ........................................................................................3Verifying The Network Setup ..........................................................................3

CHAPTER 3NETDDE SETUP FOR WORKSTATION COMPUTER WHERE SERVERAPPLICATION RESIDES ..............................................................................5Windows 95/98 Server Setup Instructions.....................................................5Windows Nt Server Setup Instructions...........................................................6

CHAPTER 4STARTING NETDDE.EXE ON THE CLIENT AND SERVERWORKSTATIONS.........................................................................................10

CHAPTER 5NETDDE CLIENT SETUP............................................................................11Server Computer Workstation Setup............................................................11Client Computer Workstation Setup .............................................................11Configuring The Protunertm Data Acquisition (Psadaq) For Netdde ...........11

CHAPTER 6REFERENCES..............................................................................................14