How to program an aux key to home an individual axis (answered)

All things related to the Centroid Acorn CNC Controller

Moderator: cnckeith

DICKEYBIRD
Posts: 536
Joined: Sat Jul 08, 2017 7:38 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: n/a yet
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Collierville, TN USA

How to program an aux key to home an individual axis (answered)

Post by DICKEYBIRD »

On my lathe, I want to enable the Aux 10 key to re-home (to switch & back off) the X-axis on demand & the Aux 11 key to re-home the Z. I went to the Parms screen & tried resetting lines 197 & 198 to 9111, 9211 & 2611 but those mfuncxx.mac files aren't in the program folder so the program won't execute those macros when the key is pressed. I'm pretty sure those are wrong anyway. Will I have to write macros myself to do this? Mach has buttons to do this already so no special skills were needed.

This is a stretch of my 'puter skills. Anyone care to comment on how I can do this? :)
Milton in Collierville, TN

"Accuracy is the sum total of your compensating mistakes."
cnckeith
Posts: 7166
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: Enabling "Aux" keys

Post by cnckeith »

Please take a look at TB300 for Details. Thxs

http://www.centroidcnc.com/dealersuppor ... ds/300.pdf
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
PLData
Posts: 39
Joined: Sat Oct 14, 2017 2:10 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: many boards
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Denmark

Re: Enabling "Aux" keys

Post by PLData »

Hi,
is it possible to change the AUX 8-11 key label text out which my on text or graphic for my one layout ?

\PLData
cnckeith
Posts: 7166
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: Enabling "Aux" keys

Post by cnckeith »

Without programming skill currently no. We are adding the ability to change the button labels in the new version of the vcp that will be out soon. It will be a simple drag and drop user interface.
So for now you can program them to function pretty much whatever you want as outlined in tb399..but the label of the button will stay the same.. make yourself a Post-It note for now to remind yourself. And when we release the next version of the VCP you'll be able to change the labels.
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
diycncscott

Programming an aux key to home an individual axis

Post by diycncscott »

We mixing topics here. To avoid confusion, please do not post in a topic unless it specifically relates to the original topic. Yes, custom macros are part of that but the OP was specifically asking about using an aux key to re-home an individual axis. I have changed the subject to more accurately reflect the question.

The OP asked about adding a button(s) for re-homing the an axis individually by moving back to the home switch and how to change parameters to use aux keys to do so.

To individually home an axis to a switch using an aux key:

1. Create macro(s) - I'll use M12 for X (you create an M13 for Z)

;------------------------------------------------------------------------------
; Filename: mfunc12.mac - to run from aux 10, p197(aux 10 function) = 1211 -mfunction number(12) + function of aux key = run macro(11)
; M12 macro
; Description: Home X axis
; Notes:
; Requires:
; Please see TB300 for tips on writing custom macros.
;------------------------------------------------------------------------------

IF #50010 ;Prevent lookahead from parsing past here
IF #4201 || #4202 THEN GOTO 1000 ;Skip macro if graphing or searching

N100

M92 /X L1 ;Home X in + direction. Change to M91 to home in negative direction.
;Note X home switch must be set correctly in Wizard

M26 /X ;Set X axis Machine 0 (home) here.

N1000 ;Insert your code between N100 and N1000




FWIW The Wizard already configures the PLC, parameters and aux keys and macros are automatically re-home all axes by moving to home switch when the Wizard is configured to "home to switch" on an axis.
DICKEYBIRD
Posts: 536
Joined: Sat Jul 08, 2017 7:38 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: n/a yet
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Collierville, TN USA

Re: How to program an aux key to home an individual axis (answered)

Post by DICKEYBIRD »

Like this, Oh Great One? Have I interpreted thy teachings with truth and correctness? If so, I am most unworthy but humbly bow and accept the gift of your magical powers. :D

IF #50010
IF #4201 || #4202 THEN GOTO 1000
M92 /X
M26 /X
N100

(I had the M92/X & M26/X but missed the other stuff including the spaces before the forward slashes.)
Milton in Collierville, TN

"Accuracy is the sum total of your compensating mistakes."
DICKEYBIRD
Posts: 536
Joined: Sat Jul 08, 2017 7:38 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: n/a yet
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Collierville, TN USA

Re: How to program an aux key to home an individual axis (answered)

Post by DICKEYBIRD »

Oh well, I was hoping for success but it's a no go. Improper translation on my part probably.

X & Y do move with the press of Aux 10 & 11 keys but only .1673" & it stops & reads out:
302 Moving...
457 Unable to find home
388 Job cancelled

Report attached
Attachments
report_985DAD887BFB-0605170051_2017-11-13_19-40-27.zip
(170.92 KiB) Downloaded 133 times
Milton in Collierville, TN

"Accuracy is the sum total of your compensating mistakes."
diycncscott

Re: How to program an aux key to home an individual axis (answered)

Post by diycncscott »

A couple of things:

1. In the lathe, Z is the first axis, X is the second, there is no "Y". I know you probably understand this and, being a mill person, I often think in terms of X & Y myself but I wanted to clarify for others who may be reading this.

2. Your macro you post here said you are using M92 /X - the macro in your report (M12) is actually written with an M91 /X but your machine is configured with only a + Home (2)

Axis Label Motor Encoder Lash Comp. Limit Home Dir Screw
revs/in counts/rev. (inches) - + - + Rev Comp
1 Z 12.7000 1600 0.0000 0 0 3 0 Y N
2 X 12.7000 1600 0.0000 0 0 0 2 Y N

3. In addition to that error, your macro would generate an error if graphing or searching, there is no N1000 in your macro. Same thing in M13.

IF #50010
IF #4201 || #4202 THEN GOTO 1000
M91 /X
M26 /X
N100

4. What color are your home inputs in the I/O screen? - They must be green before attempting to home.

BTW Your home file (cnct.hom) is configured to home wherever it is at (jog/simple). Remember, the home files are one of those that the Wizard will not overwrite. If you want the Wizard to create a home to switch cnct.hom, delete the existing cnct.hom before running the Wizard.

Lastly, my bad. I apologize. The M91 and M92 lines should be written with an L1 switch at the end. -> M91 /X L1
By default, the control is looking for an index pulse when coming off the switch in an M91 or M92 command. The L1 tells to look for the switch to change change state to stop instead of looking for the index pulse. (My mind gets stuck in closed loop mode sometimes.)
DICKEYBIRD
Posts: 536
Joined: Sat Jul 08, 2017 7:38 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: n/a yet
DC3IOB: No
CNC11: No
CPU10 or CPU7: No
Location: Collierville, TN USA

Re: How to program an aux key to home an individual axis (answered)

Post by DICKEYBIRD »

Thank you Scott; I'll try again when I get home tonight & let you know how it goes. The report probably was a little silly because I had been trying a couple different things & got myself confused. We'll get there! :oops:
Milton in Collierville, TN

"Accuracy is the sum total of your compensating mistakes."
diycncscott

Re: How to program an aux key to home an individual axis (answered)

Post by diycncscott »

No problem.

BTW It is VERY unusual to home X or Z in the negative direction on a lathe and when I say "unusual", I mean I can only think of bad things that could happen when trying to home X or Z on a lathe in a negative direction.
Post Reply