Gcode - Input custom number

More
19 Sep 2020 10:37 #182731 by Jocman
Gcode - Input custom number was created by Jocman
Hi all.
I searched the forum and the net for some hint, but I didn't find anything usefull to me.
All the topics/hints I found were related to people who need to pause the executing gcode, be asked for a value then resume the job.
Basically, my need is similar (thinking about), but not sure.
My issue:
Normally I use a touch plate for Z.
In these days I realized an aluminium set square (90°) to zeroing Z-Y-X (in this sequence).
The thing works fine, but....
My intention is to fasten the square on the work plane, then use its hollow to place the corner of the material (the 0;0 piece), then zeroing the axis for the job.
But at this point I have the issue of the material thickness.....
My current zero gcode set the square thickness (15mm) as offset, and it works fine: when I type G0 Z0, the bit touch the work plane properly.
But in a "real" job, the Z offset should be "15 - material thickness".
I thought about make some custom buttons in Axis for the my known standard thickness (1.6 for PCB, 1-3-5-6-10 for acrylic).
But doing so I'll have to set 6 buttons and 6 NC files to call each time, instead of just one but asking me the material thickness before starting zeroing.

So, can this be done?

Thank you

Andrea

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

More
19 Sep 2020 12:09 #182735 by anfänger
Replied by anfänger on topic Gcode - Input custom number
You can use a hal flied to enter the value an d then a button to trigger the g code:

G10 L20 P0 Z[#<_hal[name.of.hallable]>-15]
The following user(s) said Thank You: Jocman

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

More
19 Sep 2020 14:39 #182748 by Jocman
Replied by Jocman on topic Gcode - Input custom number
Thankyou for the suggestion,i'll give it a chance.

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

More
05 Oct 2022 04:34 #253494 by swarren
Replied by swarren on topic Gcode - Input custom number
We had a similar requirement. We ended up defining a custom M code to prompt the user for a value and set a HAL value:

github.com/fortcollinscreatorhub/cnc/blo...nuxcnc/nc_files/M101

Then in our probing script, we read that value:

github.com/fortcollinscreatorhub/cnc/blo...cnc/nc_files/103.ngc

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

Time to create page: 0.083 seconds
Powered by Kunena Forum