LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading tag values through DDE into VB

I've got this VB application that currently uses DDE to communicate with WonderWare to retrieve system info (ie when a VB button is pressed, it captures a snapshot of WonderWare tag values).  The software is being upgraded and implemented in LV (using 7.1 if that matters).
 
What application|topic would be required to grab this from LV tag engine?  (or how do I go about determining this).
 
As always, thanks for you help,
 
--
Sean
0 Kudos
Message 1 of 6
(3,264 Views)
Sean,

It is possible to use LabVIEW to communicate with your WonderWare HMI using DDE. I would actually suggest you take a look at the Application Note: Using DDE in LabVIEW (Windows Only). I hope this is useful for you!

Mike
0 Kudos
Message 2 of 6
(3,249 Views)
Hi Sean
 
Sorry i cant help on your quest, I am new to wonderware.  I would be extremely grateful if you could possibly help me.  I am currently trying very hard to read wonderware tags from within a vb application and am having no luck what so ever.   Any help   I would appreciate any help advice or example code on here to to mail.  my alias at hotmail co uk
 
i have tried using object.linktopic = VIEW|tagname and object.linkitem = $second for example
 
all i get is no foreign application responded to a dde initiate. run time error 282
 
 
Thanks Sean
 
0 Kudos
Message 3 of 6
(3,228 Views)

Good day,

That's the thing.  I'm new to WW aswell.  I don't know how you get WW to start listening for DDE communication.  The project I've been tasked with envolves replacing our WW with LV, so I have had a need to figure that part out.  I tried poking through my existing WW setup put have found nothing useful for you.  If I can figure something out, I'll definitely let you know.

0 Kudos
Message 4 of 6
(3,223 Views)

Hi Sean

Thanks for your help anyway.  Its always good to get a reply and find i am not on my own!

I have found out that if i open an excel spreadsheet on the same pc that is running wonderware and type

=VIEW|TAGNAME!'$second'

into any cell, the value in the cell then becomes an auto refresh of the value in the WW tagname dictionary

(in this case just the wonderware system time (second field)

i just cant get this to work in vb using linktopic and link item

Regards

Gary

0 Kudos
Message 5 of 6
(3,221 Views)

Hey Gary.  Well, this is the snippet of code (names modified for confidentiality, etc etc) in our existing VB app that is used

your_text_box_name.LinkMode = 0
your_text_box_name.LinkTopic = "View|Tagname"
your_text_box_name.LinkItem = "your_tag_name"
your_text_box_name.LinkTimeout = 10
your_text_box_name.LinkMode = 1

All I can suggest is make sure you have your quotations marks where they are supposed to be, and perhaps make sure your letter cases match (I don't know if it's case sensitive).  I looked at my Project -> References and don't see anything selected that looks like it is related to DDE communication.  I got no other idiors for you friend.  Hopefully somebody else a little more knowledgeable with WW and DDE communication will post and add his/her 2 cents worth.

--
Sean

0 Kudos
Message 6 of 6
(3,204 Views)