Macro and J-Tech No Z Post Processor Problem

I have a problem when using the J-Tech NO-Z post processors. I THINK I have found the solution but don’t totally understand it. I am running grbl 1.1F and have the same problem when using UGS Classic, UGS Platform or CNCJS as the sender. Also, I am a nube with G-Code so bear with me!

The Problem – I load everything up and run the code – let’s say for a 1” square using a profile cut. As it should, moves to the start point, turns on the laser, makes one lap around and stops. Great! I can hit the run button again and it repeats perfectly. But then let’s say I use a macro to rise Z ½” and then another macro lower it back down ½” (G20 g91 g0 z-.5 for example).

When I run the same code for the square again it moves to the start point, turns the laser and then heads for the left field at a 45-degree angle - laser blazing. Hitting the pause button on the sender stops the forward progress but the laser stays on now burning a hole in whatever is there. Hitting the stop button (not the emergency stop but UGS’s stop) turns off the laser. I can then hit the RUN button and it will perfectly return to the start point, correctly make the square and stop – as it should. This is repeatable 100% of the time. But only if I use my macros – jogging with the jog control does not cause a problem.

Again, my macro was set to send G20 g91 g0 z-.5 to lower the laser. But I noticed that when I hit UGS’s jog controller to lower Z it is sending $J=G20 G91 Z-0.5 F200. I checked to see what $J is and I see in 1.1_ grbl it is a jog command that was not part of 1.0. I changed my macros to use the $J along with the F entry for the speed and everything “seems” to be working OK.

Now the question – is this correct or at least workable? And I have been running 1.1F using the Vectric post processors for almost two years and have never had a problem with this – the macros worked fine. But it always jogs Z up, moves to the start point and jogs Z down. Is that Z movement resetting something and overriding the error caused by the macro? Appreciate any guidance as I am in over my head.

BYW – only took me about 5 hrs to finally realize why it every once and I while it would head south. As long as I didn’t jog up or down it ran fine. Just didn’t catch the correlation.

PM Sent.