Hello Guest it is November 23, 2020, 10:44:19 AM

Author Topic: How do I get to the center of 2 edges?  (Read 2364 times)

0 Members and 1 Guest are viewing this topic.

How do I get to the center of 2 edges?
« on: October 09, 2017, 04:47:47 PM »
I use a Haimer 3D mechanical probe to locate parts and for the life of me I can't find the method to find the center of a part in Mach4.

Here's the scenario. I have a part in my vise and I need to reference the center of the Y axis. In Mach3 I would indicate of the Y+ and zero the DRO, move to the Y- and then in DRO output I could add " /2" and the DRO would update with the number. Then all I had to do was to jog to the 0.000 position of the Y axis. This also a very similar process on my manual mill with a DRO.

But in Mach4 this doesn't work for me. The DRO ignores the "/" and will just update with the number 2.

I can't find any method to achieve the same result. Am I missing something obvious due to inexperience with Mach4, or is this feature not possible?
Re: How do I get to the center of 2 edges?
« Reply #1 on: October 09, 2017, 07:38:25 PM »
Allen,
I learned something new here, didn’t know mach 3 would accept divide by 2 in a DRO! However I have always done what  you want to do by dividing the DRO value by two and entering that value. Interested in seeing what are told by others.
Re: How do I get to the center of 2 edges?
« Reply #2 on: October 10, 2017, 04:46:27 AM »
Faced with this same issue I added X/2 and Y/2 buttons to the offsets tab. These behave exactly as per a physical dro and divide the axis dros by 2.

Allan
Re: How do I get to the center of 2 edges?
« Reply #3 on: October 10, 2017, 05:50:08 AM »
The button code needed is simple. Here is what I used for X/2; Y*2 is similar:

--AW. Halve X axis position for centring
local inst = mc.mcGetInstance()
local val = mc.mcAxisGetPos(inst, mc.X_AXIS)
local rc = mc.mcAxisSetPos(inst, mc.X_AXIS,  (val / 2))

You might want to set EnableWithMachine for these buttons.

Allan
« Last Edit: October 10, 2017, 05:52:02 AM by Fledermaus »
Re: How do I get to the center of 2 edges?
« Reply #4 on: October 10, 2017, 06:18:51 AM »
If you want to try my ready made solution, here is an export of my Offsets tab.  After backing up your current screen set, import the revised tab into the screen tree. As i have also modified the 6 offset buttons, which in some circumstances might not have indicated the current offset, you will also need to add the function ShowFixedOffset() to the screen load script.

Allan
Re: How do I get to the center of 2 edges?
« Reply #5 on: October 10, 2017, 10:21:48 AM »
Fledermaus,
That is an elegant solution, and I'm going to use it.  ;)
I too liked the ease of "/2" in mach3 but it is annoying in Mach4 to not be able to have this functionality. 
I did just as Allen, find my edge, zero, find the 2nd edge and then divide it in the calculator and enter the result in the DRO.
Chad Byrd

Offline Stuart

*
  •  241 241
    • View Profile
Re: How do I get to the center of 2 edges?
« Reply #6 on: October 10, 2017, 02:07:14 PM »
Just turn on the dro calculator from the menu bar
Re: How do I get to the center of 2 edges?
« Reply #7 on: October 10, 2017, 02:17:36 PM »
I had no idea that was there, Stuart.  I wish it would link to your keyboard instead of having to use the mouse; that would be nice.
I did implemented Allan's button idea onto a mill here in the shop.
I think I like it better still.  It's in the offset tab and it is a simple mouse click to get the desired input into the DRO.
Chad Byrd
Re: How do I get to the center of 2 edges?
« Reply #8 on: October 10, 2017, 03:50:18 PM »
Didn't know there was a DRO calculator in the menu bar. I'll have a look at that tomorrow, and see if it will do what I want. Otherwise the solution of Allan's looks like it's the go.

Thanks for the help.
Re: How do I get to the center of 2 edges?
« Reply #9 on: October 11, 2017, 08:37:18 PM »
I've had a look at the menu bar and clicked on the DRO calculator, but nothing happens. No popups....nothing. Using Mach4 2.0.3481 Hobby with Warp9 ESS 2.10

Am I missing something obvious once again?