Tool length sensor and touch probe with Mesa7i76e

More
7 years 8 months ago - 7 years 8 months ago #126861 by Leon82
G54 could be zero if you touch off the part.

If you touch off guage length g54 would have a value.

That warning sounds like it wants to travel past the software limit "switch".

Without knowing your specific setup if you tuch off with a sensor you may want to write the joint position and not absolute or relative
Last edit: 7 years 8 months ago by Leon82.

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

More
7 years 8 months ago #126879 by vmihalca
I am in the process of setting up the machine. I have a touch probe that I used to take the g54 coordinates, by probing the vice's fixed jaw.
I also have a tool length sensor, that I can read it in linuxcnc as a pin input, but never ended up using it yet.
I have set the coordinates for TOOL_CHANGE, the machine moves to those coordinates and then I get this: "Linear move on line -1 would exceed axis Z positive limit".
I have checked the G54 coordinates and the Z is -132, and for the tool I want to change I have set the Z to -110.
I don't understand why the line is, if I would have a line number that actually exists, it would be a bit easier to debug..
Please advice! :)

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

More
7 years 8 months ago - 7 years 8 months ago #126881 by Leon82
Do you have a high clearance height in the program, possibly a typo?

Also check the g92 z offset
Edit, zoom out on the plot, what does it look like? I
Last edit: 7 years 8 months ago by Leon82.

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

More
7 years 8 months ago #126882 by Leon82
It appears Linux CNC can read ahead because I tried a sample program in the Sim and it stops after a few lines and says a move on line 368 would exceed limit.

Are you using an mdi command?

For now I would set g54 to zero and touch the tool off a gauge block the height of the face of the top of the part.

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

More
7 years 8 months ago #126896 by vmihalca
This is what I have for G92 in the offsets tab

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

More
7 years 8 months ago #126897 by vmihalca
And this is the macro that gets executed when I try to change a tool:

%
; manual toolchange with automatic tool length probe

o<manual_change> sub
;(debug, in change tool_in_spindle=#<tool_in_spindle> current_pocket=#<current_pocket>)
;(debug, selected_tool=#<selected_tool> selected_pocket=#<selected_pocket>)

;otherwise after the M6 this information is gone!
#<tool> = #<selected_tool>
#<pocket> = #<selected_pocket>

;(debug, tool is = #<tool>)
;(debug, pocket is = #<pocket>)

; we must execute this only in the milltask interpreter
; or preview will break, so test for '#<_task>' which is 1 for
; the milltask interpreter and 0 in the UI's
O100 if [#<_task> EQ 0]
(debug, Task ist Null)
O100 return [999]
O100 endif

;first go up
G53 G0 Z[#<_ini[AXIS_2]MAX_LIMIT>]
; then move to change position
G53 G0 X[#<_ini[CHANGE_POSITION]X>] Y[#<_ini[CHANGE_POSITION]Y>]
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]

; cancel tool offset
G49
; using the code being remapped here means 'use builtin behaviour'
M6

(debug, after m6)

O200 if [#<_hal[probe.use_toolmeasurement]> EQ 0]
O200 return [3] ; indicate no tool measurement
O200 endif

G53 G0 X[#<_ini[TOOLSENSOR]X>] Y[#<_ini[TOOLSENSOR]Y>]
G53 G0 Z[#<_ini[TOOLSENSOR]Z>]

O300 if [#<_hal[probe.ps_searchvel]> LE 0]
O300 return [-1] ; indicate searchvel <= 0
O300 endif

O400 if [#<_hal[probe.ps_probevel]> LE 0]
O400 return [-2] ; indicate probevel <= 0
O400 endif

F #<_hal[probe.ps_searchvel]>
G91
G38.2 Z #<_ini[TOOLSENSOR]MAXPROBE>
G0 Z0.26
; This is commented out only for sim.
F #<_hal[probe.ps_probevel]>
G38.2 Z-0.5

O500 if [#5070 EQ 0]
G90
O500 return [-3] ; indicate probe contact failure to epilog
O500 endif

G90
G53 G0 Z[#<_ini[CHANGE_POSITION]Z>]
G53 G0 X[#<_ini[CHANGE_POSITION]X>] Y[#<_ini[CHANGE_POSITION]Y>]

#<touch_result> = #5063
#<probeheight> = #<_hal[probe.probeheight]>
#<blockheight> = #<_hal[probe.blockheight]>

;(DEBUG, #<touch_result> #<probeheight> #<blockheight>)

G10 L1 P#<tool> Z[#<touch_result> - #<_hal[probe.probeheight]> + #<_hal[probe.blockheight]>]
G43

;G10 L1 P#<tool> Z#<touch_result>
;G10 L2 P0 Z[#<workpieceheight> + #<probeheight> + #<touch_result>]

; signal success be returning a value > 0:
o<manual_change> endsub [1]
m2
%

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

Time to create page: 0.250 seconds
Powered by Kunena Forum