LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple DDE

Hi

I have to write a routine in order to aquire data from a DDE server.

Becouse of large amount of data, more than hundred, I have to use DDE Advise checkMulti.vi.

In the attached file You can find something Im thinking about (Excel is not my DDE server, just to check it)

With that design I meet  at least 2  problems:

1) I am not able to close DDE conncections for each channel;

2) It seems DDE Advice CheckMulti.vi outputs only changed variables, but I need to record all data even they didnt change.

Does anybody have solution for these problems?

Of course I will appreciate other design of routine, but they have beeen based on DDE protocol.

 

Thank You very much

Antonio

0 Kudos
Message 1 of 2
(2,566 Views)

Hi Antonio,



1) I am not able to close DDE conncections for each channel;


I looked at these functions and noticed that the [1st] call to Advise Stop returns the one and only Conversation# which is then Closed.  Subsequently, Advise Stop returns the Advise Refnum (since the Conversation is no longer valid.)

While it's appropriate to STOP each Advise Refnum, Close [Conversation] should only be called once - in fact, the first call to Close succeeds without error!.   


2) It seems DDE Advice CheckMulti.vi outputs only changed variables, but I need to record all data even they didnt change.


It appears that this is normal/expected for "DDE Advise CheckMulti.vi ".  You can retrieve an arbitrary list of cells by calling DDE Request in a loop (see attached).

 

Note that it's possible to retrieve an Excel "Range" with a single call to DDE Request by specifying the Item as a "Range" such as "R1C1:R10C2".

 

Cheers!

"Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)
0 Kudos
Message 2 of 2
(2,531 Views)