Is their a way to have cncjs display the tool that is to be installed during the new tool macro?
Untested at the moment, but I think
(Please Insert Tool [tool])
would work to show you in the console.
Just insert it in the New Tool macro prior to the probing.
I always know what tools I am using, so I haven’t added something like that.
Thanks, I never gave it much thought either till this last project. Thought maybe a was missing something or that i messed something up editing the macro. I have 80 pc. order with 6 tool changes ea. and caught myself checking notes every tool change.
Did that work as expected? I could just add it to the github versions.
It does show in the console. But it says tool 0.
That probably means the tool had not been defined.
Can you share your gcode?
bitsetter_with_blank.nc (5.3 KB)
this is what i am testing with.
Hmmm…looks like the tool definition might need to come before the toolchange command.
V-carve? What post processor?
yep v-carve. its one i edited long ago, I can send it to you if you want. I don’t think i changed too much in it.
In your toolchange section and your header, change:
Hey @m_price, I was wondering if modifying the post processor worked out for you?
no, still says tool 0.
Using you modified post, I got this with a test.
Where are you modifying the macro?
;This macro allows you to use a fixed machine location for a tool change/probe. Ideal when you’re workpiece surface has been carved away.
; Wait until the planner queue is empty
; Set user-defined variables
%SAFE_HEIGHT = -10 ; clear everything height(negative number, distance below Z limit)
%PROBE_DISTANCE = 100
%PROBE_RAPID_FEEDRATE = 200 ;mm/min
; Keep a backup of current work position
%X0=posx, Y0=posy, Z0=posz
; Save modal state
%WCS = modal.wcs
%PLANE = modal.plane
%UNITS = modal.units
%DISTANCE = modal.distance
%FEEDRATE = modal.feedrate
%SPINDLE = modal.spindle
%COOLANT = modal.coolant
M5 ;Stop spindle
G90 ;Absolute positioning
G53 G0 Z[global.state.SAFE_HEIGHT]
G53 x-500.0 Y-819.0 z-5.0
(please insert tool [tool])
G53 X[global.state.PROBE_X_LOCATION] Y[global.state.PROBE_Y_LOCATION]
;Pause for manual tool change & probing
G38.2 z-[global.state.PROBE_DISTANCE] F[global.state.PROBE_RAPID_FEEDRATE];fast probe (so it doesn’t take forever)
G38.2 z-5 F40 ;“dial-it-in” probes
G38.4 z10 F20
G38.2 z-2 F10
G38.4 z10 F5
; Update Z offset for new tool
G10 L20 Z[global.state.TOOL_REFERENCE]
;Go to work zero at a SAFE_HEIGHT for Z
G0 X0 Y0
; Restore modal state
[WCS] [PLANE] [UNITS] [DISTANCE] [FEEDRATE] [SPINDLE] [COOLANT]
It’s weird. Once the macro gets going, it is like it can’t retrieve that info.
Add a line at the very top of the macro:
%MY_TOOL = Number(tool)
Change the other inserted line to read:
(Please Insert Tool [MY_TOOL])
I’ll look into that more later. This workaround should work, though.
That did indeed work!
Great. Don’t forget that Grbl, by default, cannot handle tool numbers greater than 255 without modifying the firmware.
So as not to confuse anyone, if you use Carbide Motion the 255 max does not apply. They handle that within Motion.
This topic was automatically closed after 30 days. New replies are no longer allowed.