This is on a Router with an mdf spoilboard.
I want to make a macro that uses the current tool height offset and prevent a programming error from cutting deep into the spoilboard.
Basically a Z- limit based off of WC zero and not Machine home zero if there is an easier way.
The Z- soft limit is currently based off of machine home which is a top limit proxy.
Does anyone know first off if there is a param or code that has the tool offset or offsets?
My macro thoughts in simple terms.
#101 = [#9xxx] ; Current Param Tool Height
#102 = .020 ; Ammount allowed into spoilboard
#103 = #101+#102 ; Amount calculated to use as z-limit
#23503 = #103 ; Post Z- limit
This will get a little more complicated later as it is on an atc machine, but I am trying to work out the basics first.
Ken
Macro Help For Floating Z- Soft Limit (Resolved to keep bit from diving into spoilboard)
Moderator: cnckeith
-
- Posts: 363
- Joined: Wed Jan 23, 2019 4:19 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 80F5B5B92C3A-0213236854
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Macro Help For Floating Z- Soft Limit (Resolved to keep bit from diving into spoilboard)
Last edited by Ken Rychlik on Mon Mar 11, 2024 11:26 am, edited 1 time in total.
Ken
-
- Posts: 2214
- Joined: Sat Nov 18, 2017 2:32 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: Yes
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: Acorn 238
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Bergland, MI, USA
- Contact:
Re: Macro Help For Floating Z- Soft Limit
Why not use the existing "Machining Envelope" feature?
-
- Posts: 363
- Joined: Wed Jan 23, 2019 4:19 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 80F5B5B92C3A-0213236854
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Macro Help For Floating Z- Soft Limit
I guess, I don't know about that feature.
It worked a few times with this setup and now it randomly puts the z limit different places.
Still scratching my head. Maybe the variables need to be right before setting the z limit?
#101 =#53 04 ; Current Bit Height Based on G53 Z0
#102 = .025 ;Ammount allowed Cut into spoilboard (Change as Desired)
#103 = [#101+#102]
#104 = [-#103] ; Flips to Negative Number
Then to be safe
#23503 = -12 ;Change Z- limit For Tool Measure so a longer previous bit won't inhibit the z- tool measure.
My tool measure routine is next, but I'm not including all that. I am using a custom tool measure macro, and not the canned version.
Followed by
#23503 = #104 ;Change Z - limit to save spoilboard damage
For atc if I auto measure after each tool change, it keeps the z limit as I want.
I found the machining envelope. Does that only work when running a file? It will blow past my setting with the arrow keys.
It worked a few times with this setup and now it randomly puts the z limit different places.
Still scratching my head. Maybe the variables need to be right before setting the z limit?
#101 =#53 04 ; Current Bit Height Based on G53 Z0
#102 = .025 ;Ammount allowed Cut into spoilboard (Change as Desired)
#103 = [#101+#102]
#104 = [-#103] ; Flips to Negative Number
Then to be safe
#23503 = -12 ;Change Z- limit For Tool Measure so a longer previous bit won't inhibit the z- tool measure.
My tool measure routine is next, but I'm not including all that. I am using a custom tool measure macro, and not the canned version.
Followed by
#23503 = #104 ;Change Z - limit to save spoilboard damage
For atc if I auto measure after each tool change, it keeps the z limit as I want.
I found the machining envelope. Does that only work when running a file? It will blow past my setting with the arrow keys.
Ken
-
- Posts: 2278
- Joined: Fri May 24, 2019 8:34 am
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 7804734C6498-0401191832
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Clearwater, FL
Re: Macro Help For Floating Z- Soft Limit
Yes, it's called the "work envelope". It only allows "machining" within the envelope coordinates yet allows moves outside the envelope when not machining for tool measuring or when grabbing a tool on a ATC machine where the forks or pockets are outside this envelope.Ken Rychlik wrote: ↑Sun Mar 10, 2024 11:39 am I found the machining envelope. Does that only work when running a file? It will blow past my setting with the arrow keys.
It's all described in the mill manual and it states: The work envelope will only work in programmed moves. You will still be able to jog outside the work envelope.
Re: Macro Help For Floating Z- Soft Limit
Your original plan should also be workable, assuming that "#53 04" was really meant to read "#5043".
If you are going to auto-measure a tool so that its length offset might change, you should do that, and activate the new offset, before you inspect variable #5043.
You should add a line with "IF #50001" prior to each assignment to #23503. This will ensure that the travel limit change does not take effect until all lines up to that point have finished executing.
If you are going to auto-measure a tool so that its length offset might change, you should do that, and activate the new offset, before you inspect variable #5043.
You should add a line with "IF #50001" prior to each assignment to #23503. This will ensure that the travel limit change does not take effect until all lines up to that point have finished executing.
-
- Posts: 363
- Joined: Wed Jan 23, 2019 4:19 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 80F5B5B92C3A-0213236854
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Macro Help For Floating Z- Soft Limit
In reading the work envelope it also said it is based in machine coordinates which is Z home at the top on a router. I would like for it to work in jog modes as well. I will try the "IF #50001" before the limit change. Yes, that was typo on the 5043. It sometimes worked and other times didn't. Adding the line to make sure the other lines have finished may work.
Thanks.
Thanks.
Ken
-
- Posts: 363
- Joined: Wed Jan 23, 2019 4:19 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 80F5B5B92C3A-0213236854
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Macro Help For Floating Z- Soft Limit
So the following works and could be used as a stand alone macro, but I have it after my tool measure at the moment. Having the variables at the top of the file still didn't work, but moving them down made it dependable.
After the tool measure is complete, this is what it looks like.
G53 z0 ;Z up to machine home
IF #50001 ;Force lookahead to stop processing
#100 = 1.5 ; Time to display M225 message in seconds.
#101 = #5043 ; Current Bit Height
#102 = .025 ;Ammount allowed Cut into spoilboard (Change as Desired)
#103 = [#101+#102]
#104 = [-#103] ; Flips to Negative Number
IF #50001 ;Force lookahead to stop processing
#23503 = #104 ;Change Z - limit to save spoilboard
M225 #100 "** Bit Has Been Measured!**"
IF #50001 ;Force lookahead to stop processing
N1000 ;End of macro
Thanks for the help.
After the tool measure is complete, this is what it looks like.
G53 z0 ;Z up to machine home
IF #50001 ;Force lookahead to stop processing
#100 = 1.5 ; Time to display M225 message in seconds.
#101 = #5043 ; Current Bit Height
#102 = .025 ;Ammount allowed Cut into spoilboard (Change as Desired)
#103 = [#101+#102]
#104 = [-#103] ; Flips to Negative Number
IF #50001 ;Force lookahead to stop processing
#23503 = #104 ;Change Z - limit to save spoilboard
M225 #100 "** Bit Has Been Measured!**"
IF #50001 ;Force lookahead to stop processing
N1000 ;End of macro
Thanks for the help.
Ken