System variables for probing

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Muzzer
Posts: 807
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

System variables for probing

Post by Muzzer »

This may be naive on my part but I'm looking at the possibility of creating a modified post processor to enable Fusion 360 probing. There are several Fanuc-based posts available that support Fusion probing and I have been digging in to the details to understand what I'd need to do to create a Centroid equivalent. Looks to me as if there are several elements to it:

* Replace the basic probe move macros (G38.2, G38.3 etc) with equivalent Centroid macros. Can I simply use M115 and/or M116? Can I access / edit M115 / M116 if they aren't quite right?
* Modify the higher level Fusion probe macros (slot, boss, corner etc) that call them. That sounds less challenging unless I misunderstand. I have been given Fusion-Fanuc versions that implement the required functions.
* Re-reference any called system variables from the Fanuc numbering to the Centroid numbering
* Copy over / modify the post processor probing content into the Centroid post to create a "Centroid with Fusion probing" post.

From my current position (of massive naivety?) it's looking almost achievable. One critical element though is replacing the Fanuc system variables with the equivalent(?) Centroid ones, so they can be called. In Fanuc Custom B, the variables are typically in the 5000 range. From the list of variables in the Centroid probing folder, I see a section at the top named "return values and modals". This looks promising. Could somebody help to confirm / clarify for me what they mean? My questions are in {brackets}.

#34000 ; Probing feedrate {this seems fairly obvious}
#34001 ; Clearing feedrate {is this the retract rate back to the clearance height?}
#34002 ; PLC bits start ;50001 for cnc11 6001 for cnc10 {so Acorn starts at 50001?}
#34003 ; Probe PLC bit variable {indicates the PLC probe input and whether it's NC or NO??}
#34004 ; Probe PLC bit tripped state {the probe input state?}
#34005 ; M115/116 probe input number {eg 7 for INP7? - not sure how M115 differs from the PLC input}
#34006 ; Last X probe point ; also single axis probe return values {at the moment of tripping}
#34007 ; Last Y probe point ; also single axis probe return values
#34008 ; Last Z probe point ; also single axis probe return values
#34009 ; Probe diameter {presumably this is read from the tool table in CNC12?}
#34011 ; comparison tolerance {what is this for?}
#34012 ; Last boundary crossed value (M227) {I can't see any reference to M227 in the manual)

Am I on the right track? Are Centroid about to release a Fusion probing post? Is there any obvious roadblock I'm not seeing?

Finally, are the values for feed and distance in the default metric / imperial units? Questions, questions...


cnc_smith
Posts: 241
Joined: Mon Nov 20, 2017 10:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes
Location: Frenchville, PA

Re: System variables for probing

Post by cnc_smith »

Muzzer wrote: Tue Aug 06, 2019 6:24 am This may be naive on my part but I'm looking at the possibility of creating a modified post processor to enable Fusion 360 probing. There are several Fanuc-based posts available that support Fusion probing and I have been digging in to the details to understand what I'd need to do to create a Centroid equivalent. Looks to me as if there are several elements to it:

* Replace the basic probe move macros (G38.2, G38.3 etc) with equivalent Centroid macros. Can I simply use M115 and/or M116? Can I access / edit M115 / M116 if they aren't quite right?
* Modify the higher level Fusion probe macros (slot, boss, corner etc) that call them. That sounds less challenging unless I misunderstand. I have been given Fusion-Fanuc versions that implement the required functions.
* Re-reference any called system variables from the Fanuc numbering to the Centroid numbering
* Copy over / modify the post processor probing content into the Centroid post to create a "Centroid with Fusion probing" post.

From my current position (of massive naivety?) it's looking almost achievable. One critical element though is replacing the Fanuc system variables with the equivalent(?) Centroid ones, so they can be called. In Fanuc Custom B, the variables are typically in the 5000 range. From the list of variables in the Centroid probing folder, I see a section at the top named "return values and modals". This looks promising. Could somebody help to confirm / clarify for me what they mean? My questions are in {brackets}.
There are macros for all of the probing cycle on the control. They are in the C:/CNCM/SYSTEM directory. The macros starts with probe... The file names gives you the basic for what the macro will do. A macro may call several lower level macros to do the complete probing cycle. This may help you for what you are wanting to do.
Dana

When requesting support, please ALWAYS post a current report.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61


Muzzer
Posts: 807
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

Thanks Dana

I've already been looking into those but of course many of the probing macros in Centroid do quite different things to the ones in Fusion. I'm hoping to achieve "in program" probing, as enabled by Fusion.

Can you confirm what the #34000...34012 variables I listed do?


cnc_smith
Posts: 241
Joined: Mon Nov 20, 2017 10:13 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes
Location: Frenchville, PA

Re: System variables for probing

Post by cnc_smith »

Muzzer wrote: Tue Aug 06, 2019 10:50 am Can you confirm what the #34000...34012 variables I listed do?
cnc_smith wrote: Tue Aug 06, 2019 8:58 am #34000 ; Probing feedrate {this seems fairly obvious}
YES
#34001 ; Clearing feedrate {is this the retract rate back to the clearance height?}
YES

#34002 ; PLC bits start ;50001 for cnc11 6001 for cnc10 {so Acorn starts at 50001?}
For CNC11 and new and Acorn the statement IF #50001 cause look ahead to stop here and for CNC1- IF #6001 was used to have look ahead to stop here.
The variable #34002 is set to which type of system is being used so the code was easier to write.

#34003 ; Probe PLC bit variable {indicates the PLC probe input and whether it's NC or NO??}
This is for what type of probe is being used. Normally open or a normally closed probe.

#34004 ; Probe PLC bit tripped state {the probe input state?}
Checking if the probe is tripped or not.

#34005 ; M115/116 probe input number {eg 7 for INP7? - not sure how M115 differs from the PLC input}
INP7 is for which input the probe is wired to. Read the manual how M115 and M116 works.

#34006 ; Last X probe point ; also single axis probe return values {at the moment of tripping}
#34007 ; Last Y probe point ; also single axis probe return values
#34008 ; Last Z probe point ; also single axis probe return values
#34009 ; Probe diameter {presumably this is read from the tool table in CNC12?}
YES

#34011 ; comparison tolerance {what is this for?}
The probing cycles use this variable and it explains in the cycle what it is used for.

#34012 ; Last boundary crossed value (M227) {I can't see any reference to M227 in the manual)
#34012 is being assign what system variable #25012 is and is used for a check in the probing cycles.
M227 is a M code used deep down in the CNC software. It should not have been reference here.
Dana

When requesting support, please ALWAYS post a current report.
Need support? READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043
All Acorn Documentation is located here: viewtopic.php?f=60&t=3397
Answers to common questions: viewforum.php?f=63
and here viewforum.php?f=61


Muzzer
Posts: 807
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

I seem to be getting close to having a working post processor for Centroid milling with Fusion 360 probing functions. It's taking me quite a while as I am also working on various Approved Activities at home under the ever watchful eye of The Domestic Manager.

One action I have not worked out yet is the best way to update parameters such as the current WCS offsets.
* Should I be using G10 for this?
* And using it to update parameters #5041 etc?

Fusion increments the WCS (eg from G54 to G55) to create a "corrected" WCS based on probed measurements, rather than changing the offset of the current WCS. Presumably I will need to ensure the correct WCS is selected before making any updates to those parameters.


Muzzer
Posts: 807
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

I have the list of system variables from the CNC12 manual but there seems to be a big hole in the documentation where I need it. For instance, all of the variables used in the probing macros in the system folder are in the 34000 - 35000 range but the table in section 11.2.16 just say "reserved for internal use DO NOT USE." There's actually a file listing them, hidden in one of the folders but it's a guessing game to figure them out from the descriptions.

Some of the variables are Fanuc-like, such as #5021 (MCS) and #5041 (WCS) but other stuff like #5221 doesn't exist and I can't see where to find what I need.

I tried this:
#34831 = [5221 + [20 * [#5220 - 1]]]
hoping it would return a value of 5221 for G54 X, 5222 for G54 Y, 5241 for G55 X etc but #5220 (a value of 1 indicates G54, 2 indicates G55 etc) isn't a valid variable, so that didn't work out so well. Yes, there are extra brackets to make it even more obvious what is happening.

Where can I find the variables that show the current WCS and the contain the offsets for X, Y & Z in each of G54, G55, G56 etc?


cncsnw
Community Expert
Posts: 4558
Joined: Wed Mar 24, 2010 5:48 pm

Re: System variables for probing

Post by cncsnw »

Where can I find the variables that show the current WCS and the contain the offsets for X, Y & Z in each of G54, G55, G56 etc?
According to the Centroid Operator's Manual:

#4014 = WCS number (by G code, i.e. 54+).

If you want an index number (G54=1, G55 = 2, etc.) then use [#4014-53]

#2501 - #2518 = Axis #1 (X) WCS offsets for WCS 1-18 (so the X offset for G54 is in #2501)
#2601 - #2618 = Axis #2 (Y) WCS offsets for WCS 1-18 (so the Y offset for G54 is in #2601)
#2701 - #2718 = Axis #3 (Z) WCS offsets for WCS 1-18 (so the Z offset for G54 is in #2701)

Again according to the Operator's Manual, the WCS offset variables are read/write, so you can modify WCS locations by writing to these variables.

You can also change the currently-active WCS using a G92 code (on a mill; G50 on lathe), if you know what absolute coordinates you want the current position to become in the modified WCS.

What is #5221 on a Fanuc control? The only Fanuc manual I have handy (0T, ca. 1996) does not mention it.


Muzzer
Posts: 807
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

Aha - thanks for pointing out the 2400 - variables. They were staring me in the face but I wasn't expecting them there!

Part of what is confusing (to me) is the mixture of common and proprietary variable numbering used here. So 5021...(machine) and 5041...(workpiece) are used in Centroid but the active WCS etc are in the 2400 range. Somebody at Centroid must have chosen those, back in the mists of time.

Fanuc Macro B variable #5221 is the workpiece zero point offset value. The Macro B variables list is freely available on the internet, eg http://www.machinetoolhelp.com/Applicat ... ables.html.

For references I have been using Peter Smit and Mike Lynch (Parametric programming for CNC machine tools and touch probes). They tend to work in Fanuc Macro B variable numbering.


CNCMaryland
Posts: 370
Joined: Thu Nov 15, 2018 10:07 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: F045DA7CBF8b-103011290
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: System variables for probing

Post by CNCMaryland »

Very interesting. Def. following this thread.


Muzzer
Posts: 807
Joined: Mon Feb 19, 2018 2:52 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

Thanks. I'm making progress but may benefit from collaboration / testing when I get something worth sharing.

Today I got the "bore" function working so that I can find the centre of a hole and reset the G54 X0 and Y0 there. I've managed to do this by using the existing Centroid probing macros (why try to reinvent a complex wheel) but obviously I had to create a macro to actually update the offsets.

Bear in mind that the probing functions in Fusion are simply for picking up the WCS origins. You'll typically use only one or two of them such as picking up X, Y and/or Z. That's pretty useful in itself but also of interest would be picking up machined dimensions mid operation and being able to correct them. Trouble is, Autodesk have decided that these "inspection" functions need to be paid for using expensive and short-lived "extensions", which rules them out for most hobby and intermittent users. Perhaps at some point we may be able to implement some of that here for free.


Post Reply