Macro for Probing a Boss

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

cnckeith
Posts: 7486
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Macro for Probing a Boss

Post by cnckeith »

work in progress..

CNC12 Probing System Sub Program Information rev2 DRAFT.. 1-10-20

This document describes how the stock Centroid probing and digitizing routines that are built into CNC12 function at the macro level.
If you intend to use the Centroid built in probing routines as is (see Mill Operators manual Chapter 8). There is no need to read any further. This information is provided for OEM’s, Intergrators and Power Users that have a special Probing application that requires either an all new Probing Macro or to edit one of the macros currently in use by CNC12

Centroid’s CNC12, CNC11 and CNC10 CNC software use sub-programs to preform the Part Probing cycles. To keep things short we will use “CNC12” in this document to refer to all three version of Centroid CNC software.

CNC12 software sets some variables before “probe_cycles_select.cnc” is called depending on the probing cycles that are selected in CNC12.


If a sub-program is calling a lower sub-program it may be passing variables to the lower sub-program. A lower sub-program may not be able to be used by itself unless the program that is calling that lower sub-program sets the variables that are needed for that lower sub-program and any addition lower sub-programs that are called within. In the header of each of the sub programs there a line ; Usage: that shows what variables are being passed to that sub-program. There may be more than one Usage line in the header depending on which higher sub-program is calling that sub-program and the variables that need to be passed down. Some of the sub-program calls below show the variables that are being passed to that sub-program cycle. Depending on If statements not all of lower sub-programs may be called in that sub-program or different values are sent down for the variables.

Main Programs

1) probe_cycles_select.cnc
2) probe_get_constants.cnc
3) probe_get_modals.cnc

Text files with program and variable information.

1) “probe_user_vars Rev 2.txt” * listing of some of the variables that are used in each sub-program.
2) “System_Probe_information_of_sub-programs.odt” * Listing of sub-programs and the order that they are being called from the “probe_cycle_select.cnc” and variables in numerical order with description of what they are being set to. Some variables are being reset to different values based on the state of other variables.
Sub-programs called from “probe_cycles_select.cnc” and the sub-programs they call.

probe_cycles_select.cnc
Calls “probe_get_modals.cnc”
Calls “probe_get_constants.cnc”

; #34570 - probing cycle type set in CNC12, CNC11, and CNC10
if [#34570 == 0] then GOTO 100 ; goto N100 Probe bore
if [#34570 == 1] then GOTO 200 ; goto N200 Probe boss
if [#34570 == 2] then GOTO 300 ; goto N300 Probe slot
if [#34570 == 3] then GOTO 400 ; goto N400 Probe web
if [#34570 == 4] then GOTO 500 ; goto N500 Probe in corner
if [#34570 == 5] then GOTO 600 ; goto N600 Probe out corner
if [#34570 == 6] then GOTO 700 ; goto N700 Probe single axis
if [#34570 == 7] then GOTO 800 ; goto N800 Probe fixture rotation * No probing cycles
if [#34570 == 8] then GOTO 900 ; goto N900 Probe manual fixture rotation * No probing cycles

Probing cycles called by “probe_cycles_select.cnc”

N100 Probe bore
- if #34570 == 0 Calls “probe_bore.cnc”
Calls “probe_center_inside.cnc” E1
Calls “probe_move.cnc” D-1 X[#20100+#[e]]] Y78 Z78 W1
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_center_inside.cnc” E2
Calls “probe_move.cnc” D1 X[#20100+#[e]]] Y78 Z78 W1
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"

N200 Probe boss
- if #34570 == 1 Calls “probe_boss.cnc” 2 times
IF #34583 !=1 "probe_boss.cnc" X[#34572] Z[#34573] E[#34570] D[#34571] F[#9395] B[#9396]
IF #34583 = to anything but 1 "probe_boss.cnc" X[#34572] Z[#34573] E[#34570] D[#34571] F[#34000] B[#34000]
Calls “probe_center_outside.cnc"
Calls “probe_move.cnc”
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_clearance_traverse_across_and_down.cnc"
Calls ”probe_limit_position.cnc"
Calls “probe_protected_move.cnc"
Calls “probe_center_outside.cnc"
Calls “probe_move.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_clearance_traverse.cnc"
Calls “probe_protected_move.cnc"
Calls “probe_clearance_traverse_across_and_down.cnc"
Calls ”probe_limit_position.cnc"
Calls “probe_protected_move.cnc"
Calls “move_primitive.cnc"
Calls “probe_move.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"

N300 Probe slot
- if #34570 == 2 and #34571 == 0 or 1
Calls “probe_center_inside.cnc” E(#34571)
Calls “probe_move.cnc" if single axis slot
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_move.cnc" if single axis slot
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_protected_move.cnc"

- if #34570 == 2 and #34571 == 2 Goes to “N100” to do Probe bore to get X and Y direction values
Calls “probe_bore.cnc” if both X and Y
Calls “probe_center_inside.cnc” E1
Calls “probe_move.cnc”
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_center_inside.cnc” E2
Calls “probe_move.cnc”
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"

N400 Probe web
- if #34570 == 3 Calls “probe_center_outside.cnc” X[#34572] Z[#34573] E[#34570] D[#34571] F[#34000] B[#34000]
Calls “ probe_move.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “ probe_clearance_traverse.cnc"
Calls ” probe_protected_move.cnc"
Calls “probe_clearance_traverse_across_and_down.cnc"
Calls ”probe_limit_position.cnc"
Calls “probe_protected_move.cnc"
Calls “move_primitive.cnc"
Calls “probe_protected_move.cnc"
Calls “ probe_move.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"

N500 Probe in corner
- if #34570 == 4 Calls “probe_inside_corner.cnc” X[#34570] Y[#34571] Z[#34573]
Calls “probe_move.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls "probe_protected_move.cnc"
Calls “probe_move.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls "probe_protected_move.cnc"
Calls “probe_move.cnc"
Calls “probe_pull_back.cnc
Calls “move_primitive.cnc"
Calls "probe_protected_move.cnc"
Calls “probe_move.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_comp_two_points_on_a_line.cnc"
Calls"atan2.cnc"
Calls “probe_comp_two_points_on_a_line.cnc"
Calls"atan2.cnc"
Calls "probe_move_to_intersection.cnc"
Calls "probe_protected_move.cnc"

N600 Probe out corner
- if #34570 == 5 Calls “probe_outside_corner.cnc” A[#34570] x[#34571] y[#34581] Z[#34573] e[#34572] c[#34582]
Calls "probe_two_points_on_wall.cnc"
Calls "atan2.cnc"
Calls "atan2.cnc"
Calls "probe_limit_position.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_move_to_intersection.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_two_points_on_wall.cnc"
Calls "probe_move.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_move.cnc"
Calls "probe_protected_move.cnc"
Calls "probe_move_to_intersection.cnc"
Calls "probe_protected_move.cnc"
N700 Probe single axis
- if #34570 == 6 Calls “probe_move.cnc” D[#34571] X[#[20100+#34570]] Y78 Z78 W1 C1
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"
Calls “probe_pull_back.cnc"
Calls “move_primitive.cnc"

N800 Probe fixture rotation
- if #34570 == 7 Calls - NO macros setup at this time

N900 Probe manual fixture rotation
- if #34570 == 8 Calls - NO macros setup at this time
Variables set by CNC12, CNC11 and CNC10 before “probe_cycles_select.cnc” is called:

#30000 ; General error variable set by CNC12, CNC11,and CNC10
#31300 ; = 1 then current units is metric
#34570 ; input, probing cycle type
#34571 ; input, probing cycle orientation – initial axis direction
#34572 ; input, probing cycle distance
#34573 ; input, probing cycle clearance
#34580 ; Input probing cycles side
#34583 ; Check for setup mode – 0 off, 1 on
#34590 ; direction to move
#34592 ; 0 for Probing, 1 for TT1
#34593 ; probing_direction
#34594 ; surface_axis
#34595 ; surface_direction
#34596 ; distance
#34597 ; Z clearance

System variables used:

#4006 ; Unit of measure – 20 = inch, 21 = metric
#5041 ; current x position
#5042 ; current y position
#5043 ; current z position
#9011 ; Touch Probe input
#9012 ; Touch Probe Tool Number
#9014 ; Fast probing rate
#9015 ; Slow probing rate
#9395 ; Probing traverse rate
#9396 ; Probing plunge rate
#11000 ; Probe Diameter #34009
#13000 ; Tool D number, Tool Number for Probe (T)
#20101 ; Label for axis 1
#20102 ; Label for axis 2
#20103 ; Label for axis 3
#20104 ; Label for axis 4
#20105 ; Label for axis 5
#24501 ; Encoder counts away from index pulse axis 1
#24502 ; Encoder counts away from index pulse axis 2
#24901 ; servo control axis indicator for axis 1, 0 or 1
#24902 ; servo control axis indicator for axis 2, 0 or 1
#24903 ; servo control axis indicator for axis 3, 0 or 1
#24904 ; servo control axis indicator for axis 4, 0 or 1
#24905 ; servo control axis indicator for axis 5, 0 or 1
#25001 ; default units of measure – 20 = inch, 21 = metric
#25018 ; CNC series number – 11 for CNC11 or CNC12, 10 for CNC10

G65 pass through variable letters (lower and upper case are the same variable)

#A ; initial_axis ****
#B ; ignore_Z ****
#C ; comp_direction ****
#D ; distance ****
#E1 or #E2 ; specified axis
#F ; probing feed rate ****
#H : skip fast probing ****
#I ; prevent error for probing cycle M115 ****
#K ; Stop at travel limit ****
#W ; pull back ****
#X ; initial_direction or X position ****
#Y ; secondary_direction or Y position ****
#Z ; Z_position ****



; Filename: probe_boss
; Purpose: Find the center of a boss
; Programmer: John Popovich
; Date: Nov 9, 2010
; Updated: May 10, 2011
; Usage: G65 "probe_boss.cnc" X[clearance_distance] Z[clearance_height] E[initial_axis_index] D[initial_direction] F[traverse_speed] B[plunge_speed]

; Where: clearance distance = the x and y clearing distance
; clearance height = the z clearance height
; axis_index = 1 through max axis, the axis to move first
; initial_direction = the direction to move first
; traverse_speed = feedrate during the boss traversing moves (moving up and over to the other side of the boss)
; plunge_speed = feedrate for the plunge move (after traversing across to the other side) it moves down before probing. You might want this slower if you are unsure of the boss width.
; Notes: the probe will be at the center point at the end of the macro
; the plunge and traverse speed are normally the fast probing rate. However, some CNC11 setup routines for five axis systems want to move faster to save time. This is ok since the routines have a really good idea of the location and size of the boss they are probing.
; uses #34505
; Output: #34562 width 1
; #34563 width 2
; Copyright (C) 2011 Centroid Corporation, Howard, PA 16841


#34505 = [#[e]] ; save the intial axis index

;check parameters
if [#34505 != 1] && [#34505 != 2] then m99 ; invalid starting axis


; find the center of the first axis
G65 "#300/system/probe_center_outside.cnc" X[#x] Z[#[z]] E[#34505] D[#[d]] F[#f] B[#b]

; check the return status of clearance traverse
if [#30000 != 1] then M99

;store width 1
#34562 = #34509

; switch the axis index
if [[#[e]] == 1] then #34505=2
if [[#[e]] == 2] then #34505=1

; move to the start point for the next axis's web measurement
G65 "#300/system/probe_clearance_traverse_across_and_down.cnc" X[[#x/2] + [#34009/2] + #9013] Z[[#5043 * #30021]-[#[z]]] E[#34505] D[1] A[#x *.1] F[#f] B[#b]

; check the return status of clearance traverse
if [#30000 != 1] then M99

; find center of the second axis
G65 "#300/system/probe_center_outside.cnc" X[#x] Z[#[z]] E[#34505] D-1 F[#f] B[#b]

;store width 2
#34563 = #34509
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
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
cnckeith
Posts: 7486
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: Macro for Probing a Boss

Post by cnckeith »

Centroid Probing Macros location.
probe macro location.PNG
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
Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html
Post Reply