Hello Guest it is November 13, 2019, 10:18:42 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.


Topics - B34R

Pages: 1
1
Mach4 General Discussion / Tool Change / Probe
« on: November 04, 2019, 09:12:26 PM »
Hey Folks,

I've  been skulking around here for a while but this is my 1st post....


I was hoping someone might be able to guide me in the right direction with an issue i'm having on my CNC Router build.

any input y'all might have would be very much appreciated, this is the FINAL thing standing in my way to complete this project !!!

NOTE: I made an M6() macro based off of work shared by DazTheGas (THANKS DAZ!) 

Problem statement:

My Z axis will not move down once a probe command is given.
I have a simple macro that moves the router to a known tool change location, then it should begin its probe and it fails...

NOTE: this problem exists before I edited the macro. It was noticed while attempting : "touch" module / M6() / G31 command(s) or functions on the "Probing" tab....


My system:

My setup is a ESS + C25 BOB with dedicated PC running Mach4
Ess PlugIn: v250
Mach4: 4.2.0.4300
configured for INCH measurements
Servo motors with Gecko drives
4'x6' table
the probe is a small corner plate with a clip on the router bit


Analysis:

The macro starts to run as expected:

1) m6() command received = GOOD
2) move to tool change location = GOOD
3) begin probe = FAIL
4) change tool = n/a
5) re-probe = n/a
6) run G-code again = n/a

looking at the ESS data log it seems as if the probe dose start but then it is immediately done ?

"2019-11-04 17:15:30.549 - >>>>> ESS received a Tool Change Done notification."




Full Log from recent attempt:

Code: [Select]
2019-11-04 17:15:18.092 - API: mcCntlMdiExecute(inst = 0, commands = 't4 m6()') (Mach4GUI)
2019-11-04 17:15:18.194 - Attempt transition from "Idle" on event "MDI Start" controller.cpp:2256
2019-11-04 17:15:18.194 - S_IDLE_on_exit
2019-11-04 17:15:18.194 - ACTION_start_mdi
2019-11-04 17:15:18.194 - SoftSync()! Clearing planner.
2019-11-04 17:15:18.215 - S_MDI_RUNNING_on_entry
2019-11-04 17:15:18.215 - SoftSync()! Clearing planner. stateinterface.cpp:1250
2019-11-04 17:15:18.215 - S_MDI_RUNNING2_on_entry
2019-11-04 17:15:18.215 - Signal id 1114, (Gcode Running), changed from LOW to HIGH.
2019-11-04 17:15:18.242 - Signal id 1121, (Tool Change), changed from LOW to HIGH.
2019-11-04 17:15:18.243 - >>>>> ESS received a Tool Change Required notification.

2019-11-04 17:15:22.871 - API: mcCntlGcodeExecuteWait(inst = 0, commands = 'G90 G53 G0 Z0.0') (unknown caller)
2019-11-04 17:15:22.983 - SoftSync()! Clearing planner. gcodeexec.cpp:168
2019-11-04 17:15:23.139 - SoftSync()! Clearing planner. controlset.cpp:208
2019-11-04 17:15:23.139 - API: mcCntlGcodeExecuteWait(inst = 0, commands = 'G90 G53 G0 X01.0 Y01.0') (unknown caller)
2019-11-04 17:15:23.250 - SoftSync()! Clearing planner. gcodeexec.cpp:168
2019-11-04 17:15:23.407 - SoftSync()! Clearing planner. controlset.cpp:208
2019-11-04 17:15:30.549 - >>>>> ESS received a Tool Change Done notification.

2019-11-04 17:15:30.550 - Signal id 1121, (Tool Change), changed from HIGH to LOW.
2019-11-04 17:15:30.550 - >>>>> ESS received a Tool Change Done notification.

2019-11-04 17:15:30.654 - Attempt transition from "MDI Running" on event "Stop" gcodeexec.cpp:1285
2019-11-04 17:15:30.654 - S_MDI_RUNNING2_on_exit
2019-11-04 17:15:30.654 - Signal id 1114, (Gcode Running), changed from HIGH to LOW.
2019-11-04 17:15:30.654 - S_MDI_RUNNING_on_exit
2019-11-04 17:15:30.654 - ACTION_stop
2019-11-04 17:15:30.682 - S_IDLE_on_entry




MACRO CODE:

Code: [Select]


function m6()

local inst = mc.mcGetInstance()
    local selectedTool = mc.mcToolGetSelected(inst)
local currentTool = mc.mcToolGetCurrent(inst)
    local xstart = mc.mcAxisGetPos(inst,0)
    local ystart = mc.mcAxisGetPos(inst,1)
       
        if
            selectedTool == currentTool
           
        then   
            return
            mc.mcCntlSetLastError(inst, "Tool change activated but NOT required")
         
        else   
            wx.wxMessageBox("Tool change required: press ok to move router to the tool change position")
           
            mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z0.0")
            mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X01.0 Y01.0")   
           
            wx.wxMessageBox("Press ok to begin 1st probing")
           
            RunProbe(currenttool)   
            local toolz = mc.mcAzisGetPos(inst,2)
            mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z0.0")
            local changetoo  = mc.mcToolGetDesc(inst,selectedTool)
           
            wx.wxMessageBox("Insert Tool Number "..selectedTool.." "..changetoo.." and press OK to continue")
           
            mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 X01.0 Y01.0")
           
            wx.wxMessageBox("Press ok to begin 2nd probing")
           
            RunProbe(selectedTool)
            mc.mcAxiseSetPos(inst, 2, toolz)
            mc.mcCntlGcodeExecuteWait(inst,"G90 G53 G0 Z0.0")
            mc.mcCntlGcodeExecuteWait(inst,"G90 G0 X"..xstart.." Y"..ystart)
            mc.mcToolSetCurrent(inst,selectedTool)
           
            mc.mcCntlSetLastError(inst, "Tool change finished")
end
end

function RunProbe(tool)
    local inst = mc.mcGetInstance()
    local toollen = mc.mcToolGetData(inst, mc.MTOOL_MILL_HEIGHT, tool)
        if
            toollen == 0
        then
            toollen = 3
        end
    local probestart = -8+ toollen                                       
   
        mc.mcCntlGcodeExecuteWait(inst, "G90 G53 G0 Z"..probestart)
        mc.mcCntlGcodeExecuteWait(inst, "G91 G31 Z-15 F25")
end

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


Pages: 1