Hello Guest it is May 04, 2024, 08:55:01 PM

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 - Graham Waterworth

351
General Mach Discussion / Re: Mach3 macro homing
« on: June 22, 2021, 09:48:04 PM »
Have you tried using the Standard button call DoButton (27)

or

Code ("G91 G28 C0")
While IsMoving()
  Sleep(25)
Wend


352
What you are seeing is a flaw in the old Mach3 software its only the display driver that shows wrong the machine will cut it correctly, Mach4 shows thing correctly.

353
Mach3 under Vista / Re: mach3 constant velocity problem.
« on: June 05, 2021, 09:43:34 AM »
Not working in what way, what setup have you got, do you have spindle feed back, what code are you using?

354
You could do a G52 Yyyyy where yyyy is the offset, at the end of that tool you would then do a G52 Y0.

E.g.

N1 (Rough Turn)
T0101
G52 Y1.5
G00 G90 Y0
(do the rest of the cuts)
...
G52 Y0
G00 X200. Y0 Z150.
T0100
M1

355
It sounds like noise from the pump motor or the relays switching the motor.

356
Mach4 General Discussion / Re: Connection Lost with CSMIO/IP-S
« on: May 25, 2021, 10:03:06 AM »
I ended up using win7 pro because I could not get a reliable machine on windows 10, I run on an old atom based machine now and no problems.

357
G-Code, CAD, and CAM discussions / Re: fanuc robodrill
« on: May 05, 2021, 06:53:59 PM »
Use the G49 command.

358
Mach4 General Discussion / Re: Again with the tool setter
« on: May 03, 2021, 08:30:01 PM »
Try this version of the code, read the comments first.
Code: [Select]
function M6()
    local inst = mc.mcGetInstance();
    local changeToTool = mc.mcToolGetSelected(inst)
    local changeFromTool = mc.mcToolGetCurrent(inst)
    local XPositionBeforeToolChange = mc.mcAxisGetPos(inst,0)
    local YPositionBeforeToolChange = mc.mcAxisGetPos(inst,1)
    local XToolProbePosition = "1" -- Change to position of probe in X
    local YToolProbePosition = "1" -- Change to position of probe in Y
    local XManualToolChangePosition = "2"
    local YManualToolChangePosition = "2"
    local ColletAtProbeZCoordinate = -105 -- Machine Z-coordinate when collet tip touches TouchPlate (Must be more than ProbeOperationDistance - DefaultToolLength
    local ExtraProbeDistance = 5 -- SafetyMargin
    local ProbeOperationDistance = -50 -- Length of Probemove before giving up
    local ProbePrepSpeed = 100
    local ProbeSpeed = 25
    local DefaultToolLength = 70 -- Used if tool info is not found. (Should be a value slightly longer than the longest tool in the shop :D)
        -- QUICK REFERENCE
        -- G90 - Absolute (Go to coordinate)
        -- G91 - Incremental (Godistance along axis from current position)
        -- G53 - Machine Coordinate Move

    if changeToTool == changeFromTool then
    return
    mc.mcCntlSetLastError(inst, "ToolChange Activated But Not Required")
    else
    mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0\nM5" )
    RunProbe(inst,changeFromTool,XToolProbePosition,YToolProbePosition,DefaultToolLength,ColletAtProbeZCoordinate,ExtraProbeDistance,ProbePrepSpeed,ProbeSpeed,ProbeOperationDistance)
    local ToolZCoordinate = mc.mcAxisGetPos(inst,2)
    mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0 \n G90 G53 G0 X"..XManualToolChangePosition.." Y"..YManualToolChangePosition)
    local changeToToolDescription = mc.mcToolGetDesc(inst,changeToTool)
    wx.wxMessageBox("Please change to tool number "..changeToTool.." "..changeToToolDescription.." and press ok to continue")
    RunProbe(inst,changeToTool,XToolProbePosition,YToolProbePosition,DefaultToolLength,ColletAtProbeZCoordinate,ExtraProbeDistance,ProbePrepSpeed,ProbeSpeed,ProbeOperationDistance)
    mc.mcAxisSetPos(inst, 2 , ToolZCoordinate)
    mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0")
    mc.mcCntlGcodeExecuteWait(inst,"G90 G0 X"..XPositionBeforeToolChange.." Y"..YPositionBeforeToolChange)
    mc.mcToolSetCurrent(inst, changeToTool)
    wx.wxMessageBox("If Toolchange was Sucessful - click ok to continue")
    mc.mcCntlSetLastError(inst, "ToolChange Finished")
    end
end

function RunProbe(finst,ftool,fXToolProbePosition,fYToolProbePosition,fDefaultToolLength,fColletAtProbeZCoordinate,fExtraProbeDistance,fProbePrepSpeed,fProbeSpeed,fProbeOperationDistance)
    mc.mcCntlGcodeExecuteWait(finst, "G90 G53 G0 X"..fXToolProbePosition.." Y"..fYToolProbePosition)
    local toollen = mc.mcToolGetData(finst, mc.MTOOL_MILL_HEIGHT, ftool)
    if toollen == 0 then
        toollen = fDefaultToolLength
        mc.mcCntlSetLastError(finst, "Tool length not found - using Default Length")
    end
    local probestart = fColletAtProbeZCoordinate + fExtraProbeDistance + toollen
    local GCODE = "G91 G31 Z"..probestart.." F"..fProbePrepSpeed
    GCODE = ""..GCODE.." \n G91 G0 Z1 F"..fProbePrepSpeed.." \n G91 G31 Z"..fProbeOperationDistance.." F"..fProbeSpeed
    mc.mcCntlGcodeExecuteWait(finst,GCODE)
end

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

359
Mach4 General Discussion / Re: Again with the tool setter
« on: May 03, 2021, 05:35:04 PM »
Where did you get the code below from?

360
In most cases the Z axis datum is on the centre line of rotation when using a 4th axis.  Then everything is programmed from this so no matter what angle the table is at the datum stays the same.

If you measure the distance from the table to the centre of the A axis in Z direction you can make yourself a steel block and use it to set all your tools on.

If you have a tool setter then you tell it the material thickness is the distance from table to indexer C/L in Z.