Re: Deadlocks in VB 6?
- From: "expvb" <nobody@xxxxxxx>
- Date: Tue, 15 Aug 2006 11:56:08 -0400
"Wiyosaya" <Wiyosaya@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AC863BE0-2123-4C4F-9CDC-BFFA864F5F06@xxxxxxxxxxxxxxxx
Thanks for all the timely replies.
We are using a data acquisition card from National Instruments and their
suite of ActiveX controls withn VB 6 to talk to the card.
First, the software configures the card to run through an object, then it
calls "Start" on that object. The software then waits for an event from
the
card that occurs when it receives the configured number of sample points.
During the processing of this event, the math calculations routine is
called.
The math routine then writes to the global variable.
The plotting routine (when the timer fires) reads from the global
variable.
What appears to be going on is that we call the "Start" function, and the
data event randomly does not fire, i.e., it seems to fire most of the
time,
however, once in a while - once every several hours, it does not.
However, it appears that the card is still running since I can see that it
is acquiring data through National Instruments test panels; however, I
should
not be able to do this since our app should have exclusive access to the
card.
I am wondering whether this is a previously existing bug that did not show
until this time because of the faster processor. With the old processor,
the
system was never able to run fast enough to keep up with itself. That is
not
the case now as the system runs faster than the device that we are
acquiring
data from.
The old CPU was a Pentium D 820 the new CPU is a Athlon64 FX-60.
If there are any other details that I might provide, please let me know.
Thanks in advance.
Best Regards,
Matthew
The original application may have not implemented a queue, so if it's
getting data in and expects the data to go out by the Timer, then it will
drop some data because it has not implemented a FIFO queue. This is a common
design problem and not found out until the incoming data rate is higher than
what the Timer can handle. In other words, you have to implement some type
of flow control.
You could make the Timer run faster, but that doesn't solve the problem. The
program could also have a fixed size buffer, by increasing that, you could
decrease the chance of that happening.
If you want to go with implementing flow control using a queue, search
newsgroups for "vb queue class -dotnet"
http://www.google.com/advanced_group_search?hl=en&num=100
.
- Follow-Ups:
- Re: Deadlocks in VB 6?
- From: Rick Rothstein \(MVP - VB\)
- Re: Deadlocks in VB 6?
- Prev by Date: Re: how do I newline in email body
- Next by Date: Re: Using Split Function for String
- Previous by thread: Re: Deadlocks in VB 6?
- Next by thread: Re: Deadlocks in VB 6?
- Index(es):
Relevant Pages
|