GmoccaPY first steps

13 Mar 2017 21:55 - 13 Mar 2017 22:05 #89555 by swalts

Background info:
I am an amateur user trying to mill a part on my PM 25-mv mill converted to cnc. I can run single tool (no tool changes) with no problem. The whole thing goes hay wire when I have to make a tool change. That is when I went internet searching for a better way than running divided or separate operations. I found GmoccaPY and installed and ran a single tool operation without software failure.
While trying to run multiple operations and change my end mills out during the transition from operation to operation. This causes some sort of offset and eventually leads to catastrophic failure (Ex. broken end mill, spindle diving into the material...).

The only thing I am trying to do is change my end mill and reset the height of the tool properly. Also have a nice cool looking interface. I have a touch off plate but don't know what to do with it (or how to wire it or tell gmoccapy that its there.)

After install of gmoccapy( cool looking interface), I noticed that I could not perform the function I am wanting to do. The forums mention setting up a HAL pin, running macros or sub-routines. The information seems to be geared toward computer wizards as far as instruction goes.

My questions:
1. What are HAL pins and do i need them to perform the tool offset measurement? If so, are there any layman term instructions out there for me to follow?
2. Is there a step-by-step instruction for setting up macros or sub-routines to command the mill to move to the measurement location?
3. Is there anything else that I am missing that prevents me from making this work? Aside from growing a new brain.
4. Last question. Any way to get the keyboard arrows to work again? That's an if your bored question.

Thank you for your time and patience.

Very Respectfully,
Last Edit: 13 Mar 2017 22:05 by swalts. Reason: added last question
13 Mar 2017 22:06 - 13 Mar 2017 22:07 #89556 by newbynobi
Hallo swalts,

First wellcome and thanks for your interest in gmoccapy.
You do not need a new brain, just fill it with some additional information:-)

Have you looked at the dokumentation? There are examples on how to set up a macro and also a very breve instruktion for tool change.

But IMHO you need to understand first what tooloffsets are and why you need G43 to use them.
Do you know abut that?

Last Edit: 13 Mar 2017 22:07 by newbynobi.
13 Mar 2017 22:09 #89557 by swalts
After this reply I am going to learn G43 and how to use it properly. The documentation I have looked at so far does not make any sense to me. Do you know of any simplified version?

Thank you for your response. Will check back after my G43 training.

13 Mar 2017 22:18 #89558 by swalts
Found this information:

G43 G44 and G49 tool length compensation
In an CNC Programming Tool length compensation Code is used to adjust for differences in length between different tools, without worrying about those differences in your part program.
This standard length is the Reference Tool. In general, you load the Reference Tool, jog the Z axis down until that tool touches some surface, and set the Z Reference position there. The control memorizes this position of its Z axis. You then load each other tool, bring that tool down until it touches the same surface, and tell the control to measure the tool. The control compares the Z axis position with this tool touching the surface to the previously stored Z Reference position. The difference in Z axis positions is stored as the length offset for the tool.

Clearly, to touch the same surface with a shorter tool, you have to move the Z axis down further. This results in a negative offset. The shorter the tool, the more the negative offset. To touch the same surface with a longer tool, you don't have to move the Z axis down as far. This results in a positive offset. The longer the tool, the larger (or less negative) the offset.

This seems pretty straight forward. Any idea on how to change that between operations? I assume this is where the touch plate comes in to play, but i do not have any electrical connection to it.

14 Mar 2017 18:35 #89623 by newbynobi
Hallo swalts,

The normal way to use tool offsets is to use a combination of

T2 M6

But that will only work, if you have allready measured the tools and the offsets are included in your tool table.
If you want to measure the tool during a tool change (if you do not have a tool holder with a fix position), the way to do that is to use a remap procedure.

I need some more information about your machine to help you further.

14 Mar 2017 21:15 #89629 by swalts

What kind of info would you like.

I do not have a way to premeasure all of the tools as you mentioned before. This remap method seems to be the way I must do things.

Would you be willing to guide me further on this remap procedure. What do I need. Hardware wise, I have 3 axis on nema 23 motors with KB drivers and a C10 controller.

I made a tool touch off plate but do not know how to connect it yet. Any guidance ( within reason) I will take as per instructions.

Thank you for your time and patience.

Very respectfully
15 Mar 2017 08:24 #89649 by rodw
I found this video very informative.

15 Mar 2017 09:16 #89651 by swalts

Thank you for your reply. I did find this video very informative. I believe this video is geared toward those who have the ability to use preset tools. In my circumstance I am trying to leave the R8 collet in the spindle and change the end mill only; then retouch-off zero.

What I think I need is some sort of M6 remap sub-routine or macro to be run during the time of tool change. I can then incorporate an electrical touch off plate to re-zero my tool offset. Then proceed to the next operation.

There are videos showing this function working but they do not explain how to make it work.

Again thank you for your time and your efforts to help.

Very Respectfully,
15 Mar 2017 09:45 #89652 by rodw
I currently work the way you do with my manual Seig SX3 mill. A friend has the same mill that is CNC'd and he has a number of R8 collet holders already pre-set up. I've seriously thought of of buying a few more collet holders so I can save time when milling. I think multiple holders is really a cost you need to accept if you are doing CNC as it will make life so much easier. I think I could set up a tool library in my DRO to works the way the video does.

They are not expensive from China via eBay
16 Mar 2017 08:52 #89733 by swalts

I found this on the net. This seems like where i am trying to go, but i am not certain how to implement.


(this program demonstrates how to measure tool lengths automatically using)
(a switch hooked to the probe input. this is useful for machines without)
(tool holders, where the length of a tool is different every time it is)

(g30 should already be set to a position safely above the switch)

(start with the first tool loaded, and g54 work offsets set with it)
(when you touch off the work with this reference tool, be sure length)
(comp is off {use g49})

g20 g90
g0 x0 y0 z1

(measure reference tool)
g30 (above switch)
g38.2 z0 f15 (measure)
g91 g0z.2 (off the switch)
#1000=#5063 (save reference tool length)
(print,reference length is #1000)
g90 (done)

(cut with first tool...)
g0 x0 y0 z1
g1 z0 f20
g2 x0 y0 i0 j.05

g0 z2
(msg,insert another tool)
(use TxM6 here if you want to be able to use radius comp too)

(measure next tool)
g30 (above switch)
g49 (measure without the last tool's offset)
g38.2 z0 f15 (measure)
g91 g0 z.2 (off the switch)
g43.1 k[#5063-#1000] (set new tool offset)
(print,new length is #5063)
g90 (done)

(cut in the same place with this next tool...)
g0 x0 y0 z1
g1 z0 f20
g2 x0 y0 i0 j.05

g0 z1

(exit with tool length offset still in effect, in case we want to use MDI)

Can anyone make sense of this?

Thank you.
Moderators: newbynobi
Time to create page: 0.145 seconds
Powered by Kunena Forum