Z axis position

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

Post Reply
sak240277
Posts: 6
Joined: Tue Dec 22, 2020 1:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Z axis position

Post by sak240277 »

If tool on z axis is having problem, to resolve first Z axis moves to a defined safe position & then Cnc controller allows operator to move x & y axis in Tool Check function.

I want to know which is that parameter where value is stored by which CNC controller moves z axis to safe position?

Can I save this location value prior to moving to a safe position so that I can come to exactly same position.

Pl note this is for open loop controller with no (encoder) feedback & I am expecting this in normal condition & not power on / off resume.
cnckeith
Posts: 3113
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
CNC Control System Serial Number: none
Contact:

Re: Z axis position

Post by cnckeith »

G28, see operator manual for more details on G28.
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)
sak240277
Posts: 6
Joined: Tue Dec 22, 2020 1:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: Z axis position

Post by sak240277 »

Dear Keith/All,
I am not probably not able to explain to you or everyone out here.
Z axis moving to G28 defined position is known.
But when it returns or say resume after cycle start pressed, then which parameter / variable is holding the value to move Z axis position to a point from where it was interrupted by Tool Check originally?
cnckeith
Posts: 3113
Joined: Wed Mar 03, 2010 4:23 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
MPU11 & GPIO4D -w/ 3rd Party Drives: Yes
DC3IOB: Yes
CNC11: Yes
CPU10 or CPU7: Yes
CNC Control System Serial Number: none
Contact:

Re: Z axis position

Post by cnckeith »

tool check in the middle of a g code job will restart at the Beginning of line or arc that Tool Check was press.
i'll have to ask if that info is accessible. what are you trying to accomplish?
When requesting support READ THIS POST first. http://centroidcncforum.com/viewtopic.php?f=60&t=1043

Please ALWAYS post a FRESH report. To make a report: https://www.youtube.com/watch?v=Ecvg0VJp1oQ.

(We pride ourselves on providing timely solid technical support but, without good information we may not be able to help and/or reply until such information is posted.)
cncsnw
Posts: 1878
Joined: Wed Mar 24, 2010 5:48 pm

Re: Z axis position

Post by cncsnw »

Both axes will move simultaneously, from wherever they are when you choose Run -> Resume, to the beginning of the line or arc in which the job was interrupted.

If you don't like the resulting path -- i.e. if it would go through the wall of the part -- then you can jog the axes to a different starting point, before you choose Resume.

On the Resume screen, you can press F8/Graph to get a preview of the moves that it will make. Everything graphed in blue dotted lines are moves that are already done, and which will be skipped. Everything graphed in the usual red and yellow are what the machine is going to do if and when you press Cycle Start to resume.
sak240277
Posts: 6
Joined: Tue Dec 22, 2020 1:43 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
MPU11 & GPIO4D -w/ 3rd Party Drives: No
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
CNC Control System Serial Number: none

Re: Z axis position

Post by sak240277 »

Hope this explains in short. This is my NC code :
%
N1010 G0G90G54X0Y0Z0
N1020 G01G54Z-25F500
N1025 M17
N1030 G01G90G54X200.0Y0 F4000
N1040 G01G90G54X200.0Y200 F4000
N1050 G01G90G54X0Y200 F4000
N1060 G01G90G54X0Y0 F4000
N1150 M30

Below is part program M17 called in above NC file.
;------------------------------------------------------------------------------
; Filename: mfunc17.mac
; Description: User Customizable Macro
;----------------------------------------------------------------------
IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching
N100 ;Insert your code between N100 and N1000
N150
M115/Z-200 P-4 F200 L1
N1000

========================Problem Statement=====================
If I initiate TOOL CHECK while executing , say line N1040 then.....
1. Program execution stops
2. Z goes to HOME
3. I jog X & Y axes
4. On subsequent "CYCLE_START" press, the X & Y axis are taken to appropriate location (begining of N1040) correctly as desired.
5. However Z-axis position acheived is "-25" (corresponding to N1020), WHEREAS WE EXPECT THIS INTERMEDIATE (between -25 TO -200) POSITION, TO BE THE POSITION ACHEIVED DURING "M17"
=============================================================
To come out of this problem we wanted to know whether the system stores current "Z" value in certain variable.
cncsnw
Posts: 1878
Joined: Wed Mar 24, 2010 5:48 pm

Re: Z axis position

Post by cncsnw »

No, the last Z position from the last CNC job that was running (before it was interrupted) is not saved anywhere.

"Resume Job" does not work by remembering everything about the state when the job was interrupted. It only remembers what move number it was on. It then reads and processes the G code, until it gets to the line you need to resume on (or search to, if you are using Search instead). Think of it as answering the question "if we ran the job from the beginning, where would we be, and what would we be doing, when we got to the beginning of the target line?".

Your M17 macro above has two paths: two different things it can appear to do. One, used when running through the job normally, does an M115 move to send Z down until it detects the switch on INP4. The other, used during graphing and during Search and Resume processing, does nothing.

So, when you ask to resume on the line with N1040, the control processes lines from the beginning, through the line with N1030. But since in Search/Resume mode M17 does nothing, the expected Z position at the end of N1030 is where it was left on N1020: Z-25.0.

You can probably get the result you are looking for if you made your M17 save the probed Z position (from variable #5043) into a static variable or Machine Parameter value; and made an alternate path in the M17 macro -- followed in Search or Resume mode -- that moves Z to the saved position from the static variable or parameter.
Post Reply