Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check psng_hook return value for error conditions #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions psng/macros/psng_gotots.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_gotots> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [2]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

; first go up then move to tool sensor position
G90
Expand Down
2 changes: 1 addition & 1 deletion psng/macros/psng_hook.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ o<psng_hook> sub
; value "6".
#<hooked_macro> = #1

o<psng_hook> endsub
o<psng_hook> endsub [0]
M2
6 changes: 5 additions & 1 deletion psng/macros/psng_manual_change.ngc
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
; manual toolchange with automatic tool length probe

o<psng_manual_change> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [1]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

;(debug, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>)
;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>)
Expand Down
5 changes: 5 additions & 0 deletions psng/macros/psng_probe_table.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_probe_table> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [3]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

#<z>=#<_z> (save current Z position)
G91
Expand Down
5 changes: 5 additions & 0 deletions psng/macros/psng_probe_tool_setter.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_probe_tool_setter> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [4]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

; first go up then move to tool sensor position
G90
Expand Down
5 changes: 5 additions & 0 deletions psng/macros/psng_probe_workpiece.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_probe_workpiece> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [5]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

(cancel all Z offsets)
G49
Expand Down
5 changes: 5 additions & 0 deletions psng/macros/psng_xminus.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_xminus> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [6]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

#<x>=#<_x> (save start X position)
G91
Expand Down
5 changes: 5 additions & 0 deletions psng/macros/psng_xplus.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_xplus> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [7]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

#<x>=#<_x> (save start X position)
G91
Expand Down
5 changes: 5 additions & 0 deletions psng/macros/psng_yminus.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_yminus> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [8]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

#<y>=#<_y> (save start Y position)
G91
Expand Down
5 changes: 5 additions & 0 deletions psng/macros/psng_yplus.ngc
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
o<psng_yplus> sub

; Call the PSNG Hook and check return value
o<psng_hook> call [9]
o10 if [#<_value> LT 0]
(ABORT, PSNG hook indicated a failure: #<_value>)
o10 endif

#<y>=#<_y> (save start Y position)
G91
Expand Down