Hello Guest it is April 28, 2024, 10:15:32 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - barneskite28

Pages: « 1 2 3 4 5 6 7 8 »
61
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 14, 2021, 10:29:44 AM »
The tool offsets are loaded into the dialog when the dialog is opened.  The dialog is not updated on the fly.  That tool offset dialog is meant for modifying the offsets within the dialog, not outside of the dialog.  Also, the offsets are not written (even if modified in the dialog) until you close the dialog with the X in the upper right hand corner or by pressing the "Quit" button.   I would not consider this a bug because it is just not how it works.  If you want something that is updated constantly, make a screen that displays the tool offsets from the G code variables.  So close the tool offset dialog and reopen it after the tool change/probe and see if the value is updates.  If the value does not update, then you need to further develop your M6 script. 

Steve
Thanks Steve, my problem is that i only have the tool table open to verify, and i can see the values updating as the tools are measured.  But regardless the tools are not auto adjusting for the work piece zero on the top surface.. and this is my problem.  I have updated the gcode with a g90 instead of g91 - and while the values in the tool table are very different with g90 it still does not take into account the correct zero from the workpeice.  I have tried to zero the workpeice from the main screen, (by pressing zero axis) also from the offsets screen, using a slip guage, with g43 on, also with g43 off. I still can't get this working right... my toolsetter is working ok, as it is repeating the same measurements time after time in the table.  Maybe im doing something wrong, but it just doesn't seem to work.. I'm not sure what is wrong but i need help with this! I am upgrading from a one tool wonder machine, so the tool table and offsets are a new dimension that i have never used in mach4.  The video on the auto setter from mach4 basics seemed ok, and thats what i have based the macro code on, but on reflection the video also does not show the tools being at the same zero height after measuring...

62
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 12, 2021, 02:53:13 PM »
Any idea?

63
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 11, 2021, 01:38:23 PM »
Here is the updated code running, i still cant get to re-zero. Mach4 seems really buggy for todays day and age!
https://www.youtube.com/watch?v=sswY4xx-OOU

64
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 11, 2021, 11:50:26 AM »
you cannot zero the DRO for the axis while you have the machine co-ordinates selected these can only be set by the homing routine not the operator

uncheck machine co-ordinates and you can zero the DRO

stuart
Yes, as you can see in the video i did that :)

65
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 11, 2021, 05:06:44 AM »
This was a video made yesterday to show some of the issues...
https://www.youtube.com/watch?v=l6MMqYhT8xc

66
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 10, 2021, 05:29:48 PM »
By the way you can NOT use G91 in G53 mode
AHH maybe that could be the issue... I will test tomorrow.
I didn't even notice that was there.... It could be why my tool heights are moving

67
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 10, 2021, 02:52:52 PM »
Update..
using this script there are some bugs with the tool table... i will try and make a video and post it on here.
I just ran through the following in mdi

m6 t1
m6 t2
m6 t3
m6 t4

The machine cycled endlessly through the tool changes, measured the same tool repeatably, but if i stop the cycle, the tool table would mess up.
say for example i press cycle stop after probing t1, then t2 updates in the tool table to t1 length.  One time it changed all 4 of the tool lengths!

So i tried mdi
m6 t1 g43 h1
m6 t2 g43 h2 etc.... got wildly different results..

I'm confused now!
Any help appreciated

68
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 10, 2021, 12:39:52 PM »
Are you trying to run a one tool wonder machine?
If so you likely don't need to use the TLO's :)
If you're running a M6 with multiple tools then shoot me your script and I'll take a look.
You need to make sure the TLO (G43) is called before the zeroing of your Z axis to the material.
This way if multiple tools are called we are then just compensating for the difference between the tools rather than the entire tool length after zeroing.
You can see this happen if you have no TLO called and then zero your Z to the material, when your first G43 is called you'll be in a world of trouble.
I don't typically have the TLO called inside the M6 as it's normally called by the post in GCODE.
There are a lot of different ways to tackle this issue it's really what works best for you.
I really like to put a button on screen called "Job Setup" or something similar then call the TLO's and everything else I like prior to cutting with the click of a button.

So to recap, many years ago i was a cnc machinist, life change of career etc i didn't touch a machine for 17 years or so. 
I got a Chinese 6040 about 4 years ago and had some success as a one tool wonder machine on mach3 then after a rebuild mach4.  Just manual tool changes if anything.

I have now built a bigger stronger machine from scratch, and got an ATC spindle and a fixed tool setter. I haven't set up the carousel yet, i don't  think i dare before i get the tool setter measuring correctly.
At the moment i use the code below, but the z0 is not setting up properly.
It may be my method, something i'm missing etc... not sure. In my mind the tool setter should update the tool length of each tool in machine coordinates, and it will have its comparison. Then set wpc z0 with any tool and the rest should compensate accordingly even tool 1.  Am i doing it all messed up? i even manually set tool 0 and touched off the spindle face but still not working right.
Here is the code..
function m6()
   
local inst = mc.mcGetInstance()

----------------------------------------------------------------------------------
--change lines here to either auto rapid, or manually jog to a tool change position
----------------------------------------------------------------------------------
--Manual Lines. Uncomment line below to allow you to manually jog to a tool change position.
--local MyChoice = wx.wxMessageBox("Click OK, \nThen Jog to A Safe Tool Change Position,\nInsert New tool,\nThen Click Cycle Start.","Click OK to continue" , 16)
---------------------------------------------------------------------------------
--Auto Lines.  Uncomment both lines below (and comment out local MyChoice line above) to automatically move to tool change position.
--Edit to include the machine coordinate values of that tool change position.

--AUTO LINES
mc.mcCntlGcodeExecuteWait(inst, "G53 G0 Z-5\nG53 G0 X200.0 Y20.0")--Move the Z to Home.Then to the X, Y Coords for our touch pad.
mc.mcCntlSetLastError(inst, 'Now in Tool Change Position. Hit Cycle Start!')
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
local posmode = mc.mcCntlGetPoundVar(inst, mc.SV_MOD_GROUP_3) --get the current mode so we can return to it when macro ends
local selectedtool = mc.mcToolGetSelected(inst)
local currenttool = mc.mcToolGetCurrent(inst)
   
 if selectedtool == currenttool then
        mc.mcCntlSetLastError(inst, "Current tool == Selected tool so there is nothing to do")
 else
        mc.mcCntlToolChangeManual(inst, true);
  mc.mcCntlSetLastError(inst, "Current tool == " .. tostring(selectedtool) .. "   Previous Tool == " .. tostring(currenttool))
  mc.mcToolSetCurrent(inst, selectedtool)

--local MyChoice = wx.wxMessageBox("Click Ok to Begin Probing the New Tool","Click OK to continue" , 16)
    mc.mcCntlGcodeExecuteWait(inst, "G53 G0 X24.0 Y436.0")--
        mc.mcCntlSetLastError(inst, "Probing in Progress!")
        mc.mcCntlGcodeExecuteWait(inst, " G91 G31 Z-95. F150.")--probe the new tool
local probedz = mc.mcCntlGetPoundVar(inst, mc.SV_PROBE_POS_Z) -- Z Probe position in Machine coords
        mc.mcCntlGcodeExecute(inst, string.format('G ' .. posmode))--return to pre macro mode G90, or G91
  mc.mcCntlGcodeExecuteWait(inst, "G00 G53 Z0 ")--Retract
 
local NewOffset = probedz
  mc.mcToolSetData(inst, mc.MTOOL_MILL_HEIGHT, selectedtool, NewOffset)
  mc.mcCntlSetLastError(inst, string.format("Auto tool setting complete, Offset = %.4f", NewOffset))
wx.wxMessageBox("Toolchange Complete.\nTLO Set")
        end

end

if (mc.mcInEditor() == 1) then
 m6()
end

69
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 06, 2021, 08:21:38 AM »
G43 is normally called before the first Z move

E.g. G00 G90 G43 Z10. H1
In the m6 script or in the program for the job? Sorry for all the questions!

70
Mach4 General Discussion / Re: Tool setter, M6, tool length offsets
« on: April 06, 2021, 07:01:33 AM »
You might need to do a G43 to turn on Tool Length Offset
Maybe right!  Would i call g43 before the tool change or after?  I have been using mach4 for a while now but just finished my new machine which is ATC capable - just need to get this worked out before i add the ATC script.

Pages: « 1 2 3 4 5 6 7 8 »