DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DDE Conversation with Script DAC Driver

How to make a DDE Conversation with the Script DAC Driver?

I've build a DDE-Server "Project2.exe".
I can poke a string from Diadem Script with:

Call DDEOpen("Project2", "DdeServerConv1")
Call DDEPOKETEXT("DdeItem","This text is inserted using DDE",50000)
Call DDEClose()

But I can not make a conversation from Script DAC Driver.

Scriptfile:
----------
Sub SFD_WriteChannel( ChannelNumberP, ParamP, DataP, DoneP, ErrorP )
   Call DDEPOKETEXT("DdeItem","This text is inserted using DDE",50000)
  DoneP = 1
End Sub

Sub SFD_Init( DeviceParam1V, DeviceParam2V, ErrorP )
    Call DDEOpen("Project2", "DdeServerConv1")
End Sub

Sub SFD_DeInit(ErrorP )
    Call DDEClose()
End Sub
-----------

When starting DAC, a type mismatch error appears in DDEOpen-command. Is there a way to solve it? I can't use the DDE-Client block from DAC, because I have to transmit strings.


0 Kudos
Message 1 of 3
(3,550 Views)
Hello,

within the Script DAC driver, many DIAdem commands are not supported. This is because the script is executed in a different environment than vbs that run within DIAdem SCRIPT.
Data Exchange and communication is used to be done with the UDI Interface - which does not support DDE operations.
Since VBS does not support DDE neither, there is no easy solution for that communication.

Maybe it is most convenient to write a driver for your DDE communication. DIAdem offers the GPI-DLL interfaces for duch purposes.

Another solution that might work is to write an ActiveX Server application that does the DDE communication and to call the server from the Script DAC driver.

Hope that gives you some ideas how to proceed.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 2 of 3
(3,546 Views)
Thanks for the fast answer. It helps.
0 Kudos
Message 3 of 3
(3,543 Views)