Page 1 of 1

2 simple macro questions.

Posted: Wed Mar 13, 2019 4:00 pm
by DICKEYBIRD
#1: How would I go about modifying the homing macro on my lathe to make the axis back off the switch farther (.100” or so) before traveling back & tripping the switch the 2nd time?

Here is what I’m using now which is working "OK" with my combined mechanical switch/opto-sensor homing scheme. I think it will be more accurate & repeatable with a longer back off/reversal movement.

M106 /X P50002 F5
M105 /X P-50002 F.5
M106 /X P50002 F.5
M26 /X
M106 /Z P50003 F5
M105 /Z P-50003 F.5
M106 /Z P50003 F.5
M26 /Z

#2: I now have a Centroid wireless pendant (LOVE IT!!) and will set it up with 2 of its aux button/macros to initiate my X and Z tool setting moves. Is it possible to set them up so that the 2 buttons will *ONLY* operate from inside the tool setting menu option in CNC 12? If that’s not possible, set them so they will *ONLY* operate when a second button is pressed at the same time? This should prevent a dumb-a$$ (such as myself) from starting an unwanted movement.

Re: 2 simple macro questions.

Posted: Thu Mar 14, 2019 10:55 am
by DICKEYBIRD
I tried a few changes last night with no success but when I re-RTFM'd on the M105 & M106 I'm puzzled by the "G92" in the example. G92 is a threading cycle according to the manual. How would G92 "Set X position to 10?" A typo maybe? I'll admit being easily confused by this stuff. :oops:

"M105 - Move Minus to Switch
M105 moves the requested axis in the minus direction at the current feedrate until the specified switch opens (if the
given P parameter is positive), or until the scecified switch closes (if P parameter is negative).
Example:
M105/X P5 F30 ; move the X axis in minus direction at 30"/min until
; the switch on INP5 opens
G92 X10 ; Sets X position to 10
M105/Z P-6 ; move the Z axis in minus direction until switch on INP6 closes"

Re: 2 simple macro questions.

Posted: Thu Mar 14, 2019 1:05 pm
by cnc_smith
DICKEYBIRD wrote: Thu Mar 14, 2019 10:55 am I tried a few changes last night with no success but when I re-RTFM'd on the M105 & M106 I'm puzzled by the "G92" in the example. G92 is a threading cycle according to the manual. How would G92 "Set X position to 10?" A typo maybe? I'll admit being easily confused by this stuff. :oops:

"M105 - Move Minus to Switch
M105 moves the requested axis in the minus direction at the current feedrate until the specified switch opens (if the
given P parameter is positive), or until the scecified switch closes (if P parameter is negative).
Example:
M105/X P5 F30 ; move the X axis in minus direction at 30"/min until
; the switch on INP5 opens
G92 X10 ; Sets X position to 10
M105/Z P-6 ; move the Z axis in minus direction until switch on INP6 closes"
For the Lathe G50 is for Coordinate system setting not the G92 as used on the mill. Use G50 X10 ; sets X position to 10. Also the lathe does not have the G90 ABS and the G91 INC. To move the X and Z incremental moves you use U and W. U-.200 W.5 would move the X-.2 in an incremental move and the Z+.5 in an incremental move.

For your #2 question someone else more familiar with the that type of macro will have to answer that.

Re: 2 simple macro questions.

Posted: Thu Mar 14, 2019 2:04 pm
by DICKEYBIRD
Thanks Dana, that helps a lot!

I was using the T-Series CNC11 V.3.16 lathe manual. I realize there are differences when working with an Acorn.