Calling tool_touch_off.ngc subroutine from another subroutine - Probe Basic
07 Nov 2021 14:10 #225557
by gunrak
Hi,
I would like to call tool_touch_off.ngc subroutine from my remapped M6 subroutine, but I am missing parameters:
#<fast_probe_fr> = #1 (set from probe screen fast probe feed rate)
#<slow_probe_fr> = #2 (set from probe screen slow probe feedrate)
#<z_max_travel> = #3 (max z distance the tool travels before erroring out if not contact is made)
#<xy_max_travel> = #4 (max xy distance the tool travels before erroring out if not contact is made)
#<retract_distance> = #6 (distance the tool retracts after making contact during fast feed mode)
#<spindle_zero_height> = #5 (G53 distance from home to spindle nose triggering point on touch plate)
#<tool_diameter_probe_mode> = #8 (activates the tool diameter probe subroutine section)
#<tool_diameter_offset_mode> = #9 (activates the tool diameter offset position for probe subroutine section)
#<tool_diameter> = #10 (current tool's diameter used for offseting probe position in x axis)
Where those parameters are stored? Is there any chance I could access them from subroutine and and use them when I call tool_touch_off.ngc?
Best regards,
Guntars
I would like to call tool_touch_off.ngc subroutine from my remapped M6 subroutine, but I am missing parameters:
#<fast_probe_fr> = #1 (set from probe screen fast probe feed rate)
#<slow_probe_fr> = #2 (set from probe screen slow probe feedrate)
#<z_max_travel> = #3 (max z distance the tool travels before erroring out if not contact is made)
#<xy_max_travel> = #4 (max xy distance the tool travels before erroring out if not contact is made)
#<retract_distance> = #6 (distance the tool retracts after making contact during fast feed mode)
#<spindle_zero_height> = #5 (G53 distance from home to spindle nose triggering point on touch plate)
#<tool_diameter_probe_mode> = #8 (activates the tool diameter probe subroutine section)
#<tool_diameter_offset_mode> = #9 (activates the tool diameter offset position for probe subroutine section)
#<tool_diameter> = #10 (current tool's diameter used for offseting probe position in x axis)
Where those parameters are stored? Is there any chance I could access them from subroutine and and use them when I call tool_touch_off.ngc?
Best regards,
Guntars
Please Log in or Create an account to join the conversation.
07 Nov 2021 16:01 - 07 Nov 2021 16:03 #225560
by MoshKopp
Replied by MoshKopp on topic Calling tool_touch_off.ngc subroutine from another subroutine - Probe Basic
I have done it like this,
[/code]
[code]#<fast_probe_fr> = 50 (1: set from probe screen fast probe feed rate)
#<slow_probe_fr> = 10 (2: set from probe screen slow probe feedrate)
#<z_max_travel> = 28 (3: max z distance the tool travels before erroring out if not contact is made)
#<xy_max_travel> = 0 (4: max xy distance the tool travels before erroring out if not contact is made)
#<spindle_zero_height> = 87.1121 (5: G53 distance from home to spindle nose triggering point on touch plate)
#<retract_distance> = 0.5 (6: distance the tool retracts after making contact during fast feed mode)
#7= 0 (7: n/a)
#<tool_diameter_probe_mode> = 0 (8: activates the tool diameter probe subroutine section)
#<tool_diameter_offset_mode> = 0 (9: activates the tool diameter offset position for probe subroutine section)
#<tool_diameter> = 0 (10: current tool's diameter used for offseting probe position in x axis)
o<tool_touch_off> call [#<fast_probe_fr>] [#<slow_probe_fr>] [#<z_max_travel>] [#<xy_max_travel>] [#<spindle_zero_height>] [#<retract_distance>] [#<go_back_to_start_pos>] [#<tool_diameter_probe_mode>] [#<tool_diameter_offset_mode>] [#<tool_diameter>]
Last edit: 07 Nov 2021 16:03 by MoshKopp.
Please Log in or Create an account to join the conversation.
07 Nov 2021 16:59 #225562
by Lcvette
Replied by Lcvette on topic Calling tool_touch_off.ngc subroutine from another subroutine - Probe Basic
those parameters are set from the offsets page in probe basic.Hi,
I would like to call tool_touch_off.ngc subroutine from my remapped M6 subroutine, but I am missing parameters:
#<fast_probe_fr> = #1 (set from probe screen fast probe feed rate)
#<slow_probe_fr> = #2 (set from probe screen slow probe feedrate)
#<z_max_travel> = #3 (max z distance the tool travels before erroring out if not contact is made)
#<xy_max_travel> = #4 (max xy distance the tool travels before erroring out if not contact is made)
#<retract_distance> = #6 (distance the tool retracts after making contact during fast feed mode)
#<spindle_zero_height> = #5 (G53 distance from home to spindle nose triggering point on touch plate)
#<tool_diameter_probe_mode> = #8 (activates the tool diameter probe subroutine section)
#<tool_diameter_offset_mode> = #9 (activates the tool diameter offset position for probe subroutine section)
#<tool_diameter> = #10 (current tool's diameter used for offseting probe position in x axis)
Where those parameters are stored? Is there any chance I could access them from subroutine and and use them when I call tool_touch_off.ngc?
Best regards,
Guntars
Attachments:
Please Log in or Create an account to join the conversation.
07 Nov 2021 17:44 - 07 Nov 2021 17:59 #225568
by MoshKopp
Replied by MoshKopp on topic Calling tool_touch_off.ngc subroutine from another subroutine - Probe Basic
Yes, I know, but if you want to use tool_touch_off.ngc outside it didnt work.
o<tool_touch_off> call [#<fast_probe_fr>] [#<slow_probe_fr>] [#<z_max_travel>] [#<xy_max_travel>] [#<spindle_zero_height>] [#<retract_distance>] [#<go_back_to_start_pos>] [#<tool_diameter_probe_mode>] [#<tool_diameter_offset_mode>] [#<tool_diameter>]
runs the tool_touch_off subroutine, and this one will have parameters.
with #1 #2 #4 etc. you will get the error that Parameter missing
with value like I did it works
How can I use the parameters from Offset page? will have more handling instead of using 2 times parameters
o<tool_touch_off> call [#<fast_probe_fr>] [#<slow_probe_fr>] [#<z_max_travel>] [#<xy_max_travel>] [#<spindle_zero_height>] [#<retract_distance>] [#<go_back_to_start_pos>] [#<tool_diameter_probe_mode>] [#<tool_diameter_offset_mode>] [#<tool_diameter>]
runs the tool_touch_off subroutine, and this one will have parameters.
with #1 #2 #4 etc. you will get the error that Parameter missing
with value like I did it works
How can I use the parameters from Offset page? will have more handling instead of using 2 times parameters
Last edit: 07 Nov 2021 17:59 by MoshKopp.
Please Log in or Create an account to join the conversation.
08 Nov 2021 12:26 - 08 Nov 2021 12:27 #225673
by gunrak
This is exactly what I implemented few month ago when I initially set up my router. I had run into issue when I updated values in UI and forgot to update them in subroutine and that caused some mess, that is why I am looking for solution where I can avoid to 'hardcode' values in subroutine and I would prefer if I could somehow get them from the place they are stored and then pass them in to call as parameters. Or some other solution if there is any.
Replied by gunrak on topic Calling tool_touch_off.ngc subroutine from another subroutine - Probe Basic
I have done it like this,
#<fast_probe_fr> = 50 (1: set from probe screen fast probe feed rate) #<slow_probe_fr> = 10 (2: set from probe screen slow probe feedrate) #<z_max_travel> = 28 (3: max z distance the tool travels before erroring out if not contact is made) #<xy_max_travel> = 0 (4: max xy distance the tool travels before erroring out if not contact is made) #<spindle_zero_height> = 87.1121 (5: G53 distance from home to spindle nose triggering point on touch plate) #<retract_distance> = 0.5 (6: distance the tool retracts after making contact during fast feed mode) #7= 0 (7: n/a) #<tool_diameter_probe_mode> = 0 (8: activates the tool diameter probe subroutine section) #<tool_diameter_offset_mode> = 0 (9: activates the tool diameter offset position for probe subroutine section) #<tool_diameter> = 0 (10: current tool's diameter used for offseting probe position in x axis) o<tool_touch_off> call [#<fast_probe_fr>] [#<slow_probe_fr>] [#<z_max_travel>] [#<xy_max_travel>] [#<spindle_zero_height>] [#<retract_distance>] [#<go_back_to_start_pos>] [#<tool_diameter_probe_mode>] [#<tool_diameter_offset_mode>] [#<tool_diameter>]
This is exactly what I implemented few month ago when I initially set up my router. I had run into issue when I updated values in UI and forgot to update them in subroutine and that caused some mess, that is why I am looking for solution where I can avoid to 'hardcode' values in subroutine and I would prefer if I could somehow get them from the place they are stored and then pass them in to call as parameters. Or some other solution if there is any.
Last edit: 08 Nov 2021 12:27 by gunrak.
Please Log in or Create an account to join the conversation.
08 Nov 2021 12:41 #225679
by gunrak
That is correct and tool_touch_off.ngc works fine as far as it is called from UI and I guess when it is called from UI parameters are included, but in case if I call tool_touch_off.ngc from subroutine parameters are missing that is the main problem that I have.
Any ideas how I could get parameters from UI that you listed in picture?
Replied by gunrak on topic Calling tool_touch_off.ngc subroutine from another subroutine - Probe Basic
[/quote]those parameters are set from the offsets page in probe basic.
That is correct and tool_touch_off.ngc works fine as far as it is called from UI and I guess when it is called from UI parameters are included, but in case if I call tool_touch_off.ngc from subroutine parameters are missing that is the main problem that I have.
Any ideas how I could get parameters from UI that you listed in picture?
The following user(s) said Thank You: zmrdko
Please Log in or Create an account to join the conversation.
Time to create page: 0.178 seconds