DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

DasyLab-Visual Basic (Excel) DDE communication

Hello,

 

we try to send number data from a continuously running  visual basic 6.0 macro (Excel, german version) to DasyLab 9 (german version). Howerver, we were not able to send data sucessfully. We tried the data transfer also for a most simple example. 

 

Visual Basic Code:

 

 

ddeChannel = DDEInitiate(App:="DASYLAB", Topic:="SetData") Set PokeData = Worksheets("Tabelle1").Cells(1, 1) Application.DDEPoke Channel:=ddeChannel, Item:="DDE1", Data:=PokeData DDETerminate ddeChannel

 

 

In DasyLab we use the DDE-Input modul with name DDE1.

 

 

image001.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 DasyLab is set up as Server, whereas VisualBasic/Excel is the client. The value we want to send to DasyLab is located in sheet Tabelle1, cell A1.

 

What happens is: Everytime we let the macro run once, we receive 0,000000E00 in DasyLab (we use list modul to display values). We varied also all possible combinations of format options available within the DDE-input modul without success.

 

Obviously the DDE connection works somehow since DasyLab only lists new values upon execution of the macro, however we do not get anything except 0 as value.

 

A few other DDE commands were tested as well, such as Load dasylab flowsheet, start/stop meassurement and SetVariable/SetString. None of these were working which indicates a more general problem than just formating issues.

 

I hope somebody can help soon.

 

Thanks and best regards,

Sebastian

 

0 Kudos
Message 1 of 3
(7,677 Views)

There is an example on the V9 CD --

 

CD DASYLab 9.0.2\German\Examples\DDE

 

Have you looked at that? While you do that, I'll go find a VB V6 ....

 

The next step will be to check with MeasX in Germany... they have a great deal of knowledge about DASYLab.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
Message 2 of 3
(7,673 Views)

Thanks for the fast reply.

 

The CD is at a different location at the moment and I won't be able to check till next week. However, using MatLab instead of VisualBasic worked out directly in the first attempt.

 

Since it was simple "read values from text file and send to DasyLab" what was programmed in VisualBasic we will just skip over to MatLab.

0 Kudos
Message 3 of 3
(7,669 Views)