Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: wvancura on January 31, 2011, 10:06:19 PM

Title: macro embedded in Gcode regens toolpath at 0,0
Post by: wvancura on January 31, 2011, 10:06:19 PM
I recently created a VB wizard/macro that I intend to call from G-code.

I get the current X,Y, & Z location from GETOEMDRO().
I pass the necessary pattern information through P, Q, & R parameters.

In the g-Code, I position the tool at the macro starting location and then call the macro with the appropriate runtime parameters in P, Q, & R.
When I load the program, the macro's toolpath result is generated on the toolpath screen at current DRO location instead of where it is supposed to be. Because I call it several times in the g-code, all of the cutouts appear to be on top of each other (not pretty).

When I run the code, it appears to cut and display at the proper location (This is good).

Is this normal?  If not, what can I do to correct it?

Thanks,
Bill