Page 1 of 1

Soft Limits & Instructions within Macros

Posted: Sat Nov 02, 2019 5:00 pm
by Haysys
Greetings All,

I'm part of the team at BARN (Bainbridge Artisan Resource Network) in Washington State. We've built up a DIY 4'x4' CNC Plasma cutter. The torch is on Z with a Home switch and a second Height switch for setting the starting cut height (we also employ a plasma torch height controller, but that's outside this discussion). We have modified M7 with some M commands, some of which follows:

M105 /Z P2 F30 ;Move Z down until Input 2 is made at 30 IPM

followed by:

M106 /Z P-2 F5 ;Move Z up until switch releases

Our problem is this:

If there is no material under the torch head, the Height switch is never made so M105 never completes, thus Z will continue to dive until manually stopped; this is usually well below the negative Soft Limit. The Z-axis going below the negative soft limit makes no sense to me. Is it the case that while an M code is executing, the Acorn ignores the Soft Limits?? Is there a setting that would negate this??

If anyone has an understanding of how/why this is happening, I'd sure appreciate the input.

Thanks!!

David

Re: Soft Limits & Instructions within Macros

Posted: Sat Nov 02, 2019 6:39 pm
by cncsnw
If you use M115 and M116 instead of M105 and M106, then soft limits will be applied.

To use M115 and M116, you may have to switch the sign of your P value. See http://www.cncsnw.com/AdvancedMacroProgramming.htm.

Optionally, you can also specify a target position (short of the travel limits) with M115/M116, and motion will stop with an error if the machine reaches that position without activating the switch.

Re: Soft Limits & Instructions within Macros

Posted: Sat Nov 09, 2019 1:04 pm
by Haysys
Thanks a tonne for your input on this... Much appreciated!!

And it works as advertised; Solved our problem.