Hello Guest it is May 16, 2021, 03:07:53 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 - da40flyer

Pages: 1 2 »
1
jhandel,

Did you get your script to work?  I am having problems with mine. 
With Hobby 3233 and ESS 195, my machine goes through the script, but after it probes, the next command that moves to machine Z0 is not working properly.  I discovered that as  it jogs Z+ off of the probe, as soon as the probe light goes out, the Z+ movement stops and it moves on to the next line of the script.  Can't figure out why....

2
da40flyer, you mind if I take this a few steps further (config screens, trigger on M6 stuff like that?)


Not at all...  I'd love to see what you come up with  :-)

3
jhandel,

I believe we have the same goals....
This is what I did for mine:  http://www.machsupport.com/forum/index.php/topic,34484.0.html

I assigned this script to a screen button.

4
Mach4 General Discussion / Re: Button for Auto Z-Zeroing Tool
« on: March 20, 2017, 02:04:09 PM »
Modified a few other issues.  1st test seemed to work properly...

Code: [Select]
local inst = mc.mcGetInstance();

-- set height of Z axis at start of probe in machine coordinates
local probestart = -2.5

-- move Z to safe location = Z0 in Machine Coords
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 Z0 F60")

-- move to probe location in machine coordinates
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 X1 Y0 F60")

-- Move to probe start position, begin probe move, save Z work coordinate value
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 Z"..probestart)
mc.mcCntlGcodeExecuteWait(inst, "G01 G91 G31 Z-1 F10")
local toolz = mc.mcAxisGetPos(inst,2)

-- Move to tool change location in machine coordinates
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 Z0 F60")
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 X4 F60")
wx.wxMessageBox("Change Tool and Press OK to Continue")

-- Move back to probe location and probe again, set new Work Z coord to previous measurement = toolz
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 X1 Y0 F60")
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 Z"..probestart)
mc.mcCntlGcodeExecuteWait(inst, "G01 G91 G31 Z-1 F10")
mc.mcAxisSetPos(inst,2,toolz)

-- Move to machine coord Z0 and return to Work coord X0 Y0
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G53 Z0 F60")
mc.mcCntlGcodeExecuteWait(inst, "G01 G90 G54 X0 Y0 F60")

wx.wxMessageBox("Tool Change Complete")


5
Mach4 General Discussion / Re: Button for Auto Z-Zeroing Tool
« on: March 20, 2017, 12:45:48 PM »
Found a typo...  should be "mc.mcCntlGcodeExecuteWait"

6
Mach4 General Discussion / Button for Auto Z-Zeroing Tool
« on: March 18, 2017, 08:52:03 PM »
I am relatively new to CNC and certainly a novice at coding...

I have watched Daz's M6 tool change videos several times and believe I have grasped the concepts.  Thank you for posting those  :)

I have a gantry mill with an ER collet and want to automate z-zeroing my tools.  I do not use M6.  I use separate gcodes at each tool change.  This is a hobby, so production efficiency is not needed.

With that, I want to create a Button on my main screen which will run an auto Z-zeroing sequence.  All of my tool lengths are 1.75 - 2 inches and I do not want to use the tool table.
I would rather provide enough space below my longest tool and the height sensor which will cover me.

My basic work process today:
Reference all axis Home, Load gcode into M4, manually set Work Coord X0 Y0, install tool and manually set Work Coord Z0, run gcode, when complete I change the tool for the next procedure, manually re-zero Work Coord Z for new tool, return to Work Coord X0 Y0, load new gcode and run, repeat as necessary...

This is what I came up with for the coding.  It is fairly basic.  If anyone has suggestions, sees any glaring mistakes, or if I missed a step, please let me know.  I appreciate it!

Code: [Select]
local inst = mc.mcGetInstance();

-- set height of Z axis at start of probe in Machine coordinates
local probestart = -2.5

-- move Z to safe location = Z0 in Machine Coords
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 Z0")

-- move to probe location in Machine coordinates
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 X3 Y0")

-- Move to probe start position, begin probe move, save Z Work coordinate value
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 Z"..probestart)
mc.mcCntrlGcodeExecuteWait(inst, "G91 G31 Z-1 F2")
local toolz = mc.mcAxisGetPos(inst,2)

-- Move to tool change location in Machine coordinates
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 Z0")
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 X12")
wx.wxMessageBox("Change Tool and Press OK to Continue")

-- Move back to probe location and probe again, set new Work Z coord to previous measurement = toolz
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 X3 Y0")
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 Z"..probestart)
mc.mcCntrlGcodeExecuteWait(inst, "G91 G31 Z-1 F2")
mc.mcAxisSetPos(inst,2,toolz)

-- Move to Machine Coord Z0 and return to Work Coord X0 Y0
mc.mcCntrlGcodeExecuteWait(inst, "G90 G53 G0 Z0")
mc.mcCntrlGcodeExecuteWait(inst, "G90 G54 G0 X0 Y0")

wx.wxMessageBox("Tool Change Complete")

7
Mach4 General Discussion / Re: Mach4 Training Video Requests.
« on: March 16, 2017, 12:16:22 PM »
I am relatively new to using CNC, a hobbyist with a self built gantry mill with an ER collet setup.
My interest is in setting up a tool height sensor for manual tool changes which will automatically re-zero - Z.

I do not do tool changes within a single g-code file.  I load/run separate g-code files for each tool change (to me, a conservative and comfortable operation). 
Info on how this is setup, and an explanation in layman's terms what is being done behind the scene's to update the Z for the new tool.

Thank you!

8
Mach4 General Discussion / Re: Touch Button - Outside Diameter
« on: March 08, 2017, 09:41:03 AM »
How does the Probing tab function differ from the Touch GUI? 

9
Mach4 General Discussion / Touch Button - Outside Diameter
« on: March 01, 2017, 03:29:55 PM »
Looking at the measurements that can be taken under the "Touch" button, I see one for finding the center of a hole. 
Is there one for finding the center of a solid rod (measuring via the outside diameter)?

10
Mach4 General Discussion / Re: How to show Spindle RPM in MACH4
« on: July 25, 2016, 02:32:33 PM »
Bump - I am interested in this as well.....  I am using a Tekno spindle and Delta VFD

Pages: 1 2 »