Home to limit switches.
Moderator: cnckeith
-
- Posts: 7494
- 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: Home to limit switches.
when you switch cnc12 from inches to mm all values in CNC12 that are in parameters will convert. it will not convert your g code programs. and all a macro is.... is a g code program. like tom said, its up to you to let CNC12 know what units your g code is in with the G20 or 21. Glad you are making progress!
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
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
-
- Posts: 15
- Joined: Tue Nov 08, 2022 1:29 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: Yes
Re: Home to limit switches.
Using Allin1Chris's CNCM.hom I can get the z axis to home but then the system just ignores X and y and sets the current position to 0,0. Any suggestions?
-
- Posts: 15
- Joined: Tue Nov 08, 2022 1:29 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: Yes
Re: Home to limit switches.
I saw in a previous post that someone else was having the same issue that I am. It was suggested that I make the motor parameters and the custom cncm.hom file for review so I have posted them below.
This is the cncm.home file I am using. This machine is configured so that the X and Y axis are swapped. As you stand at the operator console X+ is to the left and Y + is up and away from the operator. Home is all the way down and to the right.
N100 ;Check for an open home switch
;First axis minus and plus
IF #21301 == 0 THEN #111 = 9 ELSE #111 = #21301
IF #21401 == 0 THEN #112 = 9 ELSE #112 = #21401
IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Second axis minus and plus
IF #21302 == 0 THEN #111 = 9 ELSE #111 = #21302
IF #21402 == 0 THEN #112 = 9 ELSE #112 = #21402
IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Third axis minus and plus
IF #21303 == 0 THEN #111 = 9 ELSE #111 = #21303
IF #21403 == 0 THEN #112 = 9 ELSE #112 = #21403
IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Fourth axis minus and plus
IF #21304 == 0 THEN #111 = 9 ELSE #111 = #21304
IF #21404 == 0 THEN #112 = 9 ELSE #112 = #21404
IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
IF #101 != 0 THEN GOTO 100
;Perform Homing commands
M92/Z L2
G91 z-.5 f10
M26/Z
M91/Y L2
G91 y-.5 f10
M26/Y
M92/X L2
G91 x-.5 f10
M26/X
This is the cncm.home file I am using. This machine is configured so that the X and Y axis are swapped. As you stand at the operator console X+ is to the left and Y + is up and away from the operator. Home is all the way down and to the right.
N100 ;Check for an open home switch
;First axis minus and plus
IF #21301 == 0 THEN #111 = 9 ELSE #111 = #21301
IF #21401 == 0 THEN #112 = 9 ELSE #112 = #21401
IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20101 != 78] && [#21301 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20101 != 78] && [#21401 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Second axis minus and plus
IF #21302 == 0 THEN #111 = 9 ELSE #111 = #21302
IF #21402 == 0 THEN #112 = 9 ELSE #112 = #21402
IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20102 != 78] && [#21302 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20102 != 78] && [#21402 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Third axis minus and plus
IF #21303 == 0 THEN #111 = 9 ELSE #111 = #21303
IF #21403 == 0 THEN #112 = 9 ELSE #112 = #21403
IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20103 != 78] && [#21303 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20103 != 78] && [#21403 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
;Fourth axis minus and plus
IF #21304 == 0 THEN #111 = 9 ELSE #111 = #21304
IF #21404 == 0 THEN #112 = 9 ELSE #112 = #21404
IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN M225 #100 "Home switch tripped!!!\nPlease clear before Homing.\n\nPress Cycle Cancel to end Homing"
IF [#20104 != 78] && [#21304 != 0] && !#[50000 + [#111]] THEN #101 = #101 + 1
IF [#20104 != 78] && [#21404 != 0] && !#[50000 + [#112]] THEN #101 = #101 + 1
IF #101 != 0 THEN GOTO 100
;Perform Homing commands
M92/Z L2
G91 z-.5 f10
M26/Z
M91/Y L2
G91 y-.5 f10
M26/Y
M92/X L2
G91 x-.5 f10
M26/X
-
- Posts: 33
- Joined: Fri Dec 15, 2017 3:01 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: 20D77883F936-0629237375
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Home to limit switches.
I'm not an expert but, I know on my motor config page I have values set under the home plus or minus that map it to the correct input for homing. I don't see any inputs defined on yours. See my screen shot on page 4 of this thread.
-
- Posts: 15
- Joined: Tue Nov 08, 2022 1:29 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: Yes
Re: Home to limit switches.
Good catch, I did not catch that on the screen shot, but I did specify them. I wonder why they changed back to0. I will change and see what happens.
-
- Posts: 33
- Joined: Fri Dec 15, 2017 3:01 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: 20D77883F936-0629237375
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: No
Re: Home to limit switches.
I have found if you edit the motor parameters in CNC12 and then use the wizard to change something it will reset the motor parameters to match the wizard screens. You need to make the changes on the motor screen be the last step of the setup.
-
- Posts: 15
- Joined: Tue Nov 08, 2022 1:29 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: Yes
Re: Home to limit switches.
That fixed the "Z" issue. The machine moved up, tripped the Z and then moved down 1/2" to clear the Z. I then get a 302 code Moving, followed by a 457 Unable to find home and then 338 Job canceled message.
Re: Home to limit switches.
I am not sure why your homing macro has "L2" with each M91 or M92 command.
Usually an Acorn would use "L1" there, so that CNC12 does not try to back off to the encoder index pulse (which is not available, with Acorn).
Try changing the "L2" to "L1" and see what happens.
Usually an Acorn would use "L1" there, so that CNC12 does not try to back off to the encoder index pulse (which is not available, with Acorn).
Try changing the "L2" to "L1" and see what happens.
-
- Posts: 15
- Joined: Tue Nov 08, 2022 1:29 pm
- Acorn CNC Controller: Yes
- Allin1DC CNC Controller: No
- Oak CNC controller: No
- CNC Control System Serial Number: none
- DC3IOB: No
- CNC12: Yes
- CNC11: No
- CPU10 or CPU7: Yes
Re: Home to limit switches.
Thanks Marc, I had assumed that the L1 referred to the switch that it was seeking and I have my limit switches on input 2. Changing the L2 to L1 solved my problem.