Hello Guest it is April 19, 2024, 06:34:45 AM

Author Topic: Mach 3 lathe home input  (Read 3433 times)

0 Members and 1 Guest are viewing this topic.

Mach 3 lathe home input
« on: February 23, 2018, 12:58:41 PM »
Wonder if anyone can help please. I'm developing a touch-off system to detect when a tool touches a tool setter and trigger a home input.  Inherent to the system, when it touches it generates a pulse train, where the first rising edge occurs just after touch has occurred.  My question is, does Mach use just the first edge and then ignore subsequent ones, or do I need to use a retriggerable monostable to generate a persistent logic level?
Re: Mach 3 lathe home input
« Reply #1 on: February 23, 2018, 02:07:52 PM »
Hi,
if you are using a G31 probing command then a persistent logic level is required.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach 3 lathe home input
« Reply #2 on: February 23, 2018, 04:20:16 PM »
Hello Craig - thanks for that.  To be honest I'm not sure what lathe homing does under the hood...AFAIK probing is not supported in M3 Turn.

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Mach 3 lathe home input
« Reply #3 on: February 23, 2018, 04:55:04 PM »
Quote
probing is not supported in M3 Turn

I probe to set all my lathe tools/ populate the tool table. I also using probing to obtain locations manually or automatically, copy a profile, etc  such that the point locations are saved as a dxf file for easy manipulation. Probing does work in Mach3 Turn but you will need to do some custom screen work to implement it.

RICH
Re: Mach 3 lathe home input
« Reply #4 on: February 24, 2018, 06:53:20 AM »
Aha!  Thanks Rich, a useful direction.  So does the G31 command work in Turn?  I thought I'd seen somewhere that it didn't.  Can one invoke it using a Code statement in a macro as I do in my Mill probing macros?  Is there any chance you could post some example code to get me started please?

John.

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Mach 3 lathe home input
« Reply #5 on: February 24, 2018, 12:29:14 PM »
Quote
So does the G31 command work in Turn?

Yes.
G31 is not delineated in the Lathe Manual but it is in  Using Mach3 Mill manual  ( section 10.7.12.1) so use as defined in the mill manual. I use version .062 and probing works just fine.

Quote
I thought I'd seen somewhere that it didn't.

Don't recall anything that said something like that.

Quote
Can one invoke it using a Code statement in a macro

Yes, but I have a custom screen set with vb scripted buttons used to probe.  

Quote
any chance you could post some example code to get me started please?

First step is to define what you want to acomplish with probing, in light of how you want to use the lathe, and the final  results you desire.
Everybody works diffferently .

RICH
Re: Mach 3 lathe home input
« Reply #6 on: February 26, 2018, 04:50:54 AM »
    Thanks Rich, that's got me thinking.  My wish list is...
    • Reference a tool to a tool setter (basically a machined blank concentric with the lathe axis) to populate the tool table
    • Be able to set any calibrated tool to a known diameter without having to reference it every time
[lj]Locate the Z end of a piece of stock held in the chuck before turning it[/lj]
[lj]Occasionally I suppose, probe a profile of a part in the chuck (e.g. a taper)[/lj]
[/list]

I already have an x-axis home switch but that only does part of the job.

PS - God this BB software is awful!  Why can't it do a bulleted list properly?  I've given up trying so excuse the [lj]s in the list above.
« Last Edit: February 26, 2018, 04:55:31 AM by JohnHaine »

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Mach 3 lathe home input
« Reply #7 on: February 26, 2018, 06:09:34 AM »
This is what I did:

- Created a Tool Setup Screen page in Mach3 turn for probing the different types of lathe tools. It does the following using a four sided
  tool setter:
   - Auto probes to find the lathe center and part end and sets machine coordinates to X and Z =0 also removing any  work offsets.
   - Probes the tool setter to find work offset for each tool and auto populates the tool table.
   - Provides for adjustment of tool offset values which is required for user defined tip radius , drill, reamer etc.
   - Provides for defining a tool change position
   - Modifying, adjusting, adding a new or replacing a new tool is easily done.
- Provided the ability to open, save, export, inport, reset, a tool table. There is on screen help for the tool setup screen.

I modified the main screen such that it works for the way I use the lathe. I don't use home switches as I find them rather useless but do use soft limits which are user defined. I must also note that quick change tool holders are used and have a few custom made ones which provide for live tooling, a drill chuck for small drills, and a visual probe for manual probing. The screen provides for easy referencing of the lathe  and setting / changing work offsets.

- I created an additional screen that allows for probing "whatever" such that data can be obtained, gcode created, a dxf drawing is created
  of the probing providing for manipulation of the data for some intended use. A simple  example of use is that one can probe a handle to     copy it, manipulate the dxf drawing, import into LC, and generate the gcode and run the program all quickly. One can use use probing
  for dimensional checking. ie; Used it to check runout of a rifle reloaded cartridge. Don't use that screen often but it is there when  needed.
 
Just make note of something very important:
Probing is only as accurate as your lathe system and how you use it. Tool probing must be repeatable and accurate.

RICH
Re: Mach 3 lathe home input
« Reply #8 on: March 02, 2018, 03:08:09 PM »
Well, have spent the last few days working on my probing method and building an interface to the lathe controller.  All the hardware now working, and using G31 commands via the MDI I can set the tool moving towards a workpiece in the chuck and stopping when it touches.  Next step is to write some button macros to trigger the process from a screen.
Re: Mach 3 lathe home input
« Reply #9 on: March 03, 2018, 07:24:44 AM »
Rich, just looking at the macro, please could you confirm that in Turn, the X and Z values after probing are retrieved by X=GetVar(2000) and Z=GetVar(2002) as they are in Mill?

Thanks, John.