Can't change homing direction! (Resolved)

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

tblough
Posts: 3102
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: Can't change homing direction! & 4th Axis Info (Resolved)

Post by tblough »

If you use F1 Setup/F6 4th Axis Off to turn the rotary table off, you can use the following in your CNC.HOM file to automatically skip the homing.

Code: Select all

; Check for rotary table homing
IF #50010 ; Prevent lookahead from parsing past here
IF [#20104 == 78] THEN GOTO 1000 ; "N" for 4th axis turned off

M92/$[#20104]
G91 G20 G1 $[#20104]30.596 F1800.0
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.
swissi
Posts: 573
Joined: Wed Aug 29, 2018 11:15 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DADEB24D5-0309180716
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Can't change homing direction! & 4th Axis Info (Resolved)

Post by swissi »

To follow up on Tom's post, if you want to get that F6 function to turn ON/OFF the 4th axis, you need to manually configure parameter 131 as follows:
  • Axis Label A = 11
  • Axis Label B = 21
  • Axis Label C = 31
  • Axis Label U = 41
  • Axis Label V = 51
  • Axis Label W = 61
Now be aware that parameter 131 is not synchronized with the Wizard. So if you set parameter 131 to 11 for Axis label A and go into the Wizard and select axis label B for your 4th axis, the Wizard will temporarily configure the 4th axis as B but when you turn off the 4th axis with F6 and turn it back on, it will default back to Axis label A.

I made suggestion to Centroid a while back to have the Wizard sync with parameter 131 for the 4th axis but I don't know what the priority is to fix this or if it even made it on the fix list.

Not a big deal and just something you need to be ware off if you have a 4th axis and use F6 to turn it ON/OFF.

-swissi
If you are using Fusion 360, check out my CNC12 specific Post Processor
If you are using a Touch Probe, Tool Touch Off Device or a Triple Corner Finder Plate, check out my ProbeApp

Contact me at swissi2000@gmail.com
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Can't change homing direction! & 4th Axis Info (Resolved)

Post by cncsnw »

If you leave out the G91 move, then you don't even need the GOTO and N1000 logic. You can just include, for example:

Code: Select all

M91/A
M26/A
If Parameter 131 indicates that there is a part-time A axis (or other label), then CNC12 will silently ignore M9x and M26 codes for it when it is not active.

The "IF #50001" in the example is not necessary in any event, since the 4th axis label is not going to change between the time you press Cycle Start to begin homing, and when CNC12 gets to that line of the macro.
tblough
Posts: 3102
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: Can't change homing direction! &4th Axis Info (Resolved)

Post by tblough »

Finally!!! Someone finally explains the reason behind the "IF #50001"! Thank you Marc!
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.
Muzzer
Posts: 728
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: Can't change homing direction! & 4th Axis Info (Resolved)

Post by Muzzer »

cncsnw wrote: Fri May 22, 2020 4:34 pm If you leave out the G91 move, then you don't even need the GOTO and N1000 logic. You can just include, for example:

Code: Select all

M91/A
M26/A
If Parameter 131 indicates that there is a part-time A axis (or other label), then CNC12 will silently ignore M9x and M26 codes for it when it is not active.

The "IF #50001" in the example is not necessary in any event, since the 4th axis label is not going to change between the time you press Cycle Start to begin homing, and when CNC12 gets to that line of the macro.
That's neat! I'll try that out later when I get back into the workshop. I'm likely to be disconnected the 4th axis when not in use, so this would be a good approach.

I'm puzzled by the #50001 reference. Did you mean #50010? I can't see a #50001 anywhere, nor appreciate its significance. Something to do with lookahead...
tblough
Posts: 3102
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: Can't change homing direction! & 4th Axis Info (Resolved)

Post by tblough »

Yeah. The G91 move was to align the t-slots on the rotary table parallel with the mill table before setting A0.
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.
swissi
Posts: 573
Joined: Wed Aug 29, 2018 11:15 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 985DADEB24D5-0309180716
DC3IOB: No
CNC11: No
CPU10 or CPU7: No

Re: Can't change homing direction! & 4th Axis Info (Resolved)

Post by swissi »

Muzzer,
I was told by Centroid in the past that their default sync variable is #50001 but when you look at all the macro files of the 4.49 Beta build, they all now use #50010. Would be good if Centroid could explain what the reason was behind this change.

Marc,
do you have any code samples that actually prove that the command "If #50001" does indeed stop the look ahead. I'm getting increasingly suspicious that this command doesn't do anything, at least not on the Acorn board.

-swissi
If you are using Fusion 360, check out my CNC12 specific Post Processor
If you are using a Touch Probe, Tool Touch Off Device or a Triple Corner Finder Plate, check out my ProbeApp

Contact me at swissi2000@gmail.com
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Can't change homing direction! & 4th Axis Info (Resolved)

Post by cncsnw »

swissi wrote:do you have any code samples that actually prove that the command "If #50001" does indeed stop the look ahead. I'm getting increasingly suspicious that this command doesn't do anything, at least not on the Acorn board.
Enter the following program:

Code: Select all

N10 #150 = 1.234
N20 G10 P701 R2.345
N30 G0 X0
N40 G1 F2 X2
N50 IF [#50001]
N60 #150 = 3.1416
N70 G10 P701 R2.7183
Start it running, but during the N40 move, press Cycle Cancel (ESC).

Look in the file "c:\cncm\job.xml", or use M225 or something similar, to inspect the value of #150. Look in the Parameters table to see what value is in Parameter 701. What values do you find there?

Now delete the "IF [#50001]" line; run the program again; and again cancel it while it is still doing the N40 move.

What values do you find in #150 and P701 this time?
cncsnw
Posts: 3854
Joined: Wed Mar 24, 2010 5:48 pm

Re: Can't change homing direction! & 4th Axis Info (Resolved)

Post by cncsnw »

I don't think it makes the least bit of difference whether you use "IF #50001" or "IF #50010".

See http://www.cncsnw.com/AdvancedMacroProgramming.htm, and scroll down to "Updating Parameters and Static User Variables".
Muzzer
Posts: 728
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: Can't change homing direction! & 4th Axis Info (Resolved)

Post by Muzzer »

Thanks for the link, Marc. Also your guide to 4th axis is very useful reading for me right now:
http://www.cncsnw.com/4thHowTo.htm

I've got the F1>F6 running now, which is something I hadn't been aware of.
Post Reply