Issue with M6 macro I customized
Moderator: cnckeith
-
- Posts: 31
- Joined: Wed Feb 02, 2022 8:56 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 30E283DF4605-0126225588
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Prescott Valley, AZ
- Contact:
Issue with M6 macro I customized
Ok, I'm *NOT* a programmer or coder. As such, the changes I made to this macro are relatively benign.
Can someone more knowledgeable than myself kindly take a look at the attached file to see what's wrong?
This file was first created by Scott, then modified by Clint. I can only assume they must have worked correctly for them.
The changes I made consist of:
- Commented out the group of code that slows down the speeds from my parameter 14 & 15 settings (fast & slow probe rates). I just want it to take those parameters at face value, I don't need them slowed down.
- Commented out the 4 places where it calls for the repeat slow probe rate. I currently have my probe fast rate @ 25 ipm, but this is just a temporary time-saver while sorting out this macro. Once I verify it's working correct, I will use the slow probe rate for normal one-hit operation.
It seems to function in general with regards to workflow. But what it's NOT doing is actually resetting or recording proper Z ref after measuring from the top of my workpiece. My TT device is 1.443, and it works just fine when using 'Auto Z to Plate' command.
With this M6 program when I select option 1, it's supposed to measure from the top of my workpiece to set Z zero at the top of the workpiece. The second part of this option 1 is to jog to the fixed TT device and record the Z ref length, presumably for subsequent tool changes. What I end up with is an actual zero that is almost 3" above where my top-of-workpiece Z zero should be. I also tried this same exercise with my old TT device which is .255" and while it created a zero closer to where it should be, it was still substantially above where actual workpiece Z zero should have been.
Am I missing a parameter or something, that's causing it to do this?
Can someone more knowledgeable than myself kindly take a look at the attached file to see what's wrong?
This file was first created by Scott, then modified by Clint. I can only assume they must have worked correctly for them.
The changes I made consist of:
- Commented out the group of code that slows down the speeds from my parameter 14 & 15 settings (fast & slow probe rates). I just want it to take those parameters at face value, I don't need them slowed down.
- Commented out the 4 places where it calls for the repeat slow probe rate. I currently have my probe fast rate @ 25 ipm, but this is just a temporary time-saver while sorting out this macro. Once I verify it's working correct, I will use the slow probe rate for normal one-hit operation.
It seems to function in general with regards to workflow. But what it's NOT doing is actually resetting or recording proper Z ref after measuring from the top of my workpiece. My TT device is 1.443, and it works just fine when using 'Auto Z to Plate' command.
With this M6 program when I select option 1, it's supposed to measure from the top of my workpiece to set Z zero at the top of the workpiece. The second part of this option 1 is to jog to the fixed TT device and record the Z ref length, presumably for subsequent tool changes. What I end up with is an actual zero that is almost 3" above where my top-of-workpiece Z zero should be. I also tried this same exercise with my old TT device which is .255" and while it created a zero closer to where it should be, it was still substantially above where actual workpiece Z zero should have been.
Am I missing a parameter or something, that's causing it to do this?
- Attachments
-
- report_30E283DF4605-0126225588_2024-05-15_14-41-11.zip
- Fresh report
- (1.61 MiB) Downloaded 2 times
-
- mfunc6_blades.mac
- Modified by me
- (12.59 KiB) Downloaded 9 times
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 737
- Joined: Fri Nov 30, 2018 1:04 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Thorp WI
Re: Issue with M6 macro I customized
Just for fun, try changing line 150 of your macro to the following. If Auto Z to plate works (mfunc44.mac), then this should as well.
G92 Z[ABS[#9071]] ;Set Z position to 0 + detector height stored in parameter 71
Your macro is similar to one that I've used in the past, I'll take a closer look when I'm at a machine and can pull up the macro I used.
G92 Z[ABS[#9071]] ;Set Z position to 0 + detector height stored in parameter 71
Your macro is similar to one that I've used in the past, I'll take a closer look when I'm at a machine and can pull up the macro I used.
Scott
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 31
- Joined: Wed Feb 02, 2022 8:56 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 30E283DF4605-0126225588
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Prescott Valley, AZ
- Contact:
Re: Issue with M6 macro I customized
Thank you for that suggestion Sword. I tried that, but it didn't seem to make any difference.
Just prior to running M6, I ran Auto Z to plate which set Z zero to the top of the small black piece shown. After running M6, Z zero ended up here
Ideally, I don't even really want or need the full functionality of this M6 macro. What I would really like to end up with is just a macro to assign to a button that would be used for 'subsequent' tool changes based on the Z ref value established by the initial Auto Z to plate operation. After a tool change, it would simply go to the fixed TT device to measure the new tool while retaining the proper top-of-part Z zero, without all the interaction or options of this current M6 macro.
In order to do that, I guess it would be necessary to measure the current tool to record the Z ref before actually changing the tool.
Additionally: why is this macro referencing Parameter #159 in several places? I looked at this parameter and it was labeled as '8th Axis Autotune Move Distance', with a value of 2.0000
I have no idea what that parameter is, but it doesn't sound like anything that makes any sense in the context of a tool offset macro.
G92 Z[0+#159] ;Set Z position to 0 + TT1 offset stored in parameter 159
Just prior to running M6, I ran Auto Z to plate which set Z zero to the top of the small black piece shown. After running M6, Z zero ended up here
Ideally, I don't even really want or need the full functionality of this M6 macro. What I would really like to end up with is just a macro to assign to a button that would be used for 'subsequent' tool changes based on the Z ref value established by the initial Auto Z to plate operation. After a tool change, it would simply go to the fixed TT device to measure the new tool while retaining the proper top-of-part Z zero, without all the interaction or options of this current M6 macro.
In order to do that, I guess it would be necessary to measure the current tool to record the Z ref before actually changing the tool.
Additionally: why is this macro referencing Parameter #159 in several places? I looked at this parameter and it was labeled as '8th Axis Autotune Move Distance', with a value of 2.0000
I have no idea what that parameter is, but it doesn't sound like anything that makes any sense in the context of a tool offset macro.
G92 Z[0+#159] ;Set Z position to 0 + TT1 offset stored in parameter 159
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 737
- Joined: Fri Nov 30, 2018 1:04 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Thorp WI
Re: Issue with M6 macro I customized
#159 is the non-volatile variable used to hold the length offset value for subsequent tool changes and remains between power ups. Can you attach a Wizard screenshot pdf? Alt-P when in the Wizard. Also, you need to update to the latest version, I see you're on 5.06, and it makes it difficult for us to compare apples to apples.
Looking at yours.....
Looking at yours.....
Scott
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 737
- Joined: Fri Nov 30, 2018 1:04 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Thorp WI
Re: Issue with M6 macro I customized
There were a few syntax errors in your mfunc6.mac file. Some missing brackets, and by commenting out the second touch, you are left in the location of the TT thickness when the G92 Z[ABS[#9071]] is set. Try the attached fixed version to see if it work for you. It did for me.
Note, I only fixed it for choice #1. There's more that needs to be done further on.
You can absolutely have a button tied to a macro that would just set for subsequent tools after being set with "auto z to plate". Would need to check mfunc44.mac to be sure it saves the offset. You could also just have a custom mfunc44.mac that asks if you want to set Z to plate or set subsequent, using only the "auto z to plate" button.
Note, I only fixed it for choice #1. There's more that needs to be done further on.
You can absolutely have a button tied to a macro that would just set for subsequent tools after being set with "auto z to plate". Would need to check mfunc44.mac to be sure it saves the offset. You could also just have a custom mfunc44.mac that asks if you want to set Z to plate or set subsequent, using only the "auto z to plate" button.
- Attachments
-
- Fixed_mfunc6_blades.mac
- (12.61 KiB) Downloaded 5 times
Scott
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 31
- Joined: Wed Feb 02, 2022 8:56 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 30E283DF4605-0126225588
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Prescott Valley, AZ
- Contact:
Re: Issue with M6 macro I customized
Thank you again Scott, I appreciate your time & efforts on this big time!
I tried the updated file on option 1 and it did indeed work!
But for the moment, can we talk further about the custom mfunc44.mac? That sounds perfect, IF the normal 'Auto Z to Plate' works as it currently does (with movable TT device), and the 'subsequent' option would measure at my designated fixed location. That would be perfect for my needs.
Here's the PDF screenshots of my Wizard (attached). I will work on downloading & installing the latest version.
I tried the updated file on option 1 and it did indeed work!
But for the moment, can we talk further about the custom mfunc44.mac? That sounds perfect, IF the normal 'Auto Z to Plate' works as it currently does (with movable TT device), and the 'subsequent' option would measure at my designated fixed location. That would be perfect for my needs.
Here's the PDF screenshots of my Wizard (attached). I will work on downloading & installing the latest version.
- Attachments
-
- Wizard 5-16-2024.pdf
- (1.22 MiB) Downloaded 3 times
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 737
- Joined: Fri Nov 30, 2018 1:04 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Thorp WI
Re: Issue with M6 macro I customized
Yep, we can do that. Attached is a "does it all" mfunc44.mac that should work. I haven't tried it lately, and it was made for someone else with similar needs/wants as you are thinking of. Use it as a learning template and modify as desired. Make a copy of your original and rename this one.Blades wrote: ↑Thu May 16, 2024 6:49 pm But for the moment, can we talk further about the custom mfunc44.mac? That sounds perfect, IF the normal 'Auto Z to Plate' works as it currently does (with movable TT device), and the 'subsequent' option would measure at my designated fixed location. That would be perfect for my needs.
Just a note, as it's been mention elsewhere, this is really the same as a mfunc6.mac that is called with a toolchange (T1 M6 for example), and if that command is in your cut file, whether it's a single tool or multiple tool file, it will perform the same function as what you want to do with a button.
- Attachments
-
- Do_All_mfunc44.mac
- (11.66 KiB) Downloaded 14 times
Scott
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 31
- Joined: Wed Feb 02, 2022 8:56 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 30E283DF4605-0126225588
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Prescott Valley, AZ
- Contact:
Re: Issue with M6 macro I customized
Wow. Thank you SO much for this, Scott! Anxious to try this out, and I just got done with a fresh update to 5.1 last night.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 31
- Joined: Wed Feb 02, 2022 8:56 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: 30E283DF4605-0126225588
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Prescott Valley, AZ
- Contact:
Re: Issue with M6 macro I customized
I changed some verbiage in the the file to suit my preference, such as removing comments regarding the dust shroud & clip. However, it's generating this error. Again, I considered these to be relatively benign changes, but...
- Attachments
-
- DOH_ERRORS_mfunc44.mac
- (11.42 KiB) Downloaded 3 times
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
-
- Posts: 737
- Joined: Fri Nov 30, 2018 1:04 pm
- Acorn CNC Controller: Yes
- Plasma CNC Controller: No
- AcornSix CNC Controller: No
- Allin1DC CNC Controller: No
- Hickory CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
- Location: Thorp WI
Re: Issue with M6 macro I customized
Compare lines 109 and 110 with line 112. Looks like there was an errant cursor placement and a backspace/enter. Edit it to be like line 112.
Yep, change the wording to your liking. The fast/slow probing values in the wizard will apply, and also the location of your fixed touch off, G30P3 (I think the file has G30P2, so change that for each instance).
Yep, change the wording to your liking. The fast/slow probing values in the wizard will apply, and also the location of your fixed touch off, G30P3 (I think the file has G30P2, so change that for each instance).
Scott
(Note: Liking will "up vote" a post in the search results helping others find good information faster)