05-07-2008 07:41 AM
05-07-2009 01:17 AM
Hello All,
I get the same problem since a couple of month . My labview application is build with LV7.1 and is running on Win XP Prof. SP3. From the LV application I do a DDE Communication (Execute and Request) to a VB Application every second. After a undefined time, the complete LV app hangs without an error message. Mostly it goes on running after a time about some seconds or minutes (26 sec, 10 min, etc) automatically or just when I move the mouse. All power save conditions of the PC are inactive.
The kind of this communication was running for many years of WIN NT 4 without any problems. The LV app was build with LV5.1.
First the DDE was opened when the app is started, than each second i a DDE com (Exec. and Req.) and at least the DDE is closed at the end of the app.
Now i open and close the DDE each second when I do the DDE com with timeout (500ms). After a period of time, I got corrupt data's from the DDE com.
At the moment, i try a test without timeout by the DDE com (Exec. and Req.).
Did anyone solve the problem with DDE and XP ??
What ist the solution ?
regards hnau
12-23-2009 03:42 PM
Hello,
I´m having the same problem using DDE communication from VB 6.0 and LabVIEW 8.6...
The idea of my code is pretty simple, just read one indicator from a *.exe made in VB 6.0. This was done by adding the "source" property to the indicator to allow the publishing via DDE.
In LabVIEW the DDE is in a while loop using the DDE Request.vi found in the \LabVIEW X.X\vi.lib\Platform\dde.llb to acquire the result value from the VB executable.
I've tried changing the timeout to something different than waiting for data (-1), I also tried the opening and closing connection in each iteration and none seem to work...
Recently I found the Using DDE in LabVIEW article (http://zone.ni.com/devzone/cda/tut/p/id/4531) and it says: "The client uses a request data command to ask for the current value of the data. If a client wants to monitor a value over a period of time, the client must use an advise data command."
I haven't try this change but I'll will...
Have somebody solve or make the application to stabilize?
Thanks...
01-20-2010 06:40 PM
In the DDE implementation in Windows there is a bug that after about 3000 to 5000 open - close actions, any DDE action fails on that topic, e.g. on the Bronkhorst FlowDDE server "C(1)". The only solution is to stop and restart the DDE server (close communication and open again).
This problem arises in any client (C++, VB, LabVIEW)... To avoid the problem, keep any open connection open (do not close it) and reuse it when possible...
To continuously read data, use an Advise link (start/stop it outside of the loop!).
01-21-2010 08:46 AM
Hi ThijsH and thanks for the reply...
Do you have an image or an example regarding what you say about using DDE? I think this will help alot...
Thanks
01-23-2010 07:02 AM
In the attached example, the DDE connection fails after repeatedly opening and closing.
01-27-2011 11:03 AM
Please see this link. It looks like a Microsoft Windows problem.
01-27-2011 12:45 PM
No time to read with great focus but are you guys talking about serial port opening and closing with VB?
I have heard Windows has a nasty habit of hanging up if the port is closed then reopened too quickly in VB.
Apparently, up to 2 secs is needed after a close of the port to be sure that thread is totally finished. hope it helps
01-27-2011 12:55 PM
No. It is for DDE communication.
I noticed there are several peoples here to mention about that "Freeze" problem. That is exactly what happened for our software now. We didn't have this problem for many years until we used the new Window XP software. We are still working on this. But currently we are thinking it is Microsoft windows glitch. We will install that "hotfix" to see what happen.
I will also use "DDE Advise" to repalce "DDE Request" to have a look. This is suggestion from people here, too.
Very tricky problem. Very tough. This effects our busineess a lot.