Page 1 of 1

Need dummy proof HOM sequence (Resolved)

Posted: Mon Jan 18, 2021 11:31 am
by pmchoudek
Hi there, I need to create a homing file that is similar to the one I have, but I need it to home the Y-axis differently...

This is my current home program:

;Disable all limits
M94 /101 /102 /103 /104
;Perform Homing commands

M26/Z
M92/Y L1 ;y axis + home
M26/Y
M91/X L1 ;x axis - home
M26/X
;Enable all limits
M95 /101 /102 /103 /104

Normally, the Y axis would go toward the + direction until it reaches the proximity sensor. Then the input 6 goes to 24V and the slow jog stops and backs off (- direction) a little bit. However, if the Y axis is already in the + coordinates, then the prox sensor is constantly at 24V. This is an issue because if the operator presses the reset home button, the Y axis will not back off until the prox is cleared. It will only back off a little bit, thus changing the Y axis home.

I need to check input 6 to see if it is high or low and base my action for the Y axis off that input. If input 6 is high, then slow jog in - direction until it is low. And then possibly the M92/Y L1.

Please note... The input 6 is also tied to the X home prox sensor as well. The X home sequence (M91/X L1) should not be an issue because the X is always in the + coordinates.

If you have any suggestions, I would appreaciate it!

Thanks,
Peter

Re: Need dummy proof HOM sequence

Posted: Mon Jan 18, 2021 12:43 pm
by tblough
Command a small y axis move in the - direction before the M26/Y command.

Re: Need dummy proof HOM sequence

Posted: Mon Jan 18, 2021 3:44 pm
by pmchoudek
report attached

Re: Need dummy proof HOM sequence

Posted: Mon Jan 18, 2021 3:47 pm
by pmchoudek
this is the CNCM.hom file code that gets the "undefined variable" error on the G0 G91 Y-50:

;Disable all limits
M94 /101 /102 /103 /104
;Perform Homing commands

M26/Z
IF INP6 THEN G0 G91 Y-50 ; check prox switch
M92/Y L1 ;y axis + home
M26/Y
M91/X L1 ;x axis - home
M26/X
;Enable all limits
M95 /101 /102 /103 /104

Re: Need dummy proof HOM sequence

Posted: Mon Jan 18, 2021 6:40 pm
by cncsnw
Try "IF [#50006]" or "IF [!#50006]"

You might also try M105 instead. For example, supposing that INP6 might be open, and you want to move Y- until INP6 is closed, you would use "M105/Y P-50006 F__". If INP6 may be closed, and you want to move Y- until it is open, you would use "M105/Y P50006 F__".

Of course, replace "F__" with the letter F followed by your desired feedrate (inches per minute or millimeters per minute).

Re: Need dummy proof HOM sequence

Posted: Mon Jan 18, 2021 9:03 pm
by tblough
Or don't even bother to test, just move it. If it wasn't on the switch it will just take a little longer to home.

Re: Need dummy proof HOM sequence

Posted: Mon Jan 18, 2021 9:57 pm
by cncsnw
Well, he did say "dummy proof", which means he needs to account for the possibility it is within 50mm of the minus limit of travel when he starts trying to home.

Re: Need dummy proof HOM sequence

Posted: Tue Jan 19, 2021 10:35 am
by pmchoudek
I tried to use this line in my home file:

IF [!#50006] M105/Y P-50006 F4000

It worked! Now it slow jogs Y- direction until the switch is cleared.

Thanks for the help!