LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DDEconversation

Hi!

I want to estabish a DDE client to a given DDEserver on the same
computer. To connect the "DDE Open Conversion.vi" you have to connect as
input the service and the topic.
In the manual of the DDEserver and in a visualbasic example the two
keywords which are given are called Linktopic and LinkItem. Are these
different keywords (I think so because it doesn't work?
Are there possibilities to find out the correct service name?

Many thanks in advance

Tobias
0 Kudos
Message 1 of 6
(3,686 Views)
Try for service the name of the application (without .exe)

"DDE Open Conversion.vi" requires a 'service' and a 'topic' as inputs, "DDE
Request.vi" (another VI from the DDE menu) requires an 'item' as input. I
think that the LinkTopic and LinkItem mentioned in your manual correspond to
these 'topic' and 'item' inputs. The 'service' probably is the name of your
application.

To give an example:
I wrote a VI which per DDE requests the value of a variable from the program
origin.exe, acting as the DDE server. In the VI first "DDE Open
Conversion.vi" is called with service="ORIGIN" (the name off the app without
..exe) and topic="Variable". Then "DDE Request.vi" is called with
item="name" where name of course is the actual name of the variable queried
from Origin.



Franz

Tobias FRITZ schrieb:

> Hi!
>
> I want to estabish a DDE client to a given DDEserver on the same
> computer. To connect the "DDE Open Conversion.vi" you have to connect as
> input the service and the topic.
> In the manual of the DDEserver and in a visualbasic example the two
> keywords which are given are called Linktopic and LinkItem. Are these
> different keywords (I think so because it doesn't work?
> Are there possibilities to find out the correct service name?
>
> Many thanks in advance
>
> Tobias
0 Kudos
Message 2 of 6
(3,686 Views)
Is this documented anywhere? We have Origin6 here, and because of the lack
of DDE Server documentation in the "User" and "Labtalk" manuals supplied, my
Origin communication VIs can only work by sending Labtalk commands and
scripts via DDE. I've just looked again, and the only references to "DDE" in
the indices are to either DDE communication with Excel or DDE client
communication with a separate server. I didn't know of the extra topic.

My function for retrieving the value of a variable from Origin is
particularly cumbersome; it first talks to a DDE server I run on the Labview
side to obtain a reference ID. It then passes a script to Origin instructing
Origin to open a second DDE connection back to my Labview server and send
the requested information, along
with the "request ID", so that on the
Labview side the correct response gets sent to the correct VI. It all works
very nicely, but in light of this little snippet you posted is a waste of
quite a bit of effort.

Do you perhaps have the "Origin Professional" package and is there some DDE
server documentation with that?

Franz Josef Ahlers wrote in message
news:3A534BED.6FD372B7@ptb.de...
> To give an example:
> I wrote a VI which per DDE requests the value of a variable from the
program
> origin.exe, acting as the DDE server. In the VI first "DDE Open
> Conversion.vi" is called with service="ORIGIN" (the name off the app
without
> .exe) and topic="Variable". Then "DDE Request.vi" is called with
> item="name" where name of course is the actual name of the variable
queried
> from Origin.
0 Kudos
Message 4 of 6
(3,686 Views)
In article <3A534BED.6FD372B7@ptb.de>,
franz.ahlers@ptb.de wrote:
> Try for service the name of the application (without .exe)
>
> "DDE Open Conversion.vi" requires a 'service' and a 'topic' as
inputs, "DDE
> Request.vi" (another VI from the DDE menu) requires an 'item' as
input. I
> think that the LinkTopic and LinkItem mentioned in your manual
correspond to
> these 'topic' and 'item' inputs. The 'service' probably is the name
of your
> application.

This is not quite right. The LinkTopic in VB is a combination of
the 'service' and 'topic' names, separated by |. Although the 'service'
may be the name of the application this is by convention only, an
application can use any service name it pleases.

> To give an example:
> I wrote a VI which per DDE reques
ts the value of a variable from the
program
> origin.exe, acting as the DDE server. In the VI first "DDE Open
> Conversion.vi" is called with service="ORIGIN" (the name off the app
without
> .exe) and topic="Variable". Then "DDE Request.vi" is called with
> item="name" where name of course is the actual name of the variable
queried
> from Origin.
>
> Franz
>
> Tobias FRITZ schrieb:
>
> > Hi!
> >
> > I want to estabish a DDE client to a given DDEserver on the same
> > computer. To connect the "DDE Open Conversion.vi" you have to
connect as
> > input the service and the topic.
> > In the manual of the DDEserver and in a visualbasic example the two
> > keywords which are given are called Linktopic and LinkItem. Are
these
> > different keywords (I think so because it doesn't work?
> > Are there possibilities to find out the correct service name?
> >
> > Many thanks in advance
> >
> > Tobias
>
>

--
Roger Abbott, RHA (Minisystems) Ltd - http://www.rhaminisys.com
DDE Client and Server A
ctiveX controls for Visual Basic
DDE FAQ and DDE utility tools, browser URL monitor,
Program launcher/setup menu, other freeware and shareware


Sent via Deja.com
http://www.deja.com/
0 Kudos
Message 5 of 6
(3,686 Views)
In article <3A534215.6AA946C0@iqe.phys.ethz.ch>,
Tobias FRITZ wrote:
> Hi!
>
> I want to estabish a DDE client to a given DDEserver on the same
> computer. To connect the "DDE Open Conversion.vi" you have to connect
as
> input the service and the topic.
> In the manual of the DDEserver and in a visualbasic example the two
> keywords which are given are called Linktopic and LinkItem. Are these
> different keywords (I think so because it doesn't work?
> Are there possibilities to find out the correct service name?

I don't know about Labview but I can tell you about VB and DDE which
may help. The LinkTopic in VB is actually a combination of the service
name and topic name, separated by a pipe | symbol. In some DDE
implementations the service
and topic names are separate strings.

There is a logic in the way VB does it, because a conversation is
established based on the service and topic name. Once a conversation
has been established the item name (LinkItem in VB) is used for
requesting data on that conversation.
--
Roger Abbott, RHA (Minisystems) Ltd - http://www.rhaminisys.com
DDE Client and Server ActiveX controls for Visual Basic
DDE FAQ and DDE utility tools, browser URL monitor,
Program launcher/setup menu, other freeware and shareware


Sent via Deja.com
http://www.deja.com/
0 Kudos
Message 3 of 6
(3,686 Views)
> Are there possibilities to find out the correct service name?

First you need to know the server name. Most often it is the name of the
..exe file (Excel, Winword)

Many times the server app supports DDE so you can copy to the clipboard and
paste link into a client app. To find the correct topic paste link into
excel or word (using paste special) and then look at the field codes that
are actually pasted.

F.i. Paste link Word into Excel gives:
=Word.Document.8|Document1!'!OLE_LINK1'

with Winword is the server , topic is Document1, and OLE_LINK1 the item

Paste link Excel into Word give:
{LINK Excel.Sheet.8 "Book1" "Sheet1!R3C1" \a \t }

With Excel the server, Book1 the Topic and Sheet1!R3C1 the item

You can get the Topics from a server using the System topic.

Using
Excel and System in the above case I get (using a small Labview app):
[:]:
[Book1]Sheet1
[EUROTOOL.XLA]Sheet1
System

So instead of topic "Book1" we get "[Book1]Sheet1" and Item "R3C1" instead
of "Sheet1!R3C1". This works for me. I never got it to work, following
exactly the strings Word/Excel use.

Mark that the English version uses R3C1 but the Dutch version use R1K1. How
many different languages are out there 🙂

Using Winword and System:
System
Document1
C:\My Documents\Office Templates\Normal.dot

Word creates hidden bookmarks to reference to the link part of the doc.

Good luck with your DDE server.

Ferry
0 Kudos
Message 6 of 6
(3,686 Views)