Modify Post Processor

Hi, I have little knowledge of how PP’s work but was wondering if one could be modified to do the following:

Insert B .** in the code on the same line everywhere X .** occurs and duplicate the X values into the B word ?

So this code:
X2 Y2
X4 Y0
X2 Y-2
X0 Y0

Would come out like this:
X2 B2 Y2
X4 B4 Y0
X2 B2 Y-2
X0 B0 Y0

I have no idea if this is possible but am very curious. :confused:
Thanks
:slight_smile:

Yes that is pretty easy do do. Why do you want to do it?

I am planning to build a gantry type mill/router out of materials on hand.
I have 2 ball screws for the long axis that are of different pitch. Being they cannot be slaved, I was thinking of setting them up as individual axis’s, then process the code as above so the two would work in sync together. There is a function in Mach, RefCombination, that I suppose would allow the two to Home together. “X” and “B” would be parallel to each other, “Y” perpendicular and “A” would be a rotary axis.
Do you think this would work ?
Thanks for looking Les,
:slight_smile:

As long as you can get homing working correctly I can’t see an issue with this. If you need the post done for you, let me know.

I would like to experiment with this further.
If you would kindly modify the Mach3 Inch MILL PP for me. it would be greatly appreciated !
Also, if you wouldn’t mind to, please highlight the areas that are added/modified (comment with descriptions) so I might get a grasp of how the PP functions.
You can send it offline if you wish.
Thanks MUCH !

Hi Les, I just stumbled onto this at the Mach forum:
http://www.machsupport.com/forum/index.php/topic,17153.0.html
I thought I had an original idea, imagine that. :unamused:
I supose 549 is correct in that this should be corrected mechanically, but I could never afford to purchase a screw to match one of these that I have. They were picked as NEW surplus very cheap.
Thanks again,
:slight_smile:

Go to Options->machine->post processor. Select the Mach3 post then click on the ‘Edit post’ button. Now look for lines that look like this:

   post.ModalNumber (" X", endX * scale, "0.0000")

Underneath that line add:

   post.ModalNumber (" B", endX * scale, "0.0000")

You need to do that in two places. Save the post under a different name and close the editor. Close the machine options dialog then open it again. You can now select your new post from the list.

Les, that works GREAT for point to point moves, but goes goofy on arcs.
I placed the new line in:
OnMove, OnRapid and tried it On Arcs Modal and NonModal ? ? ?
B seems to go in the opposite dir of X for part of the arc.
Thanks so far, any thing obvious for the arcs ?

Ah. I completely forgot about arcs. Now here we have a problem. Mach can’t cut arcs with this setup. What we can do is break arcs into a series of short line segments. As long as you have CV turned on in Mach it should still cut fairly smoothly.

Delete all of function OnArc() and replace it with this:

function OnArc()
   post.ArcAsMoves(0.1)
end

If the arcs show visible faceting, decrease the number from 0.1 to 0.05.

:smiley:
That works like a CHAMP Les, you are pretty keen !
Flats are a reasonable comprimise for what I have to work with.
This could come in very handy, just need to verify the HOMING now.
Thanks SO much.
Your support is unparalleled.
I have been using SC for small tinkering that I do but larger files are hopefully coming soon so I feel compelled and somewhat obligated to go ahead and purchase your SW.
I have trialed several and in this $ range, none come CLOSE to yours.
Thanks again Les,
:slight_smile:

Just have to figure out JOGGING and MDI commands in Mach now. :confused:
Homing is working well in simulation.
:slight_smile:

For jogging can you set the same hotkeys for X and B axes?

That’s the first thing I tried, Mach doesn’t seem to allow duplicate assignments of the keys.

I would consider re-designing the machine to use a single ball screw…or just use acme screws. In the end you’ll have a better machine running acme screws than trying to slave two different drive ratios using ball screws.

Hi rrc,
I agree with you, and TP in that one should not rely on sw to correct for poor engineering.
This is more of an exersize to demonstrate the flexability and capability of Mach3 spurred on by a recent post over there with a couple of desires for this functionality.
I enjoy a challenge and this has been a good exersize and learning experience.
Simulating two high resolution screws with a 1000 steps per difference tracks within .0001" running code or jogging at any speed.
The only problem now (other than no arcs) is the MDI. Have to be very carefull of typos when commanding the coupled axis, or figure out a way to make that seamless. No clue if that could even be done though.
Thanks,
:slight_smile: