Post processor for lathe
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Indicate the post processor used.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Indicate the post processor used.
Attach drawing files and screenshots.
Post one question per topic.
Post processor for lathe
I have not found anything in the index concerning lathe posts, maybe there is something and I am just not looking in the right place. I needed to do an internal taper on our lathe and had to use G codes instead of Mazatrol. Drew up a .dxf and I posted the geometry as X and Y coordinates, then simply changed all X's to Z's and Y's became X's in the exported file. The only problem is that the lathe wants diameter and not radius. I manually doubled what was originally the Y (new X) output. Wondering if there is a way to create a variable in the post to double all of the Y values. Thanks.
Re: Post processor for lathe
Hi,
Yes, I think there is.
All variables are declared in your Postprossesor or where your Postprossesor is based on.
For the exported Y an example from GCodeBase.js:
One can alter the output by including a factor as option:
This should double the Y values so far I can understand it.
But you may have to alter more than only this Y parameter.
You probably are better of by creating a new Postprossesor or a new copy of the one you used for this specific output.
Something in the nature of MyLatch2Y.js ... Maybe you could include its brand ...
Regards,
CVH
Yes, I think there is.
All variables are declared in your Postprossesor or where your Postprossesor is based on.
For the exported Y an example from GCodeBase.js:
Code: Select all
// variables:
// name, ID, always, prefix, decimals, options
this.registerVariable("yPosition", "Y", false, "Y", "DEFAULT", "DEFAULT");
Code: Select all
this.registerVariable("yPosition", "Y", false, "Y", "DEFAULT", { factor: 2 });
But you may have to alter more than only this Y parameter.
You probably are better of by creating a new Postprossesor or a new copy of the one you used for this specific output.
Something in the nature of MyLatch2Y.js ... Maybe you could include its brand ...
Regards,
CVH
Last edited by CVH on Fri Jan 06, 2023 8:01 am, edited 1 time in total.
Re: Post processor for lathe
Swapping some axis in the output should also be feasible.
One could replace all prefixes declared as "X.." with a "Z.." and all the 'Y's with an 'X'.
On a linear move it would write this block of code:
But that would export as "Nnnn Zxxx Xyyy F..." where the lower cases are the values.
With including a factor=2 for the Y values the exported yyy would then be doubled and prefixed with an 'X'.
Regards,
CVH
One could replace all prefixes declared as "X.." with a "Z.." and all the 'Y's with an 'X'.
On a linear move it would write this block of code:
Code: Select all
this.linearMove = "[N] [X] [Y] [F]";
With including a factor=2 for the Y values the exported yyy would then be doubled and prefixed with an 'X'.
Regards,
CVH
Re: Post processor for lathe
Thanks for the replies. I added the variable line to my post and it works fine. This was an odd occurrence, I may or may not need to do something like this again. For those who are curious, I have attached some files. The part has a 47 degree angle so we could not simply use a countersink/chamfer tool. And it's a pretty small part. After breaking the last .160 boring bar, we decided to try scrubbing with a .125 ball end mill. The results were quite good
. I stepped the ball .008 along the slope. The yellow designates the path. I exported as a drill path, then modified the exported file. It's not a lot of work with global replacement. If the need arises, I might try writing another post to do more. Attached are also the post I use for the Mazak mills (Nexus 510), and what I modified for the lathe.- Attachments
-
- Mazak.js
- (2.91 KiB) Downloaded 261 times
-
- Mazak_L.js
- (2.89 KiB) Downloaded 255 times
-
- ANGLE_BORE.nc
- (1.94 KiB) Downloaded 269 times
-
- ANGLE_BORE_1.nc
- (2.02 KiB) Downloaded 273 times