Sign in to follow this  
robopp

DDE requests start to fail after long data acquisitions

Recommended Posts

Hi,

I wrote a basic GUI application that communicates with DAQFactory over DDE. Everything works beautifully during short runs, but during long runs (3+ days of 150 channel serial data collection) the data that's received over the DDE request either fails or is stale. Restarting DAQFactory fixes the issue temporarily, but DAQFactory falls back into this weird state shortly thereafter.

Not sure if it's related, but we're using persistent data for channel data storage where each channel is allocated 1,000,000 persistent points.

Share this post


Link to post
Share on other sites

Another debug data point is that we're running 6 modeless windows along with the main DAQfactory window. It appears as though if we disable the 6 modeless windows the DDE does not cut out. We're running everything on a desktop machine with two 6GB GeForce graphics cards that's having no problem keeping up.

Share this post


Link to post
Share on other sites

I'd be curious if restarting the other side, the software that DAQFactory is communicating with over DDE resolves the issue.

DDE is ancient technology of Windows that actually uses windows (note lower case w) to allow for interprocess communications.  Because it uses windows (among other reasons), it uses "Resources" (note upper case R because I'm talking about something specifically named Resources), another somewhat ancient concern that rarely appears nowadays.  Basically applications are allocated a limited amount of Resources and creating windows takes away from this.  Once you run out of resources, you can no longer create new windows.  Your latest debug data point tells me that you are somehow running out of resources, and that by not opening 6 extra windows it leaves just enough space for DDE to keep running.

Resources are not the same as memory and have nothing to do with what video card you are using.  I, truthfully, don't know what Windows calls it now as it generally never causes a problem.  You may be able to track your Resource use in Task Manager by showing these columns: Handles, USER objects, or GDI Objects.  I'm not actually sure which will line up, but you may see one of these steadily rising as your program runs.

 

Share this post


Link to post
Share on other sites

We've tried resetting the GUI side and the only thing that appears to help, albeit temporarily, is restarting DAQFactory.

This is a highly spec'd machine that should be able to handle these tasks with ease so I'm very surprised it's not able to. 

During our next run I'll monitor the Task Manager to attempt to get more information.

Share this post


Link to post
Share on other sites

Yeah, that's the problem with DDE and Resources.  It doesn't matter if you are running the fastest workstation money can buy.  DDE is so antiquated, that Windows never really updated it to take advantage of new technology.  It's kind of like running a 32 bit app on Windows x64.  You can put 256 gig of memory into the machine, but the app is still only going to be able to use 4 gig.  Except of course that DDE is much older, almost no one uses it anymore (unlike 32 bit apps which are 99% of apps out there), and the problems aren't as obvious.

Now I'm not saying you shouldn't use DDE, as it is common to use antiquated technology in this industry, I'm just trying to explain why the machine doesn't matter.

Why don't you email us directly on support @ and I'll see about adding a reset command to the DDE driver so you can reset the connection from within DAQFactory.  Then you may just be able to reset the connection every hour to keep things fresh.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this