提交 xyzbc-trt 界面与验证更新

This commit is contained in:
mes123456
2026-07-02 20:25:37 -04:00
parent 68ecd05353
commit 370c344b96
868 changed files with 275426 additions and 39640 deletions

View File

@@ -0,0 +1,116 @@
(author: Chris P)
(version: 0.3)
(date: 04/25/19)
(Probe back top edge angle for y,z 0,0 position and edge angle)
(Start probe position is over back edge of stock, set edge width,)
(step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_back_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_back_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<x_start_position> = #5420
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y[#<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_zero_edge_start> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_back_edge_angle> return
o<120> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 X-[#<edge_width>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_zero_edge_end> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_back_edge_angle> return
o<130> endif
#<edge_delta> = [#<y_minus_zero_edge_start> - #<y_minus_zero_edge_end>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_start_position>] Y[#<y_minus_zero_edge_start>]
(probe mode rules for WCO, Rotation and probe position measuring only)
o<140> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_start_position>] Y[#<y_minus_zero_edge_start> + #<workspace_y>]
o<probe_back_edge_angle> return
o<140> endif
(probe mode rules for WCO, Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_start_position>] Y[#<y_minus_zero_edge_start> + #<workspace_y>] R[#<edge_angle>]
o<probe_back_edge_angle> return
o<150> endif
o<probe_back_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,110 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe back left inside corner for x,y,z 0,0,0 position)
(Start probe position is over back left inside corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_back_left_inside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_back_left_inside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Traverse Workpiece Top at Z Clearance Height plane)
G91
G0 X[#<step_off_width>] Y-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
G90
(Current X Position including offsets in current program units)
#<x_start> = #5420
(Call sub "probe_x_minus_sub" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_back_left_inside> return
o<120> endif
(move to X start Position)
G90
G0 X[#<x_start>]
(Current Y Position including offsets in current program units)
#<y_start> = #5421
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_back_left_inside> return
o<130> endif
(move to Y start Position)
G90
G0 Y[#<y_start>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_minus_zero_edge>] Y[#<y_plus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_plus_zero_edge> + #<workspace_y>]
o<probe_rect_pocket> return
o<140> endif
o<probe_back_left_inside> endsub
M2 (end program)

View File

@@ -0,0 +1,106 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe back left top corner for x,y,z 0,0,0 position)
(Start probe position is over back left corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_back_left_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_back_left_outside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Step Off Width)
G91
G0 X-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_back_left_outside> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move, Traverse Workpiece at Z Clearance plane)
G0 X[#<step_off_width>] Y[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_back_left_outside> return
o<130> endif
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_plus_zero_edge>] Y[#<y_minus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_minus_zero_edge> + #<workspace_y>]
o<probe_back_left_outside> return
o<140> endif
o<probe_back_left_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,82 @@
(author: Chris P)
(version: 0.3)
(date: 04/25/19)
(Probe back top side for y,z 0,0 position)
(Start probe position is over back edge of stock)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_back_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<Probe_back_outside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y[#<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_back_outside> return
o<120> endif
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 Y[#<y_minus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<130> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 Y[#<y_minus_zero_edge> + #<workspace_y>]
o<probe_back_outside> return
o<130> endif
o<probe_back_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,110 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe back right inside corner for x,y,z 0,0,0 position)
(Start probe position is over back right inside corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_back_right_inside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_back_right_inside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Step Off Width X and Y)
G91
G0 X-[#<step_off_width>] Y-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
G90
(Current X Position including offsets in current program units)
#<x_start> = #5420
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_back_right_inside> return
o<120> endif
(move to X start Position)
G90
G0 X[#<x_start>]
(Current Y Position including offsets in current program units)
#<y_start> = #5421
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_back_right_inside> return
o<130> endif
(move to Y start Position)
G90
G0 Y[#<y_start>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_plus_zero_edge>] Y[#<y_plus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_plus_zero_edge> + #<workspace_y>]
o<probe_back_right_inside> return
o<140> endif
o<probe_back_right_inside> endsub
M2 (end program)

View File

@@ -0,0 +1,105 @@
(author: Chris P)
(version: 0.1)
(date: 04/23/19)
(Probe back right top corner for x,y,z 0,0,0 position)
(Start probe position is over back right corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_back_right_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_back_right_outside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_back_right_outside> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move)
G0 X-[#<step_off_width>] Y[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_back_right_outside> return
o<130> endif
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_minus_zero_edge>] Y[#<y_minus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_minus_zero_edge> + #<workspace_y>]
o<probe_back_right_outside> return
o<140> endif
o<probe_back_right_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,296 @@
(author: Chris P)
(version: 0.1)
(date: 05/8/19)
(Probe calibration offset using defined diam round boss)
(Start probe position is over center of stock in X and Y axis)
(within max z distance, ensure all settings have been)
(set properly according to help diagrams)
o<probe_cal_round_boss> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<cal_diameter> = #16 (=1.0000)
#<x_cal_width> = #17 (=0.0000)
#<y_cal_width> = #18 (=0.0000)
#<sq_cal_axis> = #19 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_cal_round_boss> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Call sub "probe_z_minus_sub" to Probe top of Workpiece)
o<probe_z_minus_sub> call [#1][#2][#5][#8][#9][#15]
(Probe X Positioning Move, X hint/2 + Step Off Width)
G91
G0 X-[#<cal_diameter>/2 + #<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in X, X Hint + Step Off Width at Rapid Speed)
G91
G0 X[#<cal_diameter> + #<step_off_width> + #<xy_clearance>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_minus_probed> + #<x_plus_probed>] / 2]
M68 E10 Q[#<x_center_probed>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>]
(Probe Y Positioning Move, Y hint/2 + Step Off Width)
G91
G0 Y-[#<cal_diameter>/2 + #<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in Y, Y Hint + Step Off Width at Rapid Speed)
G91
G0 Y[#<cal_diameter> + #<step_off_width> + #<xy_clearance>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G0 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_minus_probed> + #<y_plus_probed>] / 2]
M68 E11 Q[#<y_center_probed>]
(Move to z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Move to Y Center)
G90
G0 Y[#<y_center_probed>]
(Probe X Positioning Move, X hint/2 + Step Off Width)
G91
G0 X-[#<cal_diameter>/2 + #<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in X, X Hint + Step Off Width at Rapid Speed)
G0 X[#<cal_diameter> + #<step_off_width> + #<xy_clearance>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_minus_probed> + #<x_plus_probed>] / 2]
(calculate X Width Probed)
o<120> if [#<x_minus_probed> GT #<x_plus_probed>]
#<x_raw_width> = [#<x_minus_probed> - #<x_plus_probed>]
o<120> else
#<x_raw_width> = [#<x_plus_probed> - #<x_minus_probed>]
o<120> endif
(Completed probed width calculations)
#<x_probed_width> = [#<x_raw_width> - #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>]
(Probe Y Positioning Move, Y hint/2 + Step Off Width)
G91
G0 Y-[#<cal_diameter>/2 + #<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in Y, Y Hint + Step Off Width at Rapid Speed)
G0 Y[#<cal_diameter> + #<step_off_width> + #<xy_clearance>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G0 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_minus_probed> + #<y_plus_probed>] / 2]
(calculate Y Width Probed)
o<130> if [#<y_minus_probed> GT #<y_plus_probed>]
#<y_raw_width> = [#<y_minus_probed> - #<y_plus_probed>]
o<130> else
#<y_raw_width> = [#<y_plus_probed> - #<y_minus_probed>]
o<probe_round_boss> return
o<130> endif
(Completed probed width calculations)
#<y_probed_width> = [#<y_raw_width> - #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
#<averaged_diam> = [[#<x_probed_width> + #<y_probed_width>] / 2]
M68 E2 Q[#<averaged_diam>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>] Y[#<y_center_probed>]
o<140> if [#<cal_diameter> GT #<x_probed_width>]
(calculate calibration error and adjust calibration offset)
#<x_cal_error> = [[#<cal_diameter> - #<x_probed_width>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> - #<x_cal_error>]
o<140> else
#<x_cal_error> = [[#<x_probed_width> - #<cal_diameter>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> + #<x_cal_error>]
o<140> endif
o<150> if [#<cal_diameter> GT #<y_probed_width>]
(calculate calibration error and adjust calibration offset)
#<y_cal_error> = [[#<cal_diameter> - #<y_probed_width>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> - #<y_cal_error>]
o<150> else
#<y_cal_error> = [[#<y_probed_width> - #<cal_diameter>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> + #<y_cal_error>]
o<150> endif
#<new_avg_cal_offset> = [[#<new_x_cal_offset> + #<new_y_cal_offset>] / 2]
o<160> if [#<sq_cal_axis> EQ 0]
M68 E12 Q[ABS[#<new_avg_cal_offset>]]
o<160> else if [#<sq_cal_axis> EQ 1]
M68 E12 Q[ABS[#<new_x_cal_offset>]]
o<160> else
M68 E12 Q[ABS[#<new_y_cal_offset>]]
o<160> endif
#<x_zero> = [#<x_center_probed> + #<workspace_x>]
#<y_zero> = [#<y_center_probed> + #<workspace_y>]
(probe mode rules for WCO or probe position measuring only)
o<170> if [#<probe_mode> EQ 0]
(Record XY Zero in selected WCO)
G10 L2 P#5220 X[#<x_zero>] Y[#<y_zero>]
o<probe_cal_round_boss> return
o<170> endif
o<probe_cal_round_boss> endsub
M2 (end program)

View File

@@ -0,0 +1,204 @@
(author: Chris P)
(version: 0.1)
(date: 05/8/19)
(Probe calibration offset using defined diam round pocket)
(Start probe position is over left side edge of pocket wall)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_cal_round_pocket> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<cal_diameter> = #16 (=1.0000)
#<x_cal_width> = #17 (=0.0000)
#<y_cal_width> = #18 (=0.0000)
#<sq_cal_axis> = #19 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_cal_round_pocket> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Call sub "probe_z_minus_sub" to Probe top of Workpiece)
o<probe_z_minus_sub> call [#1][#2][#5][#8][#9][#15]
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x-)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(Call sub "probe_x_plus" to Probe x+)
o<probe_x_plus> call [#1][#3 + #13][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_plus_probed> + #<x_minus_probed>] / 2]
M68 E10 Q[#<x_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero)
G90
G0 X[#<x_center_probed>]
(Call sub "probe_y_plus" to Probe Y+)
o<probe_y_plus> call [#1][#3 + #13 / 2][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(Call sub "probe_y_minus" to Probe Y-)
o<probe_y_minus> call [#1][#3 + #13][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
M68 E11 Q[#<y_center_probed>]
(Probe Completion Move to Z Clearance Plane, Y Zero)
G90
G0 Y[#<y_center_probed>]
(Call sub "probe_x_minus" to Probe x-)
o<probe_x_minus> call [#1][#3 + #13 / 2][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(Call sub "probe_x_plus" to Probe x+)
o<probe_x_plus> call [#1][#3 + #13][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_plus_probed> + #<x_minus_probed>] / 2]
(calculate X Width Probed)
#<raw_width> = [#<x_plus_probed> - #<x_minus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
G90
G0 X[#<x_center_probed>]
(Call sub "probe_y_plus" to Probe Y+)
o<probe_y_plus> call [#1][#3 + #13 / 2][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(Call sub "probe_y_minus" to Probe Y-)
o<probe_y_minus> call [#1][#3 + #13][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_plus_probed> - #<y_minus_probed>]
(Completed probed diameter calculations)
#<y_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
#<averaged_diam> = [[#<x_probed_width> + #<y_probed_width>] / 2]
M68 E2 Q[#<averaged_diam>]
G90
G0 Y[#<y_center_probed>]
G91
G0 Z[#<z_probe_stack>]
o<120> if [#<cal_diameter> GT #<x_probed_width>]
(calculate calibration error and adjust calibration offset)
#<x_cal_error> = [[#<cal_diameter> - #<x_probed_width>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> + #<x_cal_error>]
o<120> else
#<x_cal_error> = [[#<x_probed_width> - #<cal_diameter>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> - #<x_cal_error>]
o<120> endif
o<130> if [#<cal_diameter> GT #<y_probed_width>]
(calculate calibration error and adjust calibration offset)
#<y_cal_error> = [[#<cal_diameter> - #<y_probed_width>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> + #<y_cal_error>]
o<130> else
#<y_cal_error> = [[#<y_probed_width> - #<cal_diameter>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> - #<y_cal_error>]
o<130> endif
#<new_avg_cal_offset> = [[#<new_x_cal_offset> + #<new_y_cal_offset>] / 2]
o<140> if [#<sq_cal_axis> EQ 0]
M68 E12 Q[ABS[#<new_avg_cal_offset>]]
o<140> else if [#<sq_cal_axis> EQ 1]
M68 E12 Q[ABS[#<new_x_cal_offset>]]
o<140> else
M68 E12 Q[ABS[#<new_y_cal_offset>]]
o<140> endif
#<x_zero> = [#<x_center_probed> + #<workspace_x>]
#<y_zero> = [#<y_center_probed> + #<workspace_y>]
(probe mode rules for WCO or probe position measuring only)
o<150> if [#<probe_mode> EQ 0]
(Record Y Zero in selected WCO)
G10 L2 P#5220 X[#<x_zero>] Y[#<y_zero>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
o<probe_cal_round_pocket> return
o<150> endif
o<probe_cal_round_pocket> endsub
M2 (end program)

View File

@@ -0,0 +1,204 @@
(author: Chris P)
(version: 0.1)
(date: 05/8/19)
(Probe calibration offset using defined width square boss)
(Start probe position is over center of stock in X and Y axis)
(within max z distance, ensure all settings have been)
(set properly according to help diagrams)
o<probe_cal_square_boss> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<cal_diameter> = #16 (=0.0000)
#<x_cal_width> = #17 (=1.0000)
#<y_cal_width> = #18 (=1.0000)
#<sq_cal_axis> = #19 (=1)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_cal_square_boss> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Call sub "probe_z_minus_sub" to Probe top of Workpiece)
o<probe_z_minus_sub> call [#1][#2][#5][#8][#9][#15]
(Probe X Positioning Move, X hint/2 + Step Off Width)
G91
G0 X-[#<x_hint>/2 + #<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in X, X Hint + Step Off Width at Rapid Speed)
G91
G0 X[#<x_hint> + #<step_off_width> + #<xy_clearance>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_minus_probed> + #<x_plus_probed>] / 2]
(calculate X Width Probed)
#<raw_width> = [#<x_minus_probed> - #<x_plus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> - #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>]
(Probe Y Positioning Move, Y hint/2 + Step Off Width)
G91
G0 Y-[#<y_hint>/2 + #<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in Y, Y Hint + Step Off Width at Rapid Speed)
G91
G0 Y[#<y_hint> + #<step_off_width> + #<xy_clearance>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G0 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_minus_probed> + #<y_plus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_minus_probed> - #<y_plus_probed>]
(Completed probed width calculations)
#<y_probed_width> = [#<raw_width> - #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>] Y[#<y_center_probed>]
o<120> if [#<x_cal_width> GT #<x_probed_width>]
(calculate calibration error and adjust calibration offset)
#<x_cal_error> = [[#<x_cal_width> - #<x_probed_width>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> - #<x_cal_error>]
o<120> else
#<x_cal_error> = [[#<x_probed_width> - #<x_cal_width>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> + #<x_cal_error>]
o<120> endif
o<130> if [#<y_cal_width> GT #<y_probed_width>]
(calculate calibration error and adjust calibration offset)
#<y_cal_error> = [[#<y_cal_width> - #<y_probed_width>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> - #<y_cal_error>]
o<130> else
#<y_cal_error> = [[#<y_probed_width> - #<y_cal_width>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> + #<y_cal_error>]
o<130> endif
#<new_avg_cal_offset> = [[#<new_x_cal_offset> + #<new_y_cal_offset>] / 2]
o<140> if [#<sq_cal_axis> EQ 0]
M68 E12 Q[ABS[#<new_avg_cal_offset>]]
o<140> else if [#<sq_cal_axis> EQ 1]
M68 E12 Q[ABS[#<new_x_cal_offset>]]
o<140> else
M68 E12 Q[ABS[#<new_y_cal_offset>]]
o<140> endif
#<x_zero> = [#<x_center_probed> + #<workspace_x>]
#<y_zero> = [#<y_center_probed> + #<workspace_y>]
(probe mode rules for WCO or probe position measuring only)
o<150> if [#<probe_mode> EQ 0]
(Record XY Zero in selected WCO)
G10 L2 P#5220 X[#<x_zero>] Y[#<y_zero>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
o<probe_cal_square_boss> return
o<150> endif
o<probe_cal_square_boss> endsub
M2 (end program)

View File

@@ -0,0 +1,162 @@
(author: Chris P)
(version: 0.1)
(date: 05/8/19)
(Probe calibration offset using defined width square pocket)
(Start probe position is over left side edge of pocket wall)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_cal_square_pocket> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<cal_diameter> = #16 (=0.0000)
#<x_cal_width> = #17 (=1.0000)
#<y_cal_width> = #18 (=1.0000)
#<sq_cal_axis> = #19 (=1)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_cal_square_pocket> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Call sub "probe_z_minus_sub" to Probe top of Workpiece)
o<probe_z_minus_sub> call [#1][#2][#5][#8][#9][#15]
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3 + #11][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_plus_probed> + #<x_minus_probed>] / 2]
(calculate X Width Probed)
#<raw_width> = [#<x_plus_probed> - #<x_minus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
G90
G0 X[#<x_center_probed>]
(Call sub "probe_y_plus" to Probe Y+ side of Workpiece)
o<probe_y_plus> call [#1][#3 + #12 / 2][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(Call sub "probe_y_minus" to Probe Y- side of Workpiece)
o<probe_y_minus> call [#1][#3 + #12][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_plus_probed> - #<y_minus_probed>]
(Completed probed width calculations)
#<y_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
G90
G0 Y[#<y_center_probed>]
G91
G0 Z[#<z_probe_stack>]
o<120> if [#<x_cal_width> GT #<x_probed_width>]
(calculate calibration error and adjust calibration offset)
#<x_cal_error> = [[#<x_cal_width> - #<x_probed_width>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> + #<x_cal_error>]
o<120> else
#<x_cal_error> = [[#<x_probed_width> - #<x_cal_width>] / 2]
#<new_x_cal_offset> = [#<calibration_offset> - #<x_cal_error>]
o<120> endif
o<130> if [#<y_cal_width> GT #<y_probed_width>]
(calculate calibration error and adjust calibration offset)
#<y_cal_error> = [[#<y_cal_width> - #<y_probed_width>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> + #<y_cal_error>]
o<130> else
#<y_cal_error> = [[#<y_probed_width> - #<y_cal_width>] / 2]
#<new_y_cal_offset> = [#<calibration_offset> - #<y_cal_error>]
o<130> endif
#<new_avg_cal_offset> = [[#<new_x_cal_offset> + #<new_y_cal_offset>] / 2]
o<140> if [#<sq_cal_axis> EQ 0]
M68 E12 Q[ABS[#<new_avg_cal_offset>]]
o<140> else if [#<sq_cal_axis> EQ 1]
M68 E12 Q[ABS[#<new_x_cal_offset>]]
o<140> else
M68 E12 Q[ABS[#<new_y_cal_offset>]]
o<140> endif
#<x_zero> = [#<x_center_probed> + #<workspace_x>]
#<y_zero> = [#<y_center_probed> + #<workspace_y>]
(probe mode rules for WCO or probe position measuring only)
o<150> if [#<probe_mode> EQ 0]
(Record X Zero in selected WCO)
G10 L2 P#5220 X[#<x_zero>] Y[#<y_zero>]
o<probe_cal_square_pocket> return
o<150> endif
o<probe_cal_square_pocket> endsub
M2 (end program)

View File

@@ -0,0 +1,155 @@
(author: Chris P)
(version: 0.1)
(date: 05/7/19)
(Probe Corner X minus Edge Angle for x,y,z 0,0,0 position)
(Start probe position is over front right corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_corner_x_minus_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_corner_x_minus_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<z1x> = #5420
#<z1y> = #5421
(Probe X Positioning Move, Step Off Width)
G91
G0 y-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p1x> = #5420
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<p1y> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_corner_x_minus_edge_angle> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move, Traverse Workpiece at Z Clearance plane)
G0 X[#<step_off_width>] Y[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p2y> = #5421
(Call sub "probe_x_minus" to Probe X- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<p2x> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_corner_x_minus_edge_angle> return
o<130> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 Y[#<edge_width>]
#<p3y> = #5421
(Call sub "probe_x_minus" to Probe X- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<p3x> = #<_value>
(value returned safety check, aborts if no value returned)
o<140> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_corner_x_minus_edge_angle> return
o<140> endif
#<edge_delta> = [#<p2x> - #<p3x>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
#<c1xr> = [#<z1x> + [#<p2x> - #<z1x>] * COS[-#<edge_angle>] - [#<p2y> - #<z1y>] * SIN[-#<edge_angle>]]
#<c1yr> = [#<z1y> + [#<p1x> - #<z1x>] * SIN[-#<edge_angle>] + [#<p1y> - #<z1y>] * COS[-#<edge_angle>]]
#<c1x> = [#<z1x> + [#<c1xr> - #<z1x>] * COS[#<edge_angle>] - [#<c1yr> - #<z1y>] * SIN[#<edge_angle>]]
#<c1y> = [#<z1y> + [#<c1xr> - #<z1x>] * SIN[#<edge_angle>] + [#<c1yr> - #<z1y>] * COS[#<edge_angle>]]
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<c1x>] Y[#<c1y>]
(probe mode rules for WCO,Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>]
o<probe_corner_x_minus_edge_angle> return
o<150> endif
(probe mode rules for WCO,Rotation and probe position measuring only)
o<160> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>] R[#<edge_angle>]
o<probe_corner_x_minus_edge_angle> return
o<160> endif
o<probe_corner_x_minus_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,155 @@
(author: Chris P)
(version: 0.1)
(date: 05/7/19)
(Probe Corner X plus Edge Angle for x,y,z 0,0,0 position)
(Start probe position is over back left corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_corner_x_plus_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_corner_x_plus_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<z1x> = #5420
#<z1y> = #5421
(Probe X Positioning Move, Step Off Width)
G91
G0 y[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p1x> = #5420
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<p1y> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_corner_x_plus_edge_angle> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move, Traverse Workpiece at Z Clearance plane)
G0 X-[#<step_off_width>] Y-[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p2y> = #5421
(Call sub "probe_x_plus" to Probe X+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<p2x> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_corner_x_plus_edge_angle> return
o<130> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 Y-[#<edge_width>]
#<p3y> = #5421
(Call sub "probe_x_plus" to Probe X+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<p3x> = #<_value>
(value returned safety check, aborts if no value returned)
o<140> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_corner_x_plus_edge_angle> return
o<140> endif
#<edge_delta> = [#<p3x> - #<p2x>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
#<c1xr> = [#<z1x> + [#<p2x> - #<z1x>] * COS[-#<edge_angle>] - [#<p2y> - #<z1y>] * SIN[-#<edge_angle>]]
#<c1yr> = [#<z1y> + [#<p1x> - #<z1x>] * SIN[-#<edge_angle>] + [#<p1y> - #<z1y>] * COS[-#<edge_angle>]]
#<c1x> = [#<z1x> + [#<c1xr> - #<z1x>] * COS[#<edge_angle>] - [#<c1yr> - #<z1y>] * SIN[#<edge_angle>]]
#<c1y> = [#<z1y> + [#<c1xr> - #<z1x>] * SIN[#<edge_angle>] + [#<c1yr> - #<z1y>] * COS[#<edge_angle>]]
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<c1x>] Y[#<c1y>]
(probe mode rules for WCO,Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>]
o<probe_corner_x_plus_edge_angle> return
o<150> endif
(probe mode rules for WCO,Rotation and probe position measuring only)
o<160> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>] R[#<edge_angle>]
o<probe_corner_x_plus_edge_angle> return
o<160> endif
o<probe_corner_x_plus_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,155 @@
(author: Chris P)
(version: 0.1)
(date: 05/7/19)
(Probe Corner Y minus Edge Angle for x,y,z 0,0,0 position)
(Start probe position is over back right corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_corner_y_minus_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_corner_y_minus_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<z1x> = #5420
#<z1y> = #5421
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p1y> = #5421
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<p1x> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_corner_y_minus_edge_angle> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move, Traverse Workpiece at Z Clearance plane)
G0 X-[#<step_off_width>] Y[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p2x> = #5420
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<p2y> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_corner_y_minus_edge_angle> return
o<130> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 X-[#<edge_width>]
#<p3x> = #5420
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<p3y> = #<_value>
(value returned safety check, aborts if no value returned)
o<140> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_corner_y_minus_edge_angle> return
o<140> endif
#<edge_delta> = [#<p2y> - #<p3y>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
#<c1xr> = [#<z1x> + [#<p1x> - #<z1x>] * COS[-#<edge_angle>] - [#<p1y> - #<z1y>] * SIN[-#<edge_angle>]]
#<c1yr> = [#<z1y> + [#<p2x> - #<z1x>] * SIN[-#<edge_angle>] + [#<p2y> - #<z1y>] * COS[-#<edge_angle>]]
#<c1x> = [#<z1x> + [#<c1xr> - #<z1x>] * COS[#<edge_angle>] - [#<c1yr> - #<z1y>] * SIN[#<edge_angle>]]
#<c1y> = [#<z1y> + [#<c1xr> - #<z1x>] * SIN[#<edge_angle>] + [#<c1yr> - #<z1y>] * COS[#<edge_angle>]]
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<c1x>] Y[#<c1y>]
(probe mode rules for WCO,Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>]
o<probe_corner_y_minus_edge_angle> return
o<150> endif
(probe mode rules for WCO,Rotation and probe position measuring only)
o<160> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>] R[#<edge_angle>]
o<probe_corner_y_minus_edge_angle> return
o<160> endif
o<probe_corner_y_minus_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,155 @@
(author: Chris P)
(version: 0.1)
(date: 05/7/19)
(Probe Corner Y Plus Edge Angle for x,y,z 0,0,0 position)
(Start probe position is over front left corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_corner_y_plus_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_corner_y_plus_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<z1x> = #5420
#<z1y> = #5421
(Probe X Positioning Move, Step Off Width)
G91
G0 X-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p1y> = #5421
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<p1x> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_corner_y_plus_edge_angle> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move, Traverse Workpiece at Z Clearance plane)
G0 X[#<step_off_width>] Y-[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
#<p2x> = #5420
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<p2y> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_corner_y_plus_edge_angle> return
o<130> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 X[#<edge_width>]
#<p3x> = #5420
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<p3y> = #<_value>
(value returned safety check, aborts if no value returned)
o<140> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_corner_y_plus_edge_angle> return
o<140> endif
#<edge_delta> = [#<p3y> - #<p2y>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
#<c1xr> = [#<z1x> + [#<p1x> - #<z1x>] * COS[-#<edge_angle>] - [#<p1y> - #<z1y>] * SIN[-#<edge_angle>]]
#<c1yr> = [#<z1y> + [#<p2x> - #<z1x>] * SIN[-#<edge_angle>] + [#<p2y> - #<z1y>] * COS[-#<edge_angle>]]
#<c1x> = [#<z1x> + [#<c1xr> - #<z1x>] * COS[#<edge_angle>] - [#<c1yr> - #<z1y>] * SIN[#<edge_angle>]]
#<c1y> = [#<z1y> + [#<c1xr> - #<z1x>] * SIN[#<edge_angle>] + [#<c1yr> - #<z1y>] * COS[#<edge_angle>]]
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<c1x>] Y[#<c1y>]
(probe mode rules for WCO,Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>]
o<probe_corner_y_plus_edge_angle> return
o<150> endif
(probe mode rules for WCO,Rotation and probe position measuring only)
o<160> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<c1x> + #<workspace_x>] Y[#<c1y> + #<workspace_y>] R[#<edge_angle>]
o<probe_corner_y_plus_edge_angle> return
o<160> endif
o<probe_corner_y_plus_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,116 @@
(author: Chris P)
(version: 0.4)
(date: 04/25/19)
(Probe top front edge angle for y,z 0,0 position and edge angle)
(Start probe position is over front edge of stock, set edge width,)
(step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_front_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_front_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<x_start_position> = #5420
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y-[#<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_zero_edge_start> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_front_edge_angle> return
o<120> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 X[#<edge_width>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_zero_edge_end> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_front_edge_angle> return
o<130> endif
#<edge_delta> = [#<y_plus_zero_edge_end> - #<y_plus_zero_edge_start>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_start_position>] Y[#<y_plus_zero_edge_start>]
(probe mode rules for WCO, Rotation and probe position measuring only)
o<140> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_start_position>] Y[#<y_plus_zero_edge_start> + #<workspace_y>]
o<probe_front_edge_angle> return
o<140> endif
(probe mode rules for WCO, Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_start_position>] Y[#<y_plus_zero_edge_start> + #<workspace_y>] R[#<edge_angle>]
o<probe_front_edge_angle> return
o<150> endif
o<probe_front_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,110 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe front left inside corner for x,y,z 0,0,0 position)
(Start probe position is over front left inside corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_front_left_inside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_front_left_inside_corner> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Traverse Workpiece Top at Z Clearance Height plane)
G91
G0 X[#<step_off_width>] Y[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
G90
(Current X Position including offsets in current program units)
#<x_start> = #5420
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_front_left_inside_corner> return
o<120> endif
(move to X start Position)
G90
G0 X[#<x_start>]
(Current Y Position including offsets in current program units)
#<y_start> = #5421
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_front_left_inside_corner> return
o<130> endif
(move to Y start Position)
G90
G0 Y[#<y_start>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_minus_zero_edge>] Y[#<y_minus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_minus_zero_edge> + #<workspace_y>]
o<probe_front_left_inside_corner> return
o<140> endif
o<probe_front_left_inside> endsub
M2 (end program)

View File

@@ -0,0 +1,106 @@
(author: Chris P)
(version: 0.4)
(date: 04/25/19)
(Probe front left top corner for x,y,z 0,0,0 position)
(Start probe position is over front left corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_front_left_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_front_left_outside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Step Off Width)
G91
G0 X-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_front_left_outside> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move, Traverse Workpiece at Z Clearance plane)
G0 X[#<step_off_width>] Y-[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_front_left_outside> return
o<130> endif
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_plus_zero_edge>] Y[#<y_plus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_plus_zero_edge> + #<workspace_y>]
o<probe_front_left_outside> return
o<140> endif
o<probe_front_left_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,82 @@
(author: Chris P)
(version: 0.4)
(date: 04/25/19)
(Probe front top side for y,z 0,0 position)
(Start probe position is over front edge of stock)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_front_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<Probe_front_outside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y-[#<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_front_outside> return
o<120> endif
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 Y[#<y_plus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<130> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 Y[#<y_plus_zero_edge> + #<workspace_y>]
o<probe_front_outside> return
o<130> endif
o<probe_front_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,113 @@
(author: Chris P)
(version: 0.1)
(date: 04/23/19)
(Probe front right inside corner for x,y,z 0,0,0 position)
(Start probe position is over front right inside corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_front_right_inside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_front_right_inside_corner> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Call sub "probe_z_minus_sub" to Probe top of Workpiece)
o<probe_z_minus_sub> call [#1][#2][#5][#8][#9][#15]
(Probe X Positioning Move, Step Off Width X and Y)
G91
G0 X-[#<step_off_width>] Y[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
G90
(Current X Position including offsets in current program units)
#<x_start> = #5420
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_front_right_inside_corner> return
o<120> endif
(move to X start Position)
G90
G0 X[#<x_start>]
(Current Y Position including offsets in current program units)
#<y_start> = #5421
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_front_right_inside_corner> return
o<130> endif
(move to Y start Position)
G90
G0 Y[#<y_start>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_plus_zero_edge>] Y[#<y_minus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_minus_zero_edge> + #<workspace_y>]
o<probe_front_right_inside_corner> return
o<140> endif
o<probe_front_right_inside> endsub
M2 (end program)

View File

@@ -0,0 +1,106 @@
(author: Chris P)
(version: 0.1)
(date: 04/23/19)
(Probe front right top corner for x,y,z 0,0,0 position)
(Start probe position is over front right corner of stock)
(inside the step off width square and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_front_right_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_front_right_outside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_front_right_outside> return
o<120> endif
(Probe Y Positioning Move, up to Z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Probe Y Positioning Move, Traverse Workpiece Top at Z Clearance Height plane)
G0 X-[#<step_off_width>] Y-[#<step_off_width>]
(Probe Y Positioning Move,to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y- side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing Y Sub returned edge parameter, aborting)
o<probe_front_right_outside> return
o<130> endif
(Probe Completion Move to Z Clearance Plane, and XY Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_minus_zero_edge>] Y[#<y_plus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_plus_zero_edge> + #<workspace_y>]
o<probe_front_right_outside> return
o<140> endif
o<probe_front_right_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,116 @@
(author: Chris P)
(version: 0.3)
(date: 04/25/19)
(Probe top left edge angle for y,z 0,0 position and edge angle)
(Start probe position is over left edge of stock, set edge width,)
(step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_left_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_left_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<y_start_position> = #5421
(Probe X Positioning Move, Step Off Width)
G91
G0 X-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_zero_edge_start> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_left_edge_angle> return
o<120> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 Y-[#<edge_width>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_zero_edge_end> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_left_edge_angle> return
o<130> endif
#<edge_delta> = [#<x_plus_zero_edge_end> - #<x_plus_zero_edge_start>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_plus_zero_edge_start>] Y[#<y_start_position>]
(probe mode rules for WCO, Rotation and probe position measuring only)
o<140> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge_start> + #<workspace_x>] Y[#<y_start_position>]
o<probe_left_edge_angle> return
o<140> endif
(probe mode rules for WCO, Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge_start> + #<workspace_x>] Y[#<y_start_position>] R[#<edge_angle>]
o<probe_left_edge_angle> return
o<150> endif
o<probe_left_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,82 @@
(author: Chris P)
(version: 0.3)
(date: 04/25/19)
(Probe left top side for x,z 0,0 position)
(Start probe position is over left side edge of stock)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_left_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<Probe_left_outside> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Step Off Width)
G91
G0 X-[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_left_outside> return
o<120> endif
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_plus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<130> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge> + #<workspace_x>]
o<probe_left_outside> return
o<130> endif
o<probe_left_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,164 @@
(author: Chris P)
(version: 0.1)
(date: 04/27/19)
(Probe Boss in X and Y Axes, find center and z 0 position)
(Start probe position is over center of stock in X and Y axis)
(within max z distance, ensure all settings have been)
(set properly according to help diagrams)
o<probe_rect_boss> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_rect_boss> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, X hint/2 + Step Off Width)
G91
G0 X-[#<x_hint>/2 + #<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in X, X Hint + Step Off Width at Rapid Speed)
G91
G0 X[#<x_hint> + #<step_off_width>*2]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_minus_probed> + #<x_plus_probed>] / 2]
(calculate X Width Probed)
#<raw_width> = [#<x_minus_probed> - #<x_plus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> - #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>]
(Probe Y Positioning Move, Y hint/2 + Step Off Width)
G91
G0 Y-[#<y_hint>/2 + #<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in Y, Y Hint + Step Off Width at Rapid Speed)
G91
G0 Y[#<y_hint> + #<step_off_width>*2]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G0 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_minus_probed> + #<y_plus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_minus_probed> - #<y_plus_probed>]
(Completed probed width calculations)
#<y_probed_width> = [#<raw_width> - #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>] Y[#<y_center_probed>]
(probe mode rules for WCO or probe position measuring only)
o<120> if [#<probe_mode> EQ 0]
(Record XY Zero in selected WCO)
G10 L2 P#5220 X[#<x_center_probed> + #<workspace_x>] Y[#<y_center_probed> + #<workspace_y>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
o<probe_rect_boss> return
o<120> endif
o<probe_rect_boss> endsub
M2 (end program)

View File

@@ -0,0 +1,135 @@
(author: Chris P)
(version: 0.1)
(date: 04/26/19)
(Probe rect pocket center measure x and widths, find xy center position)
(Start probe position is over left side edge of pocket wall)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_rect_pocket> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_rect_pocket> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe Z Positioning Move, to Probing Depth)
G91
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Probe X Positioning Move, Step Off Width)
G0 X-[#<x_hint>/2 - #<step_off_width>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<x_hint> - #<step_off_width> - #<xy_clearance>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_plus_probed> + #<x_minus_probed>] / 2]
(calculate X Width Probed)
#<raw_width> = [#<x_plus_probed> - #<x_minus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero)
G90
G0 X[#<x_center_probed>]
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y[#<y_hint>/2 - #<step_off_width>]
(Call sub "probe_y_plus" to Probe Y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y-[#<y_hint> - #<step_off_width> - #<xy_clearance>]
(Call sub "probe_y_minus" to Probe Y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_plus_probed> - #<y_minus_probed>]
(Completed probed width calculations)
#<y_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
G90
G0 Y[#<y_center_probed>]
G91
G0 Z[#<z_probe_stack>]
(probe mode rules for WCO or probe position measuring only)
o<120> if [#<probe_mode> EQ 0]
(Record X Zero in selected WCO)
G10 L2 P#5220 X[#<x_center_probed> + #<workspace_x>] Y[#<y_center_probed> + #<workspace_y>]
o<probe_rect_pocket> return
o<120> endif
o<probe_rect_pocket> endsub
M2 (end program)

View File

@@ -0,0 +1,114 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Ridge in X Axis to find center and z 0 position)
(Start probe position is over center of stock in the X axis)
(within max z distance, ensure all settings have been)
(set properly according to help diagrams)
o<probe_ridge_x> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_ridge_x> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, X hint/2 + Step Off Width)
G91
G0 X-[#<x_hint>/2 + #<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in X, X Hint + Step Off Width at Rapid Speed)
G0 X[#<x_hint> + #<step_off_width> + #<xy_clearance>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_plus_probed> + #<x_minus_probed>] / 2]
(calculate X Width Probed)
#<raw_width> = [#<x_minus_probed> - #<x_plus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> - #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>]
(probe mode rules for WCO or probe position measuring only)
o<120> if [#<probe_mode> EQ 0]
(Record X Zero in selected WCO)
G10 L2 P#5220 X[#<x_center_probed> + #<workspace_x>]
o<probe_ridge_x> return
o<120> endif
o<probe_ridge_x> endsub
M2 (end program)

View File

@@ -0,0 +1,115 @@
(author: Chris P)
(version: 0.1)
(date: 04/24/19)
(Probe Ridge in Y Axis to find center and z 0 position)
(Start probe position is over center of stock in the Y axis)
(within max z distance, ensure all settings have been)
(set properly according to help diagrams)
o<probe_ridge_y> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_ridge_y> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe Y Positioning Move, Y hint/2 + Step Off Width)
G91
G0 Y-[#<y_hint>/2 + #<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in Y, Y Hint + Step Off Width at Rapid Speed)
G0 Y[#<y_hint> + #<step_off_width> + #<xy_clearance>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_minus_probed> - #<y_plus_probed>]
(Completed probed width calculations)
#<y_probed_width> = [#<raw_width> - #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 Y[#<y_center_probed>]
(probe mode rules for WCO or probe position measuring only)
o<120> if [#<probe_mode> EQ 0]
(Record Y Zero in selected WCO)
G10 L2 P#5220 Y[#<y_center_probed> + #<workspace_y>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
o<probe_ridge_y> return
o<120> endif
o<probe_ridge_y> endsub
M2 (end program)

View File

@@ -0,0 +1,116 @@
(author: Chris P)
(version: 0.3)
(date: 04/25/19)
(Probe top right edge angle for y,z 0,0 position and edge angle)
(Start probe position is over right edge of stock, set edge width,)
(step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_right_edge_angle> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
#<wco_rotation> = #16 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<Probe_right_edge_angle> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
#<y_start_position> = #5421
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_zero_edge_start> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<Probe_right_edge_angle> return
o<120> endif
(edge width move to edge second probing point)
G91
F[#<probe_fast_fr>]
G1 Y[#<edge_width>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_zero_edge_end> = #<_value>
(value returned safety check, aborts if no value returned)
o<130> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<Probe_right_edge_angle> return
o<130> endif
#<edge_delta> = [#<x_minus_zero_edge_start> - #<x_minus_zero_edge_end>]
#<edge_angle> = [ATAN [#<edge_delta>] / [#<edge_width>]]
M68 E4 Q[#<edge_delta>]
M68 E3 Q[#<edge_angle>]
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_minus_zero_edge_start>] Y[#<y_start_position>]
(probe mode rules for WCO, Rotation and probe position measuring only)
o<140> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge_start> + #<workspace_x>] Y[#<y_start_position>]
o<Probe_right_edge_angle> return
o<140> endif
(probe mode rules for WCO, Rotation and probe position measuring only)
o<150> if [#<probe_mode> EQ 0 AND #<wco_rotation> EQ 1]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge_start> + #<workspace_x>] Y[#<y_start_position>] R[#<edge_angle>]
o<Probe_right_edge_angle> return
o<150> endif
o<probe_right_edge_angle> endsub
M2 (end program)

View File

@@ -0,0 +1,82 @@
(author: Chris P)
(version: 0.3)
(date: 04/25/19)
(Probe right top side for x,z 0,0 position)
(Start probe position is over right side edge of stock)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_right_outside> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<Probe_right_top_side> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probing depth from the z probed clearance height, used for z moves)
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_zero_edge> = #<_value>
(value returned safety check, aborts if no value returned)
o<120> if [#<probe_mode> EQ 1 AND #<_value_returned> NE 1]
(MSG, Missing X Sub returned edge parameter, aborting)
o<probe_right_top_side> return
o<120> endif
(Probe Completion Move to Z Clearance Plane, and Y Zero)
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_minus_zero_edge>]
(probe mode rules for WCO or probe position measuring only)
o<130> if [#<probe_mode> EQ 0]
(Record Zero in selected axes and WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge> + #<workspace_x>]
o<probe_right_top_side> return
o<130> endif
o<probe_right_outside> endsub
M2 (end program)

View File

@@ -0,0 +1,188 @@
(author: Chris P)
(version: 0.1)
(date: 04/27/19)
(Probe Boss in X and Y Axes, find center, Diam and z 0 position)
(Start probe position is over center of stock in X and Y axis)
(within max z distance, ensure all settings have been)
(set properly according to help diagrams)
o<probe_round_boss> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_round_boss> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe X Positioning Move, X hint/2 + Step Off Width)
G91
G0 X-[#<diameter_hint>/2 + #<step_off_width>]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in X, X Hint + Step Off Width at Rapid Speed)
G91
G0 X[#<diameter_hint> + #<step_off_width>*2 ]
(Probe X Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_minus_probed> + #<x_plus_probed>] / 2]
M68 E10 Q[#<x_center_probed>]
G91
G0 Z[#<z_probe_stack>]
G90
G0 X[#<x_center_probed>]
(Probe Y Positioning Move, Y hint/2 + Step Off Width)
G91
G0 Y-[#<diameter_hint>/2 + #<step_off_width>]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Call sub "probe_y_plus" to Probe y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(first side Probe Completion Move to Z Clearance Plane)
G91
G0 Z[#<z_probe_stack>]
(Positioning move in Y, Y Hint + Step Off Width at Rapid Speed)
G91
G0 Y[#<diameter_hint> + #<step_off_width>*2]
(Probe Y Positioning Move, to Probing Depth)
F[#<probe_fast_fr>]
G0 Z-[#<z_probe_stack>]
(Call sub "probe_y_minus" to Probe y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_minus_probed> + #<y_plus_probed>] / 2]
M68 E11 Q[#<y_center_probed>]
(Move to z clearance plane)
G91
G0 Z[#<z_probe_stack>]
(Move to Y Center)
G90
G0 Y[#<y_center_probed>]
(calculate X Width Probed)
o<120> if [#<x_minus_probed> GT #<x_plus_probed>]
#<x_raw_width> = [#<x_minus_probed> - #<x_plus_probed>]
o<120> else
#<x_raw_width> = [#<x_plus_probed> - #<x_minus_probed>]
o<120> endif
(Completed probed width calculations)
#<x_probed_width> = [#<x_raw_width> - #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
G90
G0 X[#<x_center_probed>]
(probed center calculation)
#<y_center_probed> = [[#<y_minus_probed> + #<y_plus_probed>] / 2]
(calculate Y Width Probed)
o<130> if [#<y_minus_probed> GT #<y_plus_probed>]
#<y_raw_width> = [#<y_minus_probed> - #<y_plus_probed>]
o<130> else
#<y_raw_width> = [#<y_plus_probed> - #<y_minus_probed>]
o<130> endif
(Completed probed width calculations)
#<y_probed_width> = [#<y_raw_width> - #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
#<averaged_diam> = [[#<x_probed_width> + #<y_probed_width>] / 2]
M68 E2 Q[#<averaged_diam>]
#<x_zero> = [#<x_center_probed> + #<workspace_x>]
#<y_zero> = [#<y_center_probed> + #<workspace_y>]
(probe mode rules for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record XY Zero in selected WCO)
G10 L2 P#5220 X[#<x_zero>] Y[#<y_zero>]
o<probe_round_boss> return
o<140> endif
o<probe_round_boss> endsub
M2 (end program)

View File

@@ -0,0 +1,147 @@
(author: Chris P)
(version: 0.1)
(date: 04/26/19)
(Probe round pocket center measure x and y Diam, find xy center position)
(Start probe position is over left side edge of pocket wall)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_round_pocket> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_round_pocket> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe Z Positioning Move, to Probing Depth)
G91
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Probe X Positioning Move, Step Off Width)
G0 X-[#<diameter_hint>/2 - #<step_off_width>]
(Call sub "probe_x_minus" to Probe x-)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<diameter_hint> - #<step_off_width> - #<xy_clearance>]
(Call sub "probe_x_plus" to Probe x+)
o<probe_x_plus> call [#1][#3 + #13][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_plus_probed> + #<x_minus_probed>] / 2]
M68 E10 Q[#<x_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero)
G90
G0 X[#<x_center_probed>]
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y[#<diameter_hint>/2 - #<step_off_width>]
(Call sub "probe_y_plus" to Probe Y+)
o<probe_y_plus> call [#1][#3 + #13 / 2][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y-[#<diameter_hint> - #<step_off_width> - #<xy_clearance>]
(Call sub "probe_y_minus" to Probe Y-)
o<probe_y_minus> call [#1][#3 + #13][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
M68 E11 Q[#<y_center_probed>]
(calculate X Width Probed)
#<raw_width> = [#<x_plus_probed> - #<x_minus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_plus_probed> - #<y_minus_probed>]
(Completed probed diameter calculations)
#<y_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
#<averaged_diam> = [[#<x_probed_width> + #<y_probed_width>] / 2]
M68 E2 Q[#<averaged_diam>]
G90
G0 Y[#<y_center_probed>]
G91
G0 Z[#<z_probe_stack>]
(probe mode rules for WCO or probe position measuring only)
o<120> if [#<probe_mode> EQ 0]
(Record Y Zero in selected WCO)
G10 L2 P#5220 X[#<x_center_probed> + #<workspace_x>]
G10 L2 P#5220 Y[#<y_center_probed> + #<workspace_y>]
(Probe Completion Move to Z Clearance Plane, and X Zero, Y Zero)
o<probe_round_pocket> return
o<120> endif
o<probe_round_pocket> endsub
M2 (end program)

View File

@@ -0,0 +1,101 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe valley in x, find Z0, X0 valley center position)
(Start probe position is over left side edge of valley wall)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_valley_x> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_valley_x> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
(Probe Z Positioning Move, to Probing Depth)
G91
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Probe X Positioning Move, Step Off Width)
G0 X-[#<x_hint>/2 - #<step_off_width>]
(Call sub "probe_x_minus" to Probe x- side of Workpiece)
o<probe_x_minus> call [#1][#3][#4][#8][#9][#10]
#<x_minus_probed> = #5061
(Probe X Positioning Move, Step Off Width)
G91
G0 X[#<x_hint> - #<step_off_width>*2]
(Call sub "probe_x_plus" to Probe x+ side of Workpiece)
o<probe_x_plus> call [#1][#3][#4][#8][#9][#10]
#<x_plus_probed> = #5061
(probed center calculation)
#<x_center_probed> = [[#<x_plus_probed> + #<x_minus_probed>] / 2]
(calculate X Width Probed)
#<raw_width> = [#<x_plus_probed> - #<x_minus_probed>]
(Completed probed width calculations)
#<x_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E0 Q[#<x_probed_width>]
M68 E10 Q[#<x_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero)
G90
G0 X[#<x_center_probed>]
G91
G0 Z[#<z_probe_stack>]
(probe mode rules for WCO or probe position measuring only)
o<120> if [#<probe_mode> EQ 0]
(Record X Zero in selected WCO)
G10 L2 P#5220 X[#<x_center_probed> + #<workspace_x>]
o<probe_valley_x> return
o<120> endif
o<probe_valley_x> endsub
M2 (end program)

View File

@@ -0,0 +1,99 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe valley in Y, find Z0, Y0 valley center position)
(Start probe position is over back side edge of valley wall)
(inside the step off width distance and within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_valley_y> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_valley_y> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(remove probe tip diam and cal offset from probed width calculations)
#<probe_diameter_offset> = [#<probe_diameter> - [#<calibration_offset> * 2]]
#<z_probe_stack> = [#<z_clearance> + #<probe_diameter> + #<extra_probe_depth>]
G91
F[#<probe_fast_fr>]
G1 Z-[#<z_probe_stack>]
(Probe Y Positioning Move, Step Off Width)
G0 Y[#<y_hint>/2 - #<step_off_width>]
(Call sub "probe_y_plus" to Probe Y+ side of Workpiece)
o<probe_y_plus> call [#1][#3][#4][#8][#9][#10]
#<y_plus_probed> = #5062
(Probe Y Positioning Move, Step Off Width)
G91
G0 Y-[#<y_hint> - #<step_off_width>*2]
(Call sub "probe_y_minus_sub" to Probe Y- side of Workpiece)
o<probe_y_minus> call [#1][#3][#4][#8][#9][#10]
#<y_minus_probed> = #5062
(probed center calculation)
#<y_center_probed> = [[#<y_plus_probed> + #<y_minus_probed>] / 2]
(calculate Y Width Probed)
#<raw_width> = [#<y_plus_probed> - #<y_minus_probed>]
(Completed probed width calculations)
#<y_probed_width> = [#<raw_width> + #<probe_diameter_offset>]
M68 E1 Q[#<y_probed_width>]
M68 E11 Q[#<y_center_probed>]
(Probe Completion Move to Z Clearance Plane, and X Zero)
G90
G0 Y[#<y_center_probed>]
G91
G0 Z[#<z_probe_stack>]
(probe mode rules for WCO or probe position measuring only)
o<120> if [#<probe_mode> EQ 0]
(Record X Zero in selected WCO)
G10 L2 P#5220 Y[#<y_center_probed> + #<workspace_y>]
o<probe_valley_y> return
o<120> endif
o<probe_valley_y> endsub
M2 (end program)

View File

@@ -0,0 +1,85 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe X Minus direction and set X 0 in current WCO)
(Start probe position to the right side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_x_minus> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1
#<max_xy_distance> = #2
#<xy_clearance> = #3
#<probe_slow_fr> = #4
#<probe_fast_fr> = #5
#<calibration_offset> = #6
(Cancel G92 offsets)
G92.1
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_x_minus> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current X Position including offsets in current program units)
#<x> = #5420
(Initiate Fast X- Probe)
G91
F[#<probe_fast_fr>]
G38.2 X-[#<max_xy_distance>]
#<x_minus_probed> = #5061
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 X#<x>
F[#<probe_fast_fr>]
(return from sub)
o<probe_x_minus> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 X[#<x_minus_probed> + #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow X- Probe)
G91
F[#<probe_slow_fr>]
G38.2 X-[#<xy_clearance> * 2]
#<x_minus_probed> = #5061
; (debug, Probed Pos: #5061 X Pos: #<_x>)
G90
G0 X[#<x_minus_probed> + #<xy_clearance>]
o<130> endif
#<x_minus_zero_edge> = [#<x_minus_probed> - #<probe_center_offset>]
(defines the edge as x_probed_position for DRO reporting)
#<x_minus_probed_position> = #<x_minus_zero_edge>
(analog aio output to gui DRO "X PROBED POSITION")
M68 E5 Q[#<x_minus_probed_position>]
o<probe_x_minus> endsub [#<x_minus_zero_edge>]
M2 (end program)

View File

@@ -0,0 +1,103 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe X Minus direction and set X 0 in current WCO)
(Start probe position to the right side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_x_minus_wco> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_x_minus_wco> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current X Position including offsets in current program units)
#<x> = #5420
(Initiate Fast X- Probe)
G91
F[#<probe_fast_fr>]
G38.2 X-[#<max_xy_distance>]
#<x_minus_probed> = #5061
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 X#<x>
F[#<probe_fast_fr>]
(return from sub)
o<probe_x_minus_wco> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 X[#<x_minus_probed> + #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow X- Probe)
G91
F[#<probe_slow_fr>]
G38.2 X-[#<xy_clearance> * 2]
#<x_minus_probed> = #5061
; (debug, Probed Pos: #5061 X Pos: #<_x>)
G90
G0 X[#<x_minus_probed> + #<xy_clearance>]
o<130> endif
#<x_minus_zero_edge> = [#<x_minus_probed> - #<probe_center_offset>]
(defines the edge as x_probed_position for DRO reporting)
#<x_minus_probed_position> = #<x_minus_zero_edge>
(analog aio output to gui DRO "X PROBED POSITION")
M68 E5 Q[#<x_minus_probed_position>]
(probe mode rule for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record X Zero in selected WCO)
G10 L2 P#5220 X[#<x_minus_zero_edge> + #<workspace_x>]
o<probe_x_minus_wco> return
o<140> endif
o<probe_x_minus_wco> endsub
M2 (end program)

View File

@@ -0,0 +1,85 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe X plus direction and set X 0 in current WCO)
(Start probe position to the left side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_x_plus> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1
#<max_xy_distance> = #2
#<xy_clearance> = #3
#<probe_slow_fr> = #4
#<probe_fast_fr> = #5
#<calibration_offset> = #6
(Cancel G92 offsets)
G92.1
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_x_plus> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current X Position including offsets in current program units)
#<x> = #5420
(Initiate Fast X+ Probe)
G91
F[#<probe_fast_fr>]
G38.2 X[#<max_xy_distance>]
#<x_plus_probed> = #5061
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 X#<x>
F[#<probe_fast_fr>]
(return from sub)
o<probe_x_plus> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 X[#<x_plus_probed> - #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow X+ Probe)
G91
F[#<probe_slow_fr>]
G38.2 X[#<xy_clearance> * 2]
#<x_plus_probed> = #5061
; (debug, Probed Pos: #5061 X Pos: #<_x>)
G90
G0 X[#<x_plus_probed> - #<xy_clearance>]
o<130> endif
#<x_plus_zero_edge> = [#<x_plus_probed> + #<probe_center_offset>]
(defines the edge as x_probed_position for DRO reporting)
#<x_plus_probed_position> = #<x_plus_zero_edge>
(analog aio output to gui DRO "X PROBED POSITION")
M68 E8 Q[#<x_plus_probed_position>]
o<probe_x_plus> endsub [#<x_plus_zero_edge>]
M2 (end program)

View File

@@ -0,0 +1,103 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe X plus direction and set X 0 in current WCO)
(Start probe position to the left side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_x_plus_wco> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_x> = #[5201 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_x_plus_wco> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current X Position including offsets in current program units)
#<x> = #5420
(Initiate Fast X+ Probe)
G91
F[#<probe_fast_fr>]
G38.2 X[#<max_xy_distance>]
#<x_plus_probed> = #5061
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 X#<x>
F[#<probe_fast_fr>]
(return from sub)
o<probe_x_plus_wco> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 X[#<x_plus_probed> - #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow X+ Probe)
G91
F[#<probe_slow_fr>]
G38.2 X[#<xy_clearance> * 2]
#<x_plus_probed> = #5061
; (debug, Probed Pos: #5061 X Pos: #<_x>)
G90
G0 X[#<x_plus_probed> - #<xy_clearance>]
o<130> endif
#<x_plus_zero_edge> = [#<x_plus_probed> + #<probe_center_offset>]
(defines the edge as x_probed_position for DRO reporting)
#<x_plus_probed_position> = #<x_plus_zero_edge>
(analog aio output to gui DRO "X PROBED POSITION")
M68 E8 Q[#<x_plus_probed_position>]
(probe mode rule for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record X Zero in selected WCO)
G10 L2 P#5220 X[#<x_plus_zero_edge> + #<workspace_x>]
o<probe_x_plus_wco> return
o<140> endif
o<probe_x_plus_wco> endsub
M2 (end program)

View File

@@ -0,0 +1,85 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Y Minus direction to locate edge, end at clearance distance)
(Start probe position to the back side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_y_minus> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1
#<max_xy_distance> = #2
#<xy_clearance> = #3
#<probe_slow_fr> = #4
#<probe_fast_fr> = #5
#<calibration_offset> = #6
(Cancel G92 offsets)
G92.1
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_y_minus> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current Y Position including offsets in current program units)
#<y> = #5421
(Initiate Fast Y- Probe)
G91
F[#<probe_fast_fr>]
G38.2 y-[#<max_xy_distance>]
#<y_minus_probed> = #5062
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 Y#<y>
F[#<probe_fast_fr>]
(return from sub)
o<probe_y_minus> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 Y[#<y_minus_probed> + #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow Y- Probe)
G91
F[#<probe_slow_fr>]
G38.2 Y-[#<xy_clearance> * 2]
#<y_minus_probed> = #5062
; (debug, Probed Pos: #5062 Y Pos: #<_y>)
G90
G0 Y[#<y_minus_probed> + #<xy_clearance>]
o<130> endif
#<y_minus_zero_edge> = [#5062 - #<probe_center_offset>]
(defines the edge as y_probed_position for DRO reporting)
#<y_minus_probed_position> = #<y_minus_zero_edge>
(analog aio output to gui DRO "Y PROBED POSITION")
M68 E6 Q[#<y_minus_probed_position>]
o<probe_y_minus> endsub [#<y_minus_zero_edge>]
M2 (end program)

View File

@@ -0,0 +1,103 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Y Minus direction and set Y 0 in current WCO)
(Start probe position to the back side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_y_minus_wco> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_y_minus_wco> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current Y Position including offsets in current program units)
#<y> = #5421
(Initiate Fast Y- Probe)
G91
F[#<probe_fast_fr>]
G38.2 y-[#<max_xy_distance>]
#<y_minus_probed> = #5062
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 Y#<y>
F[#<probe_fast_fr>]
(return from sub)
o<probe_y_minus_wco> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 Y[#<y_minus_probed> + #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow Y- Probe)
G91
F[#<probe_slow_fr>]
G38.2 Y-[#<xy_clearance> * 2]
#<y_minus_probed> = #5062
; (debug, Probed Pos: #5062 Y Pos: #<_y>)
G90
G0 Y[#<y_minus_probed> + #<xy_clearance>]
o<130> endif
#<y_minus_zero_edge> = [#5062 - #<probe_center_offset>]
(defines the edge as y_probed_position for DRO reporting)
#<y_minus_probed_position> = #<y_minus_zero_edge>
(analog aio output to gui DRO "Y PROBED POSITION")
M68 E6 Q[#<y_minus_probed_position>]
(probe mode rule for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Y Zero in selected WCO)
G10 L2 P#5220 Y[#<y_minus_zero_edge> + #<workspace_y>]
o<probe_y_minus_wco> return
o<140> endif
o<probe_y_minus_wco> endsub
M2 (end program)

View File

@@ -0,0 +1,85 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Y plus direction to locate edge, end at clearance distance)
(Start probe position to the front side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_y_plus> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1
#<max_xy_distance> = #2
#<xy_clearance> = #3
#<probe_slow_fr> = #4
#<probe_fast_fr> = #5
#<calibration_offset> = #6
(Cancel G92 offsets)
G92.1
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_y_plus> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current Y Position including offsets in current program units)
#<y> = #5421
(Initiate Fast y+ Probe)
G91
F[#<probe_fast_fr>]
G38.2 Y[#<max_xy_distance>]
#<y_plus_probed> = #5062
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 Y#<y>
F[#<probe_fast_fr>]
(return from sub)
o<probe_y_plus> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 Y[#<y_plus_probed> - #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow Y+ Probe)
G91
F[#<probe_slow_fr>]
G38.2 Y[#<xy_clearance> * 2]
#<y_plus_probed> = #5062
; (debug, Probed Pos: #5062 Y Pos: #<_y>)
G90
G0 Y[#<y_plus_probed> - #<xy_clearance>]
o<130> endif
#<y_plus_zero_edge> = [#5062 + #<probe_center_offset>]
(defines the edge as y_probed_position for DRO reporting)
#<y_plus_probed_position> = #<y_plus_zero_edge>
(analog aio output to gui DRO "Y PROBED POSITION")
M68 E9 Q[#<y_plus_probed_position>]
o<probe_y_plus> endsub [#<y_plus_zero_edge>]
M2 (end program)

View File

@@ -0,0 +1,103 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Y plus direction and set Y 0 in current WCO)
(Start probe position to the front side edge of stock)
(inside the max xy distance with the probe tip below the stock top edge)
(ensure all settings have been set properly according to help diagrams)
o<probe_y_plus_wco> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_y> = #[5202 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_y_plus_wco> return
o<110> endif
(Probe Diameter)
#<probe_diameter> = #5410
(Probe Radius)
#<probe_radius> = [#<probe_diameter> / 2]
(Probe Centerline Offset)
#<probe_center_offset> = [#<probe_radius> - #<calibration_offset>]
(Current Y Position including offsets in current program units)
#<y> = #5421
(Initiate Fast y+ Probe)
G91
F[#<probe_fast_fr>]
G38.2 Y[#<max_xy_distance>]
#<y_plus_probed> = #5062
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 Y#<y>
F[#<probe_fast_fr>]
(return from sub)
o<probe_y_plus_wco> return
o<120> endif
(Move to xy_clearance distance for slow probe)
G90
G0 Y[#<y_plus_probed> - #<xy_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow Y+ Probe)
G91
F[#<probe_slow_fr>]
G38.2 Y[#<xy_clearance> * 2]
#<y_plus_probed> = #5062
; (debug, Probed Pos: #5062 Y Pos: #<_y>)
G90
G0 Y[#<y_plus_probed> - #<xy_clearance>]
o<130> endif
#<y_plus_zero_edge> = [#5062 + #<probe_center_offset>]
(defines the edge as y_probed_position for DRO reporting)
#<y_plus_probed_position> = #<y_plus_zero_edge>
(analog aio output to gui DRO "Y PROBED POSITION")
M68 E9 Q[#<y_plus_probed_position>]
(probe mode rule for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Y Zero in selected WCO)
G10 L2 P#5220 Y[#<y_plus_zero_edge> + #<workspace_y>]
o<probe_y_plus_wco> return
o<140> endif
o<probe_y_plus_wco> endsub
M2 (end program)

View File

@@ -0,0 +1,65 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Z Minus direction to locate top, end at clearance distance)
(Start probe position is over stock within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_z_minus> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1
#<max_z_distance> = #2
#<z_clearance> = #3
#<probe_slow_fr> = #4
#<probe_fast_fr> = #5
(Current Z Position including offsets in current program units)
#<z> = #5422
(Initial Fast Z- Probe)
G91
F[#<probe_fast_fr>]
G38.2 Z-[#<max_z_distance>]
#<z_minus_probed> = #5063
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 Z#<z>
F[#<probe_fast_fr>]
(return from sub)
o<probe_z_minus> return
o<120> endif
(Move to z_clearance height for slow probe)
G90
G0 Z[#<z_minus_probed> + #<z_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow Z- Probe)
G91
F[#<probe_slow_fr>]
G38.2 Z-[#<z_clearance> * 2]
#<z_minus_probed> = #5063
; (debug, Probed Pos: #5063 Z Pos: #<_z>)
G90
G0 Z[#<z_minus_probed> + #<z_clearance>]
o<130> endif
(defines the edge as z_probed_position for DRO reporting)
#<z_minus_probed_position> = #<z_minus_probed>
(analog aio output to gui DRO "Z PROBED POSITION")
M68 E7 Q[#<z_minus_probed_position>]
#<z_finish_height> = [#<z_minus_probed> + #<z_clearance>]
o<probe_z_minus> endsub [#<z_finish_height>]
M2 (end program)

View File

@@ -0,0 +1,84 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Z Minus direction and set Z 0 in current WCO)
(Start probe position is over stock within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_z_minus_sub> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1
#<max_z_distance> = #2
#<z_clearance> = #3
#<probe_slow_fr> = #4
#<probe_fast_fr> = #5
#<probe_mode> = #6
(Cancel G92 offsets)
G92.1
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_z_minus_sub> return
o<110> endif
(Current Z Position including offsets in current program units)
#<z> = #5422
(Initial Fast Z- Probe)
G91
F[#<probe_fast_fr>]
G38.2 Z-[#<max_z_distance>]
#<z_minus_probed> = #5063
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 Z#<z>
F[#<probe_fast_fr>]
(return from sub)
o<probe_z_minus_sub> return
o<120> endif
(Move to z_clearance height for slow probe)
G90
G0 Z[#<z_minus_probed> + #<z_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow Z- Probe)
G91
F[#<probe_slow_fr>]
G38.2 Z-[#<z_clearance> * 2]
#<z_minus_probed> = #5063
; (debug, Probed Pos: #5063 Z Pos: #<_z>)
G90
G0 Z[#<z_minus_probed> + #<z_clearance>]
o<130> endif
(defines the edge as z_probed_position for DRO reporting)
#<z_minus_probed_position> = #<z_minus_probed>
(analog aio output to gui DRO "Z PROBED POSITION")
M68 E7 Q[#<z_minus_probed_position>]
#<z_finish_height> = [#<z_minus_probed> + #<z_clearance>]
(probe mode rule for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Z zero in selected WCO)
G10 L2 P#5220 Z[#<z_minus_probed> + #<workspace_z>]
o<probe_z_minus_sub> return
o<140> endif
o<probe_z_minus_sub> endsub [#<z_finish_height>]
M2 (end program)

View File

@@ -0,0 +1,93 @@
(author: Chris P)
(version: 0.1)
(date: 04/25/19)
(Probe Z Minus direction and set Z 0 in current WCO)
(Start probe position is over stock within max z distance)
(ensure all settings have been set properly according to help diagrams)
o<probe_z_minus_wco> sub
(uses NGCGUI style arg spec)
(number after "=" in comment is default value)
#<probe_tool_number> = #1 (=99)
#<max_z_distance> = #2 (=0.5000)
#<max_xy_distance> = #3 (=0.5000)
#<xy_clearance> = #4 (=0.1000)
#<z_clearance> = #5 (=0.1000)
#<step_off_width> = #6 (=0.5000)
#<extra_probe_depth> = #7 (=0.0000)
#<probe_slow_fr> = #8 (=0.0)
#<probe_fast_fr> = #9 (=10.0)
#<calibration_offset> = #10 (=0.0000)
#<x_hint> = #11 (=1.0000)
#<y_hint> = #12 (=1.0000)
#<diameter_hint> = #13 (=1.0000)
#<edge_width> = #14 (=0.5000)
#<probe_mode> = #15 (=0)
(Cancel G92 offsets)
G92.1
#<workspace_z> = #[5203 + [20 * #5220]]
(Probe Tool Safety Check)
o<110> if [#5400 NE #<probe_tool_number>]
(MSG, Specified probe tool #<probe_tool_number> not in spindle, aborting)
o<probe_z_minus_wco> return
o<110> endif
(Current Z Position including offsets in current program units)
#<z> = #5422
(Initial Fast Z- Probe)
G91
F[#<probe_fast_fr>]
G38.2 Z-[#<max_z_distance>]
#<z_minus_probed> = #5063
(Probe Error check, #5070 will be 0 if failed)
o<120> if [#5070 EQ 0]
(back to start point and feed)
G90
G0 Z#<z>
F[#<probe_fast_fr>]
(return from sub)
o<probe_z_minus_wco> return
o<120> endif
(Move to z_clearance height for slow probe)
G90
G0 Z[#<z_minus_probed> + #<z_clearance>]
(Slow Probe Rule, if Slow Probe FR is set to 0, Slow Probe is Bypassed)
o<130> if [#<probe_slow_fr> GT 0]
(Initiate Slow Z- Probe)
G91
F[#<probe_slow_fr>]
G38.2 Z-[#<z_clearance> * 2]
#<z_minus_probed> = #5063
; (debug, Probed Pos: #5063 Z Pos: #<_z>)
G90
G0 Z[#<z_minus_probed> + #<z_clearance>]
o<130> endif
(defines the edge as z_probed_position for DRO reporting)
#<z_minus_probed_position> = #<z_minus_probed>
(analog aio output to gui DRO "Z PROBED POSITION")
M68 E7 Q[#<z_minus_probed_position>]
#<z_finish_height> = [#<z_minus_probed> + #<z_clearance>]
(probe mode rule for WCO or probe position measuring only)
o<140> if [#<probe_mode> EQ 0]
(Record Z zero in selected WCO)
G10 L2 P#5220 Z[#<z_minus_probed> + #<workspace_z>]
o<probe_z_minus_wco> return
o<140> endif
o<probe_z_minus_wco> endsub
M2 (end program)

View File

@@ -0,0 +1,20 @@
o<reset_all_data> sub
M68 E0 Q0
M68 E1 Q0
M68 E2 Q0
M68 E3 Q0
M68 E4 Q0
M68 E5 Q0
M68 E6 Q0
M68 E7 Q0
M68 E8 Q0
M68 E9 Q0
M68 E10 Q0
M68 E11 Q0
M68 E12 Q0
o<reset_all_data> endsub
M2 (end program)

View File

@@ -0,0 +1,35 @@
o<tool_sensor> sub
#<max_probe> = #<_ini[TOOLSENSOR]maxprobe>
#<search_vel> = #<_ini[TOOLSENSOR]search_vel>
#<probe_vel> = #<_ini[TOOLSENSOR]probe_vel>
#<sensor_height> = #<_ini[TOOLSENSOR]height>
#<zero_height> = #1
(print, max_probe is #<max_probe>)
(print, search vel is #<search_vel>)
(print, probe vel is #<probe_vel>)
(print, sensor height is #<sensor_height>)
(print, zero height is #<zero_height>)
G21 (use metric units)
G53 G0 Z0 (raise spindle to Z0)
G53 G0 X#<_ini[TOOLSENSOR]x> Y#<_ini[TOOLSENSOR]y>
G49 (cancel tool offset)
G10 L20 P0 Z0 (clear current offsets)
G91 (switch to incremental mode)
; this section commented out for sim
;G38.2 Z[-#<max_probe>] F#<search_vel> (probe down)
;G1 Z4.0 (move up 4 mm)
;G4 P0.5 (pause for 0.5 sec.)
;G38.2 Z-6.0 F#<probe_vel> (probe down slower)
; this section used for sim, comment out otherwise
G1 Z-10 F#<search_vel>
G10 L20 P0 Z[#<sensor_height> - #<zero_height>]
G90 (absolute distance mode)
G53 G0 Z0 (move Z up to 0)
o<tool_sensor> endsub
M2

View File

@@ -0,0 +1,31 @@
o<touch_plate> sub
#<max_probe> = #<_ini[TOOLSENSOR]maxprobe>
#<search_vel> = #<_ini[TOOLSENSOR]search_vel>
#<probe_vel> = #<_ini[TOOLSENSOR]probe_vel>
#<touch_height> = #<_ini[TOOLSENSOR]touch>
(print, max_probe is #<max_probe>)
(print, search vel is #<search_vel>)
(print, probe vel is #<probe_vel>)
(print, touch height is #<touch_height>)
G21 (use metric units)
G49 (cancel tool offset)
G10 L20 P0 Z0 (clear current offsets)
G91 (switch to incremental mode)
; this section commented out for sim
;G38.2 Z[-#<max_probe>] F#<search_vel> (probe down)
;G1 Z1.0 (go up 1 mm)
;G4 P0.5 (pause 0.5 sec.)
;G38.2 Z-2 F#<probe_vel> (probe down slower)
; this section used for sim, comment out otherwise
G1 Z-10 F#<search_vel>
G10 L20 P0 Z#<touch_height> (store offset in offset table)
G90 (absolute distance mode)
G53 G0 Z0 (move Z up to 0)
o<touch_plate> endsub
M2

View File

@@ -0,0 +1,14 @@
o<x_data_reset> sub
M68 E0 Q0
; M68 E2 Q0
; M68 E3 Q0
; M68 E4 Q0
M68 E5 Q0
; M68 E7 Q0
M68 E8 Q0
M68 E10 Q0
o<x_data_reset> endsub
M2 (end program)

View File

@@ -0,0 +1,15 @@
o<y_data_reset> sub
M68 E1 Q0
; M68 E2 Q0
; M68 E3 Q0
; M68 E4 Q0
M68 E6 Q0
; M68 E7 Q0
M68 E9 Q0
M68 E11 Q0
o<y_data_reset> endsub
M2 (end program)

View File

@@ -0,0 +1,31 @@
o<down> sub
; #1 = [ps_searchvel]
; #2 = [probe.ps_probe_max]
; #3 = [ps_probe_latch]
; #4 = [probe.ps_probevel]
; #5 = [TOOLSENSOR]RAPID_SPEED]
; #6 = [probe.set_zero]
; #7 = [axis.2.joint-pos-cmd]
O<down-if> IF [#6 EQ 5]
(cancel Z offsets)
G92.1
G49
G10 L20 P0 Z[#7]
O<down-if> ENDIF
#<z>=#<_z> (save current Z position)
G91
F #1
G38.2 Z[-#2]
G1 Z[#3] F#5
F #4
G4 P0.5
G38.2 Z[-#3*2]
G90
(back to start point)
G1 Z#<z> F#5
o<down> endsub
M2

View File

@@ -0,0 +1,23 @@
o<gtk_probe_down> sub
O<down-if> IF [#<_hal[probe.set_zero]> EQ 5]
(cancel Z offsets)
G92.1
G49
G10 L20 P0 Z[#<_hal[axis.z.pos-cmd]>]
O<down-if> ENDIF
#<z>=#<_z> (save current Z position)
G91
F #<_hal[probe.ps_searchvel]>
G38.2 Z[-#<_hal[probe.ps_probe_max]>]
G1 Z[#<_hal[probe.ps_probe_latch]>] F#<_ini[TOOLSENSOR]RAPID_SPEED>
F #<_hal[probe.ps_probevel]>
G4 P0.5
G38.2 Z[-#<_hal[probe.ps_probe_latch]>*2]
G90
(back to start point)
G1 Z#<z> F#<_ini[TOOLSENSOR]RAPID_SPEED>
o<gtk_probe_down> endsub
M2

View File

@@ -0,0 +1,18 @@
o<gtk_probe_xminus> sub
#<x>=#<_x> (save start X position)
(PRINT, position #<_x> )
G91
F #<_hal[probe.ps_searchvel]>
G38.2 X[-#<_hal[probe.ps_probe_max]>]
G1 X[#<_hal[probe.ps_probe_latch]>] F#<_ini[TOOLSENSOR]RAPID_SPEED>
F #<_hal[probe.ps_probevel]>
G4 P0.5
G38.2 X[-#<_hal[probe.ps_probe_latch]>*2]
(print, probe X=#5061 )
G90
(PRINT, back to start point #<x>)
G1 X#<x> F#<_ini[TOOLSENSOR]RAPID_SPEED>
o<gtk_probe_xminus> endsub
M2

View File

@@ -0,0 +1,18 @@
o<gtk_probe_xplus> sub
#<x>=#<_x> (save start X position)
(PRINT, position X #<_x> )
G91
F #<_hal[probe.ps_searchvel]>
G38.2 X[#<_hal[probe.ps_probe_max]>]
G1 X[-#<_hal[probe.ps_probe_latch]>] F#<_ini[TOOLSENSOR]RAPID_SPEED>
F #<_hal[probe.ps_probevel]>
G4 P0.5
G38.2 X[#<_hal[probe.ps_probe_latch]>*2]
(print, probe X=#5061 )
G90
(back to start point)
G1 X#<x> F#<_ini[TOOLSENSOR]RAPID_SPEED>
o<gtk_probe_xplus> endsub
M2

View File

@@ -0,0 +1,17 @@
o<gtk_probe_yminus> sub
#<y>=#<_y> (save start Y position)
G91
F #<_hal[probe.ps_searchvel]>
G38.2 Y[-#<_hal[probe.ps_probe_max]>]
G1 Y[#<_hal[probe.ps_probe_latch]>] F#<_ini[TOOLSENSOR]RAPID_SPEED>
F #<_hal[probe.ps_probevel]>
G4 P0.5
G38.2 Y[-#<_hal[probe.ps_probe_latch]>*2]
(print, probe Y=#5062 )
G90
(back to start point)
G1 Y#<y> F#<_ini[TOOLSENSOR]RAPID_SPEED>
o<gtk_probe_yminus> endsub
M2

View File

@@ -0,0 +1,17 @@
o<gtk_probe_yplus> sub
#<y>=#<_y> (save start Y position)
G91
F #<_hal[probe.ps_searchvel]>
G38.2 Y[#<_hal[probe.ps_probe_max]>]
G1 Y[-#<_hal[probe.ps_probe_latch]>] F#<_ini[TOOLSENSOR]RAPID_SPEED>
F #<_hal[probe.ps_probevel]>
G4 P0.5
G38.2 Y[#<_hal[probe.ps_probe_latch]>*2]
(print, probe Y=#5062 )
G90
(back to start point)
G1 Y#<y> F#<_ini[TOOLSENSOR]RAPID_SPEED>
o<gtk_probe_yplus> endsub
M2

View File

@@ -0,0 +1,23 @@
o<xminus> sub
; #1 = [ps_searchvel]
; #2 = [probe.ps_probe_max]
; #3 = [ps_probe_latch]
; #4 = [probe.ps_probevel]
; #5 = [TOOLSENSOR]RAPID_SPEED]
#<x>=#<_x> (save start X position)
G91
F #1
G38.2 X[-#2]
G1 X[#3] F#5
F #4
G4 P0.5
G38.2 X[-#3*2]
(print, probe X=#5061 )
G90
(back to start point)
G1 X#<x> F#5
o<xminus> endsub
M2

View File

@@ -0,0 +1,23 @@
o<xplus> sub
; #1 = [ps_searchvel]
; #2 = [probe.ps_probe_max]
; #3 = [ps_probe_latch]
; #4 = [probe.ps_probevel]
; #5 = [TOOLSENSOR]RAPID_SPEED]
#<x>=#<_x> (save start X position)
G91
F #1
G38.2 X[#2]
G1 X[-#3] F#5
F #4
G4 P0.5
G38.2 X[#3*2]
(print, probe X=#5061 )
G90
(back to start point)
G1 X#<x> F#5
o<xplus> endsub
M2

View File

@@ -0,0 +1,23 @@
o<yminus> sub
; #1 = [ps_searchvel]
; #2 = [probe.ps_probe_max]
; #3 = [ps_probe_latch]
; #4 = [probe.ps_probevel]
; #5 = [TOOLSENSOR]RAPID_SPEED]
#<y>=#<_y> (save start Y position)
G91
F #1
G38.2 Y[-#2]
G1 Y[#3] F#5
F #4
G4 P0.5
G38.2 Y[-#3*2]
(print, probe Y=#5062 )
G90
(back to start point)
G1 Y#<y> F#5
o<yminus> endsub
M2

View File

@@ -0,0 +1,23 @@
o<yplus> sub
; #1 = [ps_searchvel]
; #2 = [probe.ps_probe_max]
; #3 = [ps_probe_latch]
; #4 = [probe.ps_probevel]
; #5 = [TOOLSENSOR]RAPID_SPEED]
#<y>=#<_y> (save start Y position)
G91
F #1
G38.2 Y[#2]
G1 Y[-#3] F#5
F #4
G4 P0.5
G38.2 Y[#3*2]
(print, probe Y=#5062 )
G90
(back to start point)
G1 Y#<y> F#5
o<yplus> endsub
M2