Line 12 should read:
Code: Select all
this.registerVariable("xPosition", "X", false, "X=", "DEFAULT", "DEFAULT");
add also:
Code: Select all
this.registerVariable("yPosition", "Y", false, "Y=", "DEFAULT", "DEFAULT");
this.registerVariable("zPosition", "Z", false, "Z=", "DEFAULT", "DEFAULT");
That should export XYZ values as X=... Y=... and so on.
I also see that standard G-code F for feed isn't used ...
So also include:
Code: Select all
this.registerVariable("feedRate", "F", false, "V=", 0);
this.registerVariable("plungeRate", "FP", false, "V=", 0);
Feeds would than be exported as V=....
Look up in
GCodeBase.js what can by 'translated' further.
Don't edit that file, include it in yours
Line 35-36 should read:
Code: Select all
this.rapidMove = "XG0 [X] [Y]";
this.rapidMoveZ = "XG0 [Z]";
That uses your 'XG0' format instead of the standard 'G0'.
The prefixes for XYZ are handled above.
It is not common to do a G0 move to a coordinate with Z.
One usually moves up to safety height and then moves in the XY plane.
Plunging down is usually a G1 move or a combination of G0 and G1.
But in fact, what you need is not standard G-code at all.
I can't help you with what 'XL2P' would be.
'XB' looks like drilling. In G-code that is G0 to XY, G0 to clearance level, G1 to drill, G0 to withdraw ...
Or using canned cycles e.g. G81/82 ...
Bottom line ... Your machine is programmed using macros.
These macros are internally translated in G-codes.
Can it handle G-codes in direct
Probably it will ...
Regards,
CVH