Beginner Problem

C, C++, and Visual C++
RogerInHawaii

Re: Beginner Problem

Postby RogerInHawaii » Thu Dec 22, 2011 3:21 pm

I posted this a month ago and there is still no resolution to the problem.

User avatar
Patrick
Lead Developer
Posts: 3100
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Beginner Problem

Postby Patrick » Thu Dec 22, 2011 4:04 pm

Sorry about this, I'm going to look into this now.

-Patrick

User avatar
Patrick
Lead Developer
Posts: 3100
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Beginner Problem

Postby Patrick » Thu Dec 22, 2011 4:26 pm

Hi,

In what context are you running your loop? Are you running it in a button press handler or something like that?

If that's the case, then try adding Application.DoEvents(); while waiting for Stopped to go true, to allow the form to process events.

Ay any rate, your code works as expected for me.

-Patrick

RogerInHawaii

Re: Beginner Problem

Postby RogerInHawaii » Sun Dec 25, 2011 4:00 pm

Patrick wrote:Hi,

In what context are you running your loop? Are you running it in a button press handler or something like that?

If that's the case, then try adding Application.DoEvents(); while waiting for Stopped to go true, to allow the form to process events.

Ay any rate, your code works as expected for me.

-Patrick


Thank you, Patrick. That's exactly what it needed, the DoEvents() call. It does indeed appear to need time to process events so that the stepper motor handler code can get in there and update its status.


Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 1 guest