Macro is not terminated

More
24 Mar 2020 11:34 - 24 Mar 2020 11:58 #161342 by romeofox
Macro is not terminated was created 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?
; 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
Last edit: 24 Mar 2020 11:58 by romeofox.

Please Log in or Create an account to join the conversation.

More
24 Mar 2020 15:17 #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,
 #<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 or Create an account to join the conversation.

More
26 Mar 2020 21:53 #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 or Create an account to join the conversation.

Moderators: newbynobiHansU
Time to create page: 0.069 seconds
Powered by Kunena Forum