Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
C# application slow responce
#1
Hi Sir,

I would like to ask for some advice on a c# application. What I encounter is my application run slow response. For example, I click a button that getresponxe(#1J+). after that, the motor is not move immediately, after 1 or 2 sec the motor start to move. This is my problem.

FYI, when I run my c# application while I connecting my pmac with PEWIN32Pro software, my application run smoothly. The minute I click button to jog, the motor run immediately. Application consist of 2 thread: 1 for pos, vel and motor status (thread run all the time in 100 delay every cycle), 2 for handle button event for jog motor increment and abs.

Do you guy have any idea? thank you.
Reply
#2
It has to be something in your C# code, then. Please post relevant code snippets. You could also email technical support with the snippets instead.
Reply
#3
(08-17-2015, 11:17 AM)CharlesP Wrote: It has to be something in your C# code, then. Please post relevant code snippets. You could also email technical support with the snippets instead.


I have found the reason why my application is lagging. I change

pmacdoc.SelectDevice((int)this.Handle, out dwDevice, out bSuccess);

to

pmacdoc.SelectDevice(0, out dwDevice, out bSuccess);

And it solve the problem. Everthings running good now.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)