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!
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?
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
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
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.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
ssaxer wrote: ↑Fri Mar 15, 2024 12:05 pm
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.
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.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
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.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)
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.
(Note: Liking will "up vote" a post in the search results helping others find good information faster)