Hello Guest it is December 07, 2024, 09:38:03 PM

Author Topic: Wrong move when executing macro.  (Read 3239 times)

0 Members and 1 Guest are viewing this topic.

Wrong move when executing macro.
« on: December 29, 2009, 03:04:30 AM »
Maybe the subject does not describe my problem correctly.
The problem is the following.
I have a program which includes a macro.
Is named M1001 and placed after the first G00, is to wait a few seconds and after that energize an output.
The macro is executed correctly.

This is the M1001:
code ("G0 Z0.00")
While ismoving()
wend
ActivateSignal(Output1)
SetUserLed (1001,1)
wait = GetUserDRO(1041)
code ("G4P" & wait)
While ismoving()
wend
SetUserLed (1001,0)
code ("G4 P0.2")
While ismoving()
wend


Now if under ActivateSignal(output1)
i place ActivateSignal(output2)
to have 2 separate outputs,although the screen shows the right path,
the machine does not follow the path.
Usually, if lets say we have rectangular, the shape is left open about 20mm before ending.
Or other times only one dimension (usually at Y axis) is not correct (10-30mm shorter).

Then, by removing the second activation from the macro,
it comes back to the proper path.

Have you seen this problem again?
Any ideas-comments would be helpful...

Offline zealous

*
  •  489 489
  • HI!
    • Artsoft Solutions
Re: Wrong move when executing macro.
« Reply #1 on: December 29, 2009, 04:20:56 AM »
Try using
Code: [Select]
Sleep(wait) and see if that has anything to do with it for example:

Code: [Select]
code ("G0 Z0.00")

While ismoving()
Sleep(250)
wend

ActivateSignal(Output1)

SetUserLed (1001,1)

wait = GetUserDRO(1041)

Sleep(wait)

While ismoving()
Sleep(250)
wend

SetUserLed (1001,0)

Sleep(250)

While ismoving()
Sleep(250)
wend