Home file 4th axis select

All things related to Centroid Oak, Allin1DC, MPU11 and Legacy products

Moderator: cnckeith

Post Reply
bakeng
Posts: 66
Joined: Wed Nov 16, 2011 5:50 pm
Allin1DC CNC Controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes

Home file 4th axis select

Post by bakeng »

I have a mill that some times I use a 4th axis with.
Anyone know how to setup the home file to detect an input to enable or disable B axis?
I have a jumper in my 4th axis plug that turns on the 4th axis drive if it’s plugged in. It also is wired to input #8.
In #8 true = enable “B” and home “B”
In #8 false = disable “B” don’t home “B”
tblough
Posts: 3071
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Home file 4th axis select

Post by tblough »

Here's my home file (part you want is the IF at the end):

Code: Select all

; For the following tests:
;  #20103 = third axis label: 90 = Z (enabled), anything else = disabled
;  #50007 = quill clamped switch [INP7] state: 1 = clamped  0 = not clamped

IF [#20103 == 90 && #50007==0] THEN GOTO 20  ; 3-axis mode, but failed to clamp
IF [#20103 != 90 && #50007==1] THEN GOTO 30  ; 2-axis mode, but quill is clamped
IF [#20103 == 90 && #50007==1] THEN GOTO 40  ; normal 3-axis mode
IF [#20103 != 90 && #50007==0] THEN GOTO 50  ; normal 2-axis mode
GOTO 1000    ; should never get here, but if we do, skip everything else

N20
; we will never run this case as ballnut unclamped is handled in the PLC
 M93/Z
 M200 "Clamp quill ballnut and retry home"
GOTO 1000

N30
 M200 "Enable Z axis [F1/F5] and retry home."
GOTO 1000

N40
; if Z homing backoff distance (in G91 line) is altered,
; must change \cncm\system\plcmacro9.mac to match
M92/Z
G91 G1 G20 Z0.110 F[#20203]
M26/Z

N50
M91/X
G91 G1 G20 X-0.060 F[#20201]
M26/X

M92/Y
G91 G1 G20 Y0.100 F[#20202]
M26/Y

IF [#20104 == 77 || #20104 == 78] GOTO 1000 ; "M" or "N" - no fourth axis control
M92/$[#20104] ; use whatever the 4th axis label is
G91 G20 G1 $[#20104]30.596 F[#20204]
M26/$[#20104]

N1000
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Home file 4th axis select

Post by cncsnw »

If you set Parameter 131 appropriately (e.g. to 21, for a fourth axis labeled 'B') then you can just leave unconditional B axis commands in your homing macro.

There is then no need for a detection input. You do have to press the F6 key on the Setup menu when you want to turn the axis on and off.

The reason Tom's file needs the IF/GOTO using variable #20104, is the G1 move in between the M92 and the M26. If it just had "M92/B" followed by "M26/B", then the IF/GOTO would not be necessary.
tblough
Posts: 3071
Joined: Tue Mar 22, 2016 10:03 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: Yes
Oak CNC controller: Yes
CNC Control System Serial Number: 100505
100327
102696
103432
7804732B977B-0624192192
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Boston, MA
Contact:

Re: Home file 4th axis select

Post by tblough »

Marc is correct. I have the G1 move so the rotary home is set with the t-slot horizontal as B=0°(it's the CDO I have).
Cheers,

Tom
Confidence is the feeling you have before you fully understand the situation.
I have CDO. It's like OCD, but the letters are where they should be.
bakeng
Posts: 66
Joined: Wed Nov 16, 2011 5:50 pm
Allin1DC CNC Controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes

Re: Home file 4th axis select

Post by bakeng »

Ok.
I’ll have to look up these # variables to see what they are for it to make any sense.
Thanks guy’s
bakeng
Posts: 66
Joined: Wed Nov 16, 2011 5:50 pm
Allin1DC CNC Controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC11: Yes
CPU10 or CPU7: Yes

Re: Home file 4th axis select

Post by bakeng »

cncsnw wrote: Mon Dec 06, 2021 7:38 pm If you set Parameter 131 appropriately (e.g. to 21, for a fourth axis labeled 'B') then you can just leave unconditional B axis commands in your homing macro.

There is then no need for a detection input. You do have to press the F6 key on the Setup menu when you want to turn the axis on and off.
Does B then get homed after the axis is selected via the F6 key?

I have the home commands in my home program now and when the 4th is not connected and enabled it displays an error after homing the other 3 axis. Does not seem to hurt anything just annoying.
cncsnw
Posts: 3763
Joined: Wed Mar 24, 2010 5:48 pm

Re: Home file 4th axis select

Post by cncsnw »

Setting Parameter 131 will prevent the error message when homing in 3-axis mode, because the parameter value tells the control that B is one of your axis labels; just not of one that is currently in use.

If you home the machine in 3-axis mode, then use F6 to switch to 4-axis mode, you will be prompted to press Cycle Start to find home (again). When you press Cycle Start, it will run cncm.hom again, which will presumably home all four axes.
Post Reply