Calling tool_touch_off.ngc subroutine from another subroutine - Probe Basic

More
4 years 11 months ago #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
 

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

More
4 years 11 months ago - 4 years 11 months ago #225560 by MoshKopp
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>]  
[/code]
Last edit: 4 years 11 months ago by MoshKopp.

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

More
4 years 11 months ago #225562 by Lcvette

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

 
those parameters are set from the offsets page in probe basic.

 

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

More
4 years 11 months ago - 4 years 11 months ago #225568 by MoshKopp
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
 
Last edit: 4 years 11 months ago by MoshKopp.

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

More
4 years 11 months ago - 4 years 11 months ago #225673 by gunrak

I have done it like this, 

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>]  
 
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: 4 years 11 months ago by gunrak.

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

More
4 years 11 months ago #225679 by gunrak

those parameters are set from the offsets page in probe basic.

 
[/quote]

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.

Moderators: KCJ, Lcvette
Time to create page: 0.288 seconds
Powered by Kunena Forum