Hello all
So I have LinuxCNC 2.9 (master) on Debian 11 with probe_basic and everything works fine
As I have build rack tool changer trying to get M6 remap to work so I can do my ATC routines to be able to change tools
I have added to ini next:
Code:
[PYTHON]
TOPLEVEL = ./python/toplevel.py
PATH_APPEND = ./python/
PATH_APPEND = ./python/python-stdglue/
# LOG_LEVEL = 10
toplevel.py
remap.py
Code:
from stdglue import *
and python-stdglue folder copied from
/usr/share/linuxcnc/ncfiles/remap_lib
Also added to [RS274NGC]
Code:
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=rack_change epilog=change_epilog
I have created simple rack_change.ngc to test if will work
Code:
o<rack_change> sub
(print, Start of Program)
(print, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>)
(print, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>)
;otherwise after the M6 this information is gone!
#<tool> = #<selected_tool>
#<pocket> = #<selected_pocket>
;first go up
G53 G0 Z0
; then move to 1st pocket position
G53 G0 X5 Y72
(print, End of Program)
o<rack_change> endsub [1]
M2
This is not DONE script and this is only to get it up and running but after I call M6 T2 (or any other tool) I get just this in output and my machine is not moving (so no movement on any axis)
Code:
[qtpyvcp.actions.machine_actions][INFO] Issuing MDI command: M6 T2 (machine_actions.py:208)
emcTaskPlanLevel() returned 0
Start of Program
in change tool_in_spindle=0.000000 current_pocket=0.000000
selected_tool=2.000000 selected_pocket=2.000000
End of Program
emcTaskPlanExecute(M6 T2) returned 2
emcTaskPlanLevel() returned 1
emcTaskPlanSetWait() called
emcTaskPlanLevel() returned 1
emcTaskPlanLevel() returned 1
So script is getting called but NO movement is done (like G Codes are not executed), and after that I need to STOP it manually to send another command (like after that is in freezed state)
Best part is if I call for example o<go_to_home> call it works so a bit confused
Can anyone help with this or anyone had similar issue? I really hope someone can help me
Thanks a lot