Macro is not terminated

More
6 years 7 months ago #161342 by romeofox
Hello everybody,

the following macro I have tried to include in Gmoccapy.
I already have a button that calls the macro, but the macro does not end and I have to click the red button with the white X on the right at the very end.

How can I end the macro automatically?
Code:
; G54_x ; set position to the radius of the milling cutter O<g54_x> sub #5221 = [#<_x> + #5221 + #5410 / 2] G55 G54 O<g54_x> endsub M2

Best regards
Robert

Please Log in to join the conversation.

More
6 years 7 months ago #161353 by MaHa
Replied by MaHa on topic Macro is not terminated
As #5221 is outside the general usable range (31-5000), you can not set a value to predefined parameters.

whatever you want to do,
Code:
#<ACT_X> = #<_x> X[#<ACT_X> + [5410 / 2]]
sets cuttercompensation to right of cutter from actual X-Pos in active coordinatesystem.
Or use G10 to set ofset

Changing active coordinate system in a subroutine can lead to unexpected behaviour of your machine, if you forget later about that feature.

Please Log in to join the conversation.

More
6 years 7 months ago #161619 by newbynobi
Replied by newbynobi on topic Macro is not terminated
That does happen, because there is no movement in the macro, resulting in no interpreter change. Just add a G4 command. Please look at the Sim example macro iamlost

Norbert

Please Log in to join the conversation.

Time to create page: 0.066 seconds
Powered by Kunena Forum