Hello Guest it is July 07, 2020, 02:41:22 AM

Author Topic: Mach DRO freezes, motor moving  (Read 1373 times)

0 Members and 1 Guest are viewing this topic.

Mach DRO freezes, motor moving
« on: August 24, 2010, 03:38:40 PM »
Hello all,

I have a quite weird problem. I'm using a VB macro to compensate my backlash using linear encoders.
If an axis changes direction, I use the following code to detect when the encoder starts to move (backlash compensated).
Lets say the actual position is x=100mm and the next move goes positiv, then move x-axis until encoder
is at 100.05mm (position_stop) -> backlash in positiv direction compensated.

dooembutton(307) 'jog x-axis positive
Do While GetOEMDRO(208)<position_stop
dooembutton(334) 'stop jogging of x-axis

This works quite OK, but sometimes during the move the main Mach3 X-axis DRO (oemdro(800)) as well as the encoder
DRO (oemdro(208)) freeze shortly but the motor continues moving. Then after two or three seconds the DROs work again,
but then the total movement was already too big, e.g. not 0.05mm but 0.6mm. This happens totally random
(20 backlash compensations are OK then it happens one time and afterwards it is OK again).
Maybe it has something to do with the GetOEMDRO(208) function, but this would not explain the freezing of the
Mach3 main x-DRO I think ????

Does anybody have an idea????

My computer is a laptop with Pentium 4 CPU with 2.8GHz and about 800MB Ram (200MB or so are stolen by the graphics card,
shared memory). I heard that problems might arise using laptops because of some energy saving features. But I'm
not sure if this has something to do with it because of the random nature of the problem.

I hope somebody can help..
Greetings Thomas