Hello out there! My friend Mark and I have finally gotten the build (mostly) complete for our custom machine. It is a rebuild of the scratch built Ornamental Lathe we made in 1992. The original machine ran on a stepper motor control board and custom software. I am an electrical engineer (retired) - but a hardware guy, not software. For the rebuild we decided on MACH4 and Practical Micro Design PMDX-424. The machine (for lots of reasons) is configured as a MILL, but without a Y axis.
I am relatively new to CNC programming for our machine. I wrote a short program to make a "basket weave" pattern. I want to have the program run in incremental mode so it can be reused along the spindle. It is also required to return to the starting point after completing the cut. I tried to use #5021 and #5024 stored in a #var to return. In the attached it is 36, 37, 44, 45, 46. It works in simulation, but not on the machine. Each time the program runs the X axis offsets further in the +X direction (X= 0.72, 0.144, etc). Any input would be appreciated.