Last move of macro doesn't run

More
01 Nov 2021 09:08 - 01 Nov 2021 09:14 #224858 by furynick
I tried a small macro to initialize a probe on my LinuxCNC 2.8.2, the last move of the macro isn't run (G0 Z0), Z axis stay at the position of G38.4.
O<probe_init> SUB
  #5000 = 0.0
  (PRINT,Probe init)
  G90
  G49
  O100 IF [ #<_hal[tool-number]> NE 99 ]
    (PRINT,Go to tool change position )
    G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
    G53 G0 X[#<_ini[CHANGE_POSITION]X>] Y[#<_ini[CHANGE_POSITION]Y>]
    T99 M6
    (PRINT,Tool changed, go to tool setter at X#<_ini[TOOLSENSOR]X> Y#<_ini[TOOLSENSOR]Y>;)
  O100 ENDIF
  G53 G0 Z[#<_ini[TOOLSENSOR]Z>]
  G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]
  G38.2 Z[#<_ini[AXIS_Z]MIN_LIMIT>] F100
  G91
  G38.4 Z3 F15
  G90
  G53 G0 Z[#<_ini[TOOLSENSOR]Z>]
  (PRINT,Initial tool height: #5063)
M2

Is there anything I have to add at the end of the macro to "flush" pending commands ?
Last edit: 01 Nov 2021 09:14 by furynick.

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

More
01 Nov 2021 09:26 #224861 by furynick
Forget it, I forgot ENDSUB !
The following user(s) said Thank You: tommylight

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

Time to create page: 0.060 seconds
Powered by Kunena Forum