Page 1 of 2

how to reference LimitAll input in M91 (Resolved)

Posted: Fri Feb 19, 2021 5:18 pm
by pmchoudek
Hi there,

I have replaced the X and Y axes' physical homing switches with npn proximity sensors. I have the input from the sensors working and my homing sequence is working... but I am wondering if using the M91 M-code would be a more accurate way of homing..?

attached is the report and you can see my cncm.hom file...

I am using M105 and M106 commands for both X and Y in reference to input 6 (which is also LimitAll). I have both sensors in parallel to input 6.

When I use the "M91/Y L1" the slow jog does not stop and back off when the switch is triggered.. How do I reference input 6 with the M91 command? And would the M91 method be more accurate/repeatable than my current method?

Thanks,
PC

Re: how to reference LimitAll input in M91

Posted: Fri Feb 19, 2021 5:20 pm
by cnckeith
hmmm use the Wizard generated home program and it does what you want automatically.

Re: how to reference LimitAll input in M91

Posted: Fri Feb 19, 2021 5:22 pm
by cnckeith
have you used the wizard and pressed 'write setting to cnc control' with the Wizard set to create the home program for you.
and please update to v4.62, free support for v4.5 has ended. thanks.

Re: how to reference LimitAll input in M91

Posted: Tue Feb 23, 2021 1:40 pm
by pmchoudek
Hi there, thank you for the info on needing to upgrade. I will have to do that soon..

I can't home the Z accurately with the wizard generated home program. There is no limit switch for the Z-axis. It is just 0 to 360 degrees. That is why I have the home file the way it is...

I think I have to use my own .hom file is what I'm saying.

I guess I am wondering about the functionality of the M91 command. When it reaches the home sensor, the motor is supposed to stop and reverse until the sensor is cleared. When it is reversing, is that a slow jog in that direction until the switch is cleared? Or is it slower/faster than a slow jog?

Thanks,
PC

Re: how to reference LimitAll input in M91

Posted: Tue Feb 23, 2021 2:15 pm
by cnckeith
ok got ya.. no problem.

m91 moves to a HOME switch and when the HOME switch is triggered then back off till switch is cleared. if you want extra movement after that simply add it to the home program on the next line.

Re: how to reference LimitAll input in M91

Posted: Tue Feb 23, 2021 2:59 pm
by pmchoudek
Yes. I understand how the movement is supposed to happen.

Back to my original question.. How do I make the M91 work with my .HOM file? I try to use "M91/Y L1" but the movement does not stop when my input 6 changes...

Do I need to designate input 6 as the home switch or something? In the source file it is defined as "LimitAll"...

Or can I not use M91 ?? I am confused a little bit..

Re: how to reference LimitAll input in M91

Posted: Tue Feb 23, 2021 3:59 pm
by cnckeith
Use HomeAll that works with M91/M92 (you have LImitAll set to Input 6, change that to HomeAll)

Limit means a limit switch which is not used for homing. Set HomeAll to input 6 and M91/M92 will trigger and then back off the switches.

M92/Y L1
M26/Y
M92/X L1
M26/X

please update to v4.62 be sure to follow the instructions, in particular related to Custom PLC programs.

Re: how to reference LimitAll input in M91

Posted: Tue Feb 23, 2021 5:33 pm
by pmchoudek
Hi there, I updated to version 4.62. Attached is the report

I changed the input 6 to HomeAll in the source file, compiled, and it had an error because HomeAll was defined as MEM260 later in the file.

I commented out the ladder definition, compiled successfully and restarted controls and power cycle. I tried to use the M91/Y L1 but it would do the same thing as before... continue past the prox without stopping and clearing the prox.

I notice there is a little line above input 6 when I press 'Alt+I'. Does this mean it is inverted and the M91 is looking for a red to green transition on input 6? Because in the current setup, when the prox is tripped, it goes from green to red.

How do I un-invert this input? if that is the problem...

If the problem is still within the source code, please advise which line numbers and a remedy.

Thanks

Re: how to reference LimitAll input in M91

Posted: Wed Feb 24, 2021 12:02 pm
by martyscncgarage
...I would use my Wizard screen shots from the last version and do a FRESH install and copy in all my machine parameters. Takes about 15 minutes.
My .02...

Re: how to reference LimitAll input in M91

Posted: Wed Feb 24, 2021 12:26 pm
by cnckeith
marty's suggestion is the best. it will give you a fresh start and dig you out of the hole.