System variables for probing

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Muzzer
Posts: 815
Joined: Mon Feb 19, 2018 2:52 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: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

I need to capture my x and y coordinates before probing starts so that I can reuse them later. I thought I could simply choose an unused variable such as #34562 but when I try to run this, it says variable #34562 is undefined.

; store current WCS x position
#34562 = #5401

I tried the same thing using variable #29500 in case I'd chosen a variable number in a forbidden range but got the same result. Could someone tell me what I am doing wrong here? Thanks.

For context, as an example before probing, the probe is at a feature near G54 X20. After probing, I want to save the correct position by updating G54 at the correct position of X20. I have it working but it resets X to zero, not X20.


cnc_smith
Posts: 241
Joined: Mon Nov 20, 2017 10:13 am
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
CNC11: Yes
CPU10 or CPU7: Yes
Location: Frenchville, PA

Re: System variables for probing

Post by cnc_smith »

Muzzer wrote: Fri Sep 20, 2019 10:06 am I need to capture my x and y coordinates before probing starts so that I can reuse them later. I thought I could simply choose an unused variable such as #34562 but when I try to run this, it says variable #34562 is undefined.

; store current WCS x position
#34562 = #5401

I tried the same thing using variable #29500 in case I'd chosen a variable number in a forbidden range but got the same result. Could someone tell me what I am doing wrong here? Thanks.

For context, as an example before probing, the probe is at a feature near G54 X20. After probing, I want to save the correct position by updating G54 at the correct position of X20. I have it working but it resets X to zero, not X20.
The variables you want to use are #5041 thru #5048 to capture current position not #5401. There are not any #54__ variables that is why you are getting the error message.
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: 815
Joined: Mon Feb 19, 2018 2:52 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: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

Thanks for pointing that out - more finger trouble from me! It looked as if the highlighted issue was with the 34xxx variables. The wheels are definitely coming off here! I'll give it another go....


Muzzer
Posts: 815
Joined: Mon Feb 19, 2018 2:52 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: 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 making progress now but I need some help again.

I have a question about how to call probe_protected_move.cnc. The header appears to suggest how to use it but I don't understand what is being said. The author no doubt knew what he meant but I can't figure it out and the few instances I can find for its use don't help me. This is what is given:

; Filename: probe_protected_move.cnc
; Purpose: make a protected probe move
; Programmer: John Popovich
; Date: Dec 1, 2010
; Usage: G65 "probe_protected_move.cnc" X[first_axis_label] Y[second_axis_label] Z[third_axis_label] A[x_position] B[y_position] C[z_position] D[no_error_on_trip]
; Where: first_axis_label 0 for don't care (axis isn't changing local position)
; second_axis_label 0 for don't care (axis isn't changing local position)
; third_axis_label 0 for don't care (axis isn't changing local position)
; x_position = first axis destination
; y_position = second destination
; z_position = third destination

So, if I simply want to make a protected move in Z ie a preparatory plunge to the depth for a probe move, what should I enter? I could imagine the C parameter would be required to specify the target Z height but what about the X, Y & Z parameters? Should I omit the X and Y but enter something for the Z? Or is my Z the "first" axis for my move here? The comments about "axis isn't changing local position" don't help me much.


cnc_smith
Posts: 241
Joined: Mon Nov 20, 2017 10:13 am
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
CNC11: Yes
CPU10 or CPU7: Yes
Location: Frenchville, PA

Re: System variables for probing

Post by cnc_smith »

Muzzer wrote: Tue Sep 24, 2019 3:27 pm I seem to making progress now but I need some help again.

I have a question about how to call probe_protected_move.cnc. The header appears to suggest how to use it but I don't understand what is being said. The author no doubt knew what he meant but I can't figure it out and the few instances I can find for its use don't help me. This is what is given:

; Filename: probe_protected_move.cnc
; Purpose: make a protected probe move
; Programmer: John Popovich
; Date: Dec 1, 2010
; Usage: G65 "probe_protected_move.cnc" X[first_axis_label] Y[second_axis_label] Z[third_axis_label] A[x_position] B[y_position] C[z_position] D[no_error_on_trip]
; Where: first_axis_label 0 for don't care (axis isn't changing local position)
; second_axis_label 0 for don't care (axis isn't changing local position)
; third_axis_label 0 for don't care (axis isn't changing local position)
; x_position = first axis destination
; y_position = second destination
; z_position = third destination

So, if I simply want to make a protected move in Z ie a preparatory plunge to the depth for a probe move, what should I enter? I could imagine the C parameter would be required to specify the target Z height but what about the X, Y & Z parameters? Should I omit the X and Y but enter something for the Z? Or is my Z the "first" axis for my move here? The comments about "axis isn't changing local position" don't help me much.
The probing routines that are in the cncm/system folders are the probing routines that are called by the CNC12 probing cycles.
Most of the probing routines are being called by a higher level sub routine. There are 4 files in the cncm/system folder that may help explain how these probing routines are being used.

The "probe_user_vars.txt" file explains what variables are use in the different probing macros.

The file "probe_get_constants.cnc" sets up some constant values before calling the probing macros.

The file "robe_get_modals.cnc" sets up some of the modal values before calling the probing macros.

The file "probe_cycles_select.cnc" selects the probing macro to call.

Yes "the author no doubt knew what he meant". At the time these routines where written it was before the DIY was introduce. It was written at that time (9 years ago) for programmers/operators that had gone to a Centroid training school for doing sub program and macro or for programmers with higher level of understanding sub program and macros. As time goes we will get better documentation of how these probing routines work with the order of what routines are called first and what order for the DIY.
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: 815
Joined: Mon Feb 19, 2018 2:52 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: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

Hi Dana - yes, I'm already quite familiar with the vars.txt file which lists all the #34xxx variables grouped according to the macros they are used in. Many of them are listed but not actually described although you can figure them out to some extent by looking into those macros where there may or may not be more comments. It's a detective game and I've been annotating my list as I go along.

I have called the constants and modals so that various variables get intialised, otherwise some functions don't work properly. In fact, I've now got my probing working to several levels down from the top level call but as I said, I am struggling to figure out how to call the "protected move" macro. I suppose I could just do a crude move instead but it would seem sensible to do a protected move in case the probe contacts something unexpected.

Would you like to have a go at guessing how to call it? You might do better than me!


Muzzer
Posts: 815
Joined: Mon Feb 19, 2018 2:52 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: 38D269594F9C-0110180512
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: UK
Contact:

Re: System variables for probing

Post by Muzzer »

Muzzer wrote: Tue Sep 24, 2019 5:14 pm Would you like to have a go at guessing how to call it? You might do better than me!
However, for my needs I can make do with the M115/116/125/126 macro to do a protected move. M115 and M116 are protected moves where probe contact IS expected. M125 and M126 are protected moves where contact IS NOT expected.

M125 /Z20 P[#34005] Moves to Z20 (other axes are possible). #34005 is the PLC input for the probe input, so movement (and the program) stops with an error message if (unexpected) contact is made.

M115 and M125 default to moving in a negative direction; M116 and M126 default to positive but that choice becomes irrelevant if a position (Z20 here) is specified:


cnc_smith
Posts: 241
Joined: Mon Nov 20, 2017 10:13 am
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
CNC11: Yes
CPU10 or CPU7: Yes
Location: Frenchville, PA

Re: System variables for probing

Post by cnc_smith »

Please post the program that you are using to call the probing routines and any other files related that you are using.
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


cnckeith
Site Admin
Posts: 9047
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Plasma CNC Controller: No
AcornSix CNC Controller: No
Allin1DC CNC Controller: Yes
Hickory CNC Controller: No
Oak CNC controller: Yes
CNC Control System Serial Number: none
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
Contact:

Re: System variables for probing

Post by cnckeith »

fyi...im sure you know this..but mostly for others that may be reading this...be sure to rename the files you are modifying as CNC12 uses them to run the stock probing and digitizing cycles in the Probing and Digitizing menus. if you don't you will break those probing feature menus.
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

Gear we use but don't sell. https://www.centroidcnc.com/centroid_di ... _gear.html


Post Reply