Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: JohnHaine 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?
-
Hi,
if you are using a G31 probing command then a persistent logic level is required.
Craig
-
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.
-
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
-
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.
-
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.
I thought I'd seen somewhere that it didn't.
Don't recall anything that said something like that.
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.
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
-
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.
-
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
-
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.
-
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.
-
John,
Yes they are correct and what I use.
RICH
-
Thanks Rich!
-
OK, well I'm making progress but in fits and starts! My probe hardware is operating, I have modified the "tool table" screen of the standard turn screen set to add some buttons to activate the probe and written some probe macros as button scripts. I'm getting some very puzzling results, so I was wondering if I could just check a couple of points with you please Rich?
1. In a few places I have seen references to an M40 macro and that it needs to be activated to open a point file for the vars - on the other hand all the working probe macros I use on my mill don't use it. So am I correct to ignore M40?
2. I'm trying to operate only in machine coordinates for this exercise, but I read somewhere that G31 operates in work coordinates - is this correct? I'm getting some very anomalous behavior which I can only think is because there is some offset coming in that I don't understand.
I'm sure there's more I don't understand but I don't know it yet!
Thanks, John.
-
Suggest you consider the followong:
1. Understand the master tool concept for populating the tool table.
The master tool is used to set a reference point and all the other tools offsets are based
on the master tool. All the tools are related to each other.
2. Understand the difference between Machine, Part, and Program Coordinates.
Machine Coordinates are absolute values and X values are in terms of radii. Tool offsets
in the lathe tool table are in terms of radii.
3. Know how Work Offsets offsets are created. Mach defaults to G54. For a rear toolpost
the offset is G55.
4. Know how to set machine coordinates and work offstes to zero values.
5. Understand how G31 works. Then you decide how you want to use it.
6. Understand tip direction as it relates to tool touch off. Most gcode from CAM are
pre-compensated. In probing of lathe tools you will need a four surface tool setter
and even with that you will still need the ability to adjust the probed offset values for
some types of tools.
7. Consider using a different screen set for the lathe.
Have a look at this one and modify to suite your needs.
http://www.machsupport.com/forum/index.php/topic,13548.msg88932.html#msg88932
I don't use the M40 macro but rather get the variable value created by G31 and directly set the current tools X or Z offset value.
If you are collecting points that is a different story.
G31 works in Machine Cooordinates.
RICH
-
Just an update - I think I've made a step forward, by defining my own DRO to which to write the probed value rather than trying to re-use the OEMDros 175 and 176; and also working in radius mode for the purpose of probing. Essentially what I want to do initially is to be able to make tool offset measurements and manually populate the tool table until I understand how it all works! Thanks for your advice above Rich. Just a few comments...
1. As far as I can tell from the documentation the Master Tool (No. 1) is assumed to have zero X and Z offsets. When the work is mounted in the lathe you touch off end and periphery using the master, possibly turning a short section to get a concentric diameter first. When you enter that diameter as an X coord for Tool 1 (when set to that diameter) then every other tool if put in the holder instead and selected would turn to the same diameter; and equivalently for Z. What I'd like to do is to start by homing the machine as I have a pretty repeatable X home switch (<10 microns as far as I can tell), then use the offsets for all tools including Tool 1 to avoid the touching/turning step.
2. I think I've got the coordinate systems straight and realised that radius mode is key for measuring offsets.
3. I think I'm right in saying that for the lathe, only the Z offset is relevant?
4. Documentation is a bit hazy on this but "Zero World" buttons zero the m/c coords? For the work offsets you select work coordinates and zero the DRO?
5. I'm fairly familiar with G31 as I've been probing on my mill for some time.
6. Once I've made a test bar I will have in effect a 4 surface tool setter. I'm finding the limits to the concentricity of the MT4 to MT2 adaptors for my Myford at the moment, so once the probing routines are working I have to make a test bar with a 4MT short taper on the end.
7. I'll look again at that screen set - once I understand better what I'm doing!
Thanks again for all your help Rich.
Cheers, John.
-
Use MC's to measure but start measuring with MC's =0. So if you probe with a tool and have the probed value / variable put into DRO 108 or109 then that value is the offset from the master tool which will be put into the tool table and no need to populate it manualy. KISS / just a thought!
COMMENTS ON YOUR REPLY #14:
I don't use switches since they add no value for the way I work. Frankly I keep it simple
by having MC zero, home, and tool change location all set to MC's=0,0. KISS!
1. Tool 0 has no offsets and you cannot change them. Tool 1 would be the master and it has no offsets but you can change them. Tool 0 comes in handy if you want to move around and not do something stupid to screw up the tool table or what ever.
3. No, both the X and Z tool offset is relative. I think you are thinking of work offsets and that would be basicly true since the lathe center is X = 0 and the Z value varies depending on where the end of the stock is located along the lathe bed. Usualy lathe gcode is based on X and Z=0 and that is the end of the stock.
4. Zero world will zero the MC and also delete / set work offset to zero value.
5. Hmm....what is your probing feed rate and min travel distance you allow for when probing ?
6. You need (4) surfaces to probe lathe tools easily, else a PITA. Also you will need to provide for easily probing / changing a tools offset. ie; probe tip, drill , reamer. whatever!
A 1" standard for checking a micrometer mounted on a ground shaft is cheap, easy and
very accurate tool setter.
Have fun......,
RICH