Hello Guest it is September 15, 2019, 05:21:18 AM

Author Topic: Tool Offset Macro...  (Read 24846 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Tool Offset Macro...
« Reply #100 on: August 19, 2016, 08:01:29 AM »
Sorry the code above is old, must have been the days before they actually had an oem code for the dro and I was using a brain to write to a user dro, here is the code I have on the actual machine.

If GetOemLED(800) Then
MsgBox ("Mach In Reset, Enable and start again")
End
End If

Offset = GetOemDRO(100)

SetOemDRO(1555,Question("Enter Offset Number"))

Tool = GetOemDRO(1555)

Code "G90" & "G10" & "L1" & "P" & Tool &"Z" & Offset
DoOemButton(121)

Hood

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Tool Offset Macro...
« Reply #101 on: August 19, 2016, 08:04:06 AM »
Hmm, but the DRO's on screen work fine from the encoder inputs when Mach is out of reset, surely it could just be wired as axis A using the fourth DRO on-screen??

I must have my simplistic glasses on today and probably missed the point by a mile or so.

To make this work, I need an encoder to be connected to a screen DRO no?

:)
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Tool Offset Macro...
« Reply #102 on: August 19, 2016, 08:17:54 AM »
Ha ha actually I must also be doing something else as the DRO I am looking at is just 100, will have a look, maybe have something in the macropump.

Hood

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Tool Offset Macro...
« Reply #103 on: August 19, 2016, 08:20:50 AM »
It might work that way, not sure what the it  reads though, would it be machine coords or offsets, would it matter? not sure ::)

Hood

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Tool Offset Macro...
« Reply #104 on: August 19, 2016, 08:28:25 AM »
I might be a nautical mile off target here, its Friday after all:) but as i see it, to make this work I would need the mechanical axis linked to an encoder. That encoder only needs to be calibrated to show mm in a screen DRO in Mach3??

Then I would place the Haimer in a turned dummy R8 socket, place the head on the Haimer and zero the DRO, replace with a tool and the DRO would now show the offset?

Maybe too simple or am i missing the point here? ;)
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Tool Offset Macro...
« Reply #105 on: August 19, 2016, 08:36:14 AM »
Way I work it is I let the setter go fully down and then press a button on the screen which sends the index pulse to the Enc Module which in turn resets the Enc Modules counting, ie sets zero. So I suppose similar to setting machine coords zero.
Next I place the Haimer in and bring the setter down on it until the haimer reads zero, I then press the screen button and type in 100 (that is the tool I have the Haimer set as) and it writes the offset to the tool table, I then repeat for all tools I want.
The Haimer only needs set up the once, dont have to do it each time I use it.

So when actually wanting to use the tools I put the Haimer in and call G43H100 bring it to the surface and zero work coords. Now any tool I call with its height offset is correct.

Hood

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Tool Offset Macro...
« Reply #106 on: August 19, 2016, 08:40:32 AM »
Ok just looked and I do have code in the macropump. It looks at the Enc modules DRO  and then scales it so that the units are mm then writes it to the DRO I have set up in Mach. You wouldn't have to do this if using an axis as you would calibrate it via Motor Tuning using the steps per unit.

Now as I said I have looking to see if Mach is in the enabled state so there must be a reason for that, will check in a bit and see what it is.

Hood

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Tool Offset Macro...
« Reply #107 on: August 19, 2016, 08:42:41 AM »
Hmm, I don't think I'm that far off the mark really, my major omission is that i don't record the length of the hammer as a tool, i use (or tried) tool zero.

So basically, if i can get the encoder into a Mach DRO, it should all be do-able?

What do you do when say a tool needs replacing etc - whats the sequence then?
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Davek0974

*
  •  2,577 2,577
    • View Profile
    • DD Metal Products Ltd
Re: Tool Offset Macro...
« Reply #108 on: August 19, 2016, 08:44:46 AM »
I think the big issue is - will the CSMIO allow me to have an axis with an encoder but NO motor on it without throwing a hissy fit?

As i said before - probably not when out of reset due to ePid fault BUT I only need it when IN reset :)

Obviously would have to make sure Mach did not include that axis in Ref-All.
Bridgeport Mill, Mach3 V062, CSMIO-IP/A controller, AC Servo Drives

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Tool Offset Macro...
« Reply #109 on: August 19, 2016, 08:50:04 AM »
Ok just looked, you need Mach enabled, reason being is the script uses G Code to write to the tool table.

So your idea of having Mach in Reset wont work.
You could possibly get round the epid problem tough by setting a massive following error for the axis you have the setter on.

Regarding replacing tools, simply zero the setter, place the tool under it, press the screen button and enter the original tools number into the popup screen and that is it. New tool height overwrites the old height.

Hood