You could try G103 P1 before any macros, which limits lookahead to one block. Then G103 by itself after your macros to unlimit lookahead for the rest of the program.
I could be doing something wrong hear but I spent a good chunk of my night trying to get the following bit of code to work. The goal is to orientate the part in B axis, while attempting to debug, I found if I just use a certain line twice, it works, otherwise, the value I was attempting to set, remains the same as it was... Anyone have a clue?
The program worked from the get go, only it would not change the machines G54 B axis value, unless I told it twice.
(CALL PROBE)
G00 G90 G54
T24 M06
X-2. Y0.183
G43 H24 Z4.
(PROBE - SINGLE SURFACE IN Z LEFT SIDE)
G65 P9995 W55. A20. H-0.3
G00 Z5.
X2.
Z4.
(PROBE - SINGLE SURFACE IN Z RIGHT SIDE)
G65 P9995 W56. A20. H-0.3
(RETRACT AWAY)
G00 G91 G28 Z0.
(DO THE MATH)
#19= [ [ #5243 - #5263 ] / 4 ]
#19= ATAN[ #19 ]
G91 B - [ ROUND[ #19 ] ]
(CODE SO NICE YOU MUST SAY IT TWICE)
#5225= #5025
#5225= #5025
(END PROBE)
You could try G103 P1 before any macros, which limits lookahead to one block. Then G103 by itself after your macros to unlimit lookahead for the rest of the program.
Thanks guys, next time I set up this job I'll try that. I am however a little bit concerned, I use 'macros' very often and have never had a problem with the look ahead. When exactly must I cancel the look ahead? I've never had a problem otherwise ( and I have canned 'macro' programs )...