Using DADiSP as a DDE Server

 

Although DADiSP most often functions as a DDE client application, requesting data from other applications, DADiSP also acts as a DDE server. As a server, DADiSP supports the following DDE topics:

 

Commands

Normal interaction with DADiSP

System

DDE informational mode

 

 

Applications normally interact with DADiSP using the Commands topic. With the Commands topic, applications can retrieve information on almost any valid DADiSP expression. For example, using Visual Basic from within Excel (i.e. these are Excel commands):

 

chn = DDEInitiate("DADiSP", "Commands")
var = DDERequest(chn, "10*max(w1)")

 

retrieves from DADiSP the maximum of W1 multiplied by 10 and assigns it to the Visual Basic variable var.

 

Applications can also cause DADiSP to execute any valid DADiSP commands. Again, using Excel:

 

chn = DDEInitiate("DADiSP", "Commands")
DDEExecute(chn, "Moveto(W2)")

DDEExecute(chn, "Gsin(100,.01, 2)")

 

causes DADiSP to select W2 and generate a 100 point, 2 Hz sine wave.

 

Advise loops (or hot links) can be established on any DADiSP Window or hot variable. For example, in DADiSP:

 

W1: Gnorm(100,.01)
hotvar:= max(w1)

 

W1 contains 100 points of normally distributed random noise. The hot variable hotvar contains the maximum value of W1. Now, in cell A1 in Excel, type:

 

=DADiSP|Commands!W1

 

and in cell A2:

 

=DADiSP|Commands!hotvar

 

Cell A1 and A2 update with the data in W1 and the maximum of W1 respectfully.

 

The System topic reports on DDE related subject matter and supports the following items:

 

  SysItems   all items under the System topic
  Topics        all topics
  Formats     supported Clipboard formats