Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on March 31, 2018, 06:12:16 AM

Title: Probing - what would i need?
Post by: Davek0974 on March 31, 2018, 06:12:16 AM
Hi all,

I'm currently using a Haimer 3d taster for setting my work coordinates, works well but its manual ;)

What would i be looking to get to setup auto edge detection routines and I guess I would also need to setup auto tool height setting as i currently use an off-machine tool height setter and the two are relative are they not?

I have watched some u-tube stuff but they all have multi-million £ Renishaw kit and thats just fantasy for me :)

Is there a workable budget setup?
Title: Re: Probing - what would i need?
Post by: RICH on April 01, 2018, 07:32:17 AM
For probing I would suggest you create a custom probing page or wizard  that works the way you want it to work based on how you work.
Simplisticaly that screen would allow probing of  all the tools and population / manipulation of the tool table . Additionaly you could have it probe
for location, set and create work offsets etc,.....all kinds of things.

Remember that all tools relate to the  master tool but all tools also relate to each other.
If you have use an off machine setter and manualy  populate the tool table that is similar to probing each tool.
The difference is how the info was acquired. Probe each tool  and compare data to what got when manualy done.
Probing tools for my lathe is very accurate and repeatable ( +- 0.0002").

You don't need any fancy probes. For probing locations I use a home made probe with replacable tips and it is very accurate.
It's how the probe is made that is important and used that is important such the probe has no runout. Remember that data from
probing will only be as accurate as YOUR machines system.

So make a custom screen set or custom page to satisfy whatever you want to do and accomplish.

RICH
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 01, 2018, 08:36:53 AM
Thanks Rich,

Yes a custom screen would be good.

I'm trying to figure out how it all plays - currently I have the off-machine setter that reads the heights of all tools including the Haimer probe and then sends that data to the tool table (one at a time)

Now, if I use a probe in the spindle - this would set Z,X,Y when it contacts the work in whatever direction?

So, how are tool lengths set - do i also need a touch-plate as well??

Not sure what the whole picture is here??
Title: Re: Probing - what would i need?
Post by: TPS on April 01, 2018, 10:28:12 AM
Yes a custom screen would be good.
and necessary

I'm trying to figure out how it all plays - currently I have the off-machine setter that reads the heights of all tools including the Haimer probe and then sends that data to the tool table (one at a time)
the probe will be a tool as well

Now, if I use a probe in the spindle - this would set Z,X,Y when it contacts the work in whatever direction?
exactly

So, how are tool lengths set - do i also need a touch-plate as well??
if you use the probe as a tool of tooltable (lenght), it will be the same like your Haimer probe
for Metall surfaces you do not Need a touchplate, on your CSMIO you have seperate connectors
of + and - for each Input, so connect the + direct to 24V supply + and the - to the isolated
probe, this makes necessary that the - of the 24V Power supply is grounded.
now everytime your probe touches the material the Input will come up.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 01, 2018, 04:16:05 PM
The 2010 screenset has what looks like a pretty comprehensive probing screen - its all macro driven so tweaking it should be simple.

Ok, I'm still in the mud here re the probe - the machine is currently connected to 0v as i use a touch plate on the high-speed setup as that cannot use the tool table. in that setup, the plate is live and the tool grounds it when contact is made - I believe this is pretty much standard touch plate probing?

Now, on the Bridgeport setup, I will have the probe as an insulated device that is connected to my probe input, and touching the workpiece will will ground it = same result and all OK.

However, when i probe a tool length - what will it do - the tool is grounded already so there is no circuit???
Title: Re: Probing - what would i need?
Post by: RICH on April 02, 2018, 06:29:14 AM
What I did was review  many different screen sets and probing suggestions and pick what I thought was the best of the best.
If a purchased screen set satisfies what you want to do then it's worth the couple of bucks to purchase it  since it takes time to do one.
I wanted to do more than just do tool setup and wanted to add practical  functionality from probing data. So more buttons and scripting than the typical probing you find. That said you end up with conditions one needs to address like your last reply.

Suggest you  think about the  big picture of what you want  and what is required for how you work. 

Just some thoughts,

RICH






 
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 02, 2018, 08:53:24 AM
I already have the 2010 screen set and the probing section looks ok but I can add to it as needed I think.

Not 100% what i actually want, but having seen a load of videos, I am not sure why i am still jogging about manually and setting my co-ords when the machine can do it for me with just a tiny input and a button press :)

What I would like is to fit a probe, tell it what corner or hole I want set my ref to, press GO and let it sort it all out for me - XYZ all ref'd.
Also if i wanted to centre on a part I would tell it the rough width of said part, plonk the probe over it and go again - it would probe both edges, and set DRO to mid point.
So on.

Next I need to probe all my tools - I use the tool table 100% so all the tools for the current job need measuring and referencing to my probe - this is where I am fumbling about - I can see the work detection being easy with an insulated probe connected to my existing probe input, what I can't see is how i ref the tools to the probe???

I know its all possible but...
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 02, 2018, 12:14:12 PM
Thinking on....the bits are slowly falling into place possibly.... ;)

I need a fixed touch-plate somewhere on the bed (could be movable I guess but...) This would be connected to my probe input.

I know the height of this plate/block etc. lets say 25.00mmm for fun.

I would need a fixed (insulated) probe permanently mounted in a holder, it would have a ball-end of known diameter.


What I keep getting muddled over is where is the correlation from fixed probe to tool height??

Presently, I zero my height setter, place tool or probe, measure and enter the result in the two table - this works 100%

But what would i zero on the mill? Is G53 Z0 the reference?

If yes then I can see it all playing possibly:-

Place probe in spindle, probe until touch plate reached, read current machine DRO for Z and set that in the tool table after subtracting my 25mm offset.
Place tool in spindle, probe until triggered, store Z machine DRO, subtracting offset again.

Then i can probe the work and the lot should work I think??

BUT....

What happens when I break a tool and need a reset - the knee will have moved and now my Z ref is no longer correct :)

Confusion much :)

Title: Re: Probing - what would i need?
Post by: Davek0974 on April 02, 2018, 01:34:49 PM
I'm guessing that before probing a surface OR setting a tool height, I would have to drive the knee axis to a known, fixed position??

It would all make more sense then, I think ;)

Currently my knee axis (C) DRO is zeroed at the time I press Z zero, I use this in my tool length offset calculations to position the knee each time.
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 01:48:54 AM
Hi Dave,

let's say  you have a isolated probe permanent in a holder.
you meassure the lenght of this probe with your height setter for example as tool 200.

if you want to do a probe of your z-surface you do a normal toolchange to tool 200.
then you do a automatic z-Zero (in G54) with the probe, then all other tool height
are correct to this new z-Zero (workpiece).

Thats no other procedure like you do it with your Haimer probe, or ?

Thomas

btw CSMIO uses M31 for probing, but G31 works as well.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 03, 2018, 02:23:25 AM
Yes but I'm not seeing the correlation between tool setting and probing yet, i'm probably just dense ;)

I have tools mounted - they need measuring in the spindle by the system.
I have a probe mounted - it also needs measuring by the system.

Lets ignore my current height setter - its offline and we are heading to full CNC tool calibration here.

It looks like i need the probe for surfaces PLUS a touch plate for tools?

The machine must be in a known position re Z and C axes before setting tools or no relationship can exist surely?

Don't forget I have what is like a VMC but with the added complexity of being able to move not only the Z axis like a VMC but also the bed/knee unlike a VMC :)
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 02:37:11 AM
ok now i got you.

These are two different Pairs of shoes.

one is to use the touch probe to get the tool lenght measured automaticly.

the other is to get workpiece things (X/Y/Z surfaces , Center of inner diameter's and os on)

but both can be combined, to get the tool lenght every time you change a tool.

on one of my machines i only use the Routine to measure the tool lenght only after i had to
replace the tool (broken or dull), and not every regular tool Change.
 
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 03, 2018, 03:22:30 AM
Yes that is what i need - only need to measure the tools once when loaded into rack or ATC - the tool table does the rest.

Also want to probe surfaces, XYZ etc

:)
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 03:35:13 AM
Also want to probe surfaces, XYZ etc

i have all the routines for CSMIO (M31),
only disadvantage the comments are in German,
but this should be the minor Problem.

Thomas
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 03:37:40 AM
here a screenshot of my probing screen
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 03, 2018, 04:24:04 AM
Sounds good, thanks, would be interesting to read them.

But do i need TWO systems here - a probe for surfaces AND a plate for tools?

And I think I am correct that I will need to drive the knee to a know position each time I do a probe or tool?
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 04:55:30 AM
i am using one of those for the tool lenght
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 03, 2018, 05:18:46 AM
Ah, good so I'm on the right track at least.

Something like this...
http://medw.co.uk/wiki/CNC+Probe (http://medw.co.uk/wiki/CNC+Probe)

And this...
http://www.yrcnc.com/product/cnc-tool-touch-off-probe/ (http://www.yrcnc.com/product/cnc-tool-touch-off-probe/)

I have no idea here but these popped up on a search, are there any better (without going super-pro £££££)  :)
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 07:41:31 AM
i have also no idea about the Quality of These part's.

i buyed mine, figured out the tolerance was below 0,05mm,
and that was good enough for this case.
Title: Re: Probing - what would i need?
Post by: RICH on April 03, 2018, 07:47:30 AM
Dave,
Start somewhere and gradualy add things for probing. You can only fit so much on a screen page so you may
need more than one. The following could be thought of as blocks of a complete probing screen:

Tool setup page - a page to take care of populating the tool table via probing with all that is required to do it.

1. Tool table - be able to manipulate the tool table easily
     - open, save, export, import,reset, back up tool table.
     
2. Probe tools  to populate tool table based on a probe in spindle
    - Probe / set plate for tool touch off
    - Probe direction direction buttons
    - Probe feedrate
   -  probe active
   -  tool number / prev and next for slelection
   - tool offset adjustments for tool table values
   - tool change location

3. Similar to  2 but using the knee, combine with 2,  speperate page..........think about it some

4. Part of screen with jogging control and generic DRO's so no need to jump between pages to accomplish
   whatever task your doing.

Probing routines for different situations. there is no one that satisfies every situation and is done the way you want it to work!
You define what you want and need. There are plenty of examples and there is no right or wrong way
to do it. You are the boss of the machine and not in some enviroment where is needs to be standardied!

Now take it up a notch and add pages or create wizard screen set to take care of  stuff you don't use
every day like the follwoing:

1. The ability to manaully and automaticaly reverse engineer something, so your gathering locations and depending
   on how  the info is gathered you create a drawing of it for use in CAD or CAM.

Sometimes total automation is not the best thing to occur and semi or partialy manual is a much better method.
Different probes, different degrees of accuracy ( quick and ditry has it's place in doing work).
Just depends on how, what, and the end product YOU desire.

I also echo again that:
All tools are related to the master tool but they are related to each other.............
Consider working in Machine Coordinates for any measurement, if you start from a zero location all things are
related to zero!

Must remark that not the sharpest tack in scripting on this end, so , if I can do the above so can you.


Have fun,

RICH
 


   

   
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 03, 2018, 09:02:46 AM
Thanks Rich, Thomas,

I see what you offer and it makes sense, I understand how my setup works as it is now, and it works well re tool & probe lengths.

Currently I set my tools offline, I also measured my Haimer probe in the same way - this gives me an easy to grasp correlation from probe to tool height.

On the machine, when I probe the surface for a setup, I position the quill 40mm down from home so Z-40 - this gives me allowance for clearance planes, retract and tool change etc
I then bring the knee up to position the work just below the tip of the probe, then probe using Z jogging.
Next I press Z DRO Zero - this ALSO stores the machine coordinates for my C (knee) axis in a variable because the relationship between C & Z are now fixed at zero.
When i place a tool, my M6end does its magic and sends the difference between tool and probe to the C axis using the stored C variable as a ref and everyone is happy :)

My brain-cell block is visualising getting this to work with a surface probe (this bit is easy) and also a tool plate.
I'm guessing here that i would just measure my surface probe against the tool plate as i do now??
However this is also complicated by the movable bed(knee) - the knee must be in the same position before any re-probing (breakages, new tool etc) of tooling is done??
 - currently I don't need to worry about that as the zero on my tool-setter does not move, ever.

Once I get that clear in my grey matter, I think screens and macros will be easy (once i figure out how i actually want to work) and just a matter of macro tweaking and testing.
Its just the bit in brown I need to grasp :)
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 12:05:05 PM
Hi Dave,

during the retrofit of my TongIl TNV40 (witch is still not finished), i came also to the
probing  / toollength question.

i am trying to explain, how i want to "handle" this, just to give you (maybe) some ideas.

some basic's of the TongIl
-BT40 spindle toolclamp spring loaded and pneumitc tool release
-16 place umbrella toolchanger

i got to the question 16 places, but i have more than 16 Tools? ???
so i created Screen and script functionality to use the full range of Mach Tooltable,
according to the 16 place TC. means i created a Little database (well it is a Textfile) to
create a relationship between Tools (Mach tooltable) and TC places.
so now i can "book in" a tool to TC place and M6 handles to get the tool from the right
TC place. that gave me the "range" of the full Mach tooltable.

next question BT40 spindle, but i have a lot of SK40 Tools?  ???
they are principly the same, exept the pick and place height of Z-axis, and a different look pin (lenght).
look pin's are avaliable, so no Problem, but the different pick/place , ok added this Information also
to my "extrenal" datebase some Scripting, done.


next question was how to handle the tool lenght?  ???
out of your thread i "grabbed" the idea of the tool lenght setter.
so some material laying around ,some Screen work, some VB Scripting later
the tool setter was finished , toollenght is stored automatcly in the Mach tooltable.

next question surface probing?  ???
i digged out a 3d touch probe (chineese) witch i buyed years ago, did some testing,
tolerance 0.01-0.02mm good enough for what i do.
again some Screen work, some Scripting and it does what i Need.

after all this i recogized, i don't Need a touchplate (or sensor, witch i use on an older machine) to
get the tool lenght.

i write this only to give you some more idea's,
if you want to take some, the coding is no Problem.

Thomas


Title: Re: Probing - what would i need?
Post by: Davek0974 on April 03, 2018, 01:47:54 PM
Nice, and you have a tool changer, i'm jealous ;)

But do you measure tool lengths "on" the machine i.e. tell you want to load tool 10 into the carousel so you fit tool 10, it goes and measures the offset, stores it and then unloads the spindle into the carousel??

I can easily understand the touch probe and have ordered a couple up - one for surface and one for tools. I can use this immediately just by manually setting its height into my T100 location (always the height probe)

What i envision is both this AND having the machine measure tools etc - this is a bit more complex as the knee (and therefore the height probe) zero can move :)

I'm sure i'll be borrowing some of your ideas ;)
Title: Re: Probing - what would i need?
Post by: TPS on April 03, 2018, 02:23:33 PM
But do you measure tool lengths "on" the machine i.e. tell you want to load tool 10 into the carousel so you fit tool 10, it goes and measures the offset, stores it and then unloads the spindle into the carousel??

that's what i am doing on my older machine, but on the Tongil, i measure them offline with
the function, that the length is written direct into tooltable.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 03, 2018, 02:36:56 PM
Ok thanks

I'll break it down i think and only do the surface probing first as suggested earlier by you or Rich, makes sense.

The surface probing macros should keep me busy for a while ;)
Title: Re: Probing - what would i need?
Post by: RICH on April 04, 2018, 05:37:43 AM
Consider or think about this:
The master tool , tool #1, has no tool length or offsets.
Tool 0 has no offfsets and you use this to move about or whatever  and you can't have offsets for it.
All tools relate to the master tool,thus, if the master tool has no length then, all the other tools lengths are
just length values +- from the ref location of zero of the master tool. Machine coordinates can be used
to  measure distances.

Now assumming that tool table is populated, if you were to put any tool other than master in the spindle,
and probe using  the knee to touch off to the tool, the original location used to define the ref of zero
for the master tool is the current tools +- length. So move the knee up down accordingly. Your now
back to the how the tool table was originaly populated.

You can have additional DRO's, buttons, etc  with scripting to do whatever you want to address different
cases.

Again it all depends on how you do work, accuracy is only as accurate as you machines system,
and "all tools ( whatever they actualy are) are related to the master tool and they relate to each other".

Typical repeatable tasks would be:
- Populate the tool table initialy
- Modify the tool table for a new or  replaced  tool, tweak a current tool for machining

Then
- Find where the material is to set a work offset

Sometimes
- measuring, whetever

KISS applies to it all!


FWIW,

RICH



Title: Re: Probing - what would i need?
Post by: Davek0974 on April 04, 2018, 05:57:10 AM
Thanks Rich.

I think KISS only applies here if the pattern falls into place and the lightbulb turns on ;) I'm still struggling to see the pattern and I think my bulb has blown.

I have never "touched off" a tool since going CNC, not sure if that matters or not just FWIW.

If the master tool has no length how do the other tools lengths relate to it?

I am only going towards XYZ surface probing now, I will keep my off-line tool setter going and put CNC setting on the back-burner until i get the ATC made maybe.

So, with that in mind, I can simply "measure" my probe in the setter, enter it's length and I'm good to go as that is the same as using my Haimer manual probe, the only difference is that the macro will set my DRO's and not me.

My Haimer has a length, thats why it's T100 not T0 and that length is obtained exactly the same way as all my tools - I can understand the relationship here easily.

If my Haimer was T0 and had no length, my current C axis (TLO) macro would not function, I'm not saying it couldn't function, just that it would not as written.

Maybe i'm missing a vital point?
Title: Re: Probing - what would i need?
Post by: RICH on April 04, 2018, 08:04:34 PM
Quote
If the master tool has no length how do the other tools lengths relate to it?

The tool table lists "height (H)" not length. If tool 1 has zero height  then all the other tools ( their tool offsets from the master tool ) is based
on the same reference as the zero for the master tool. The tool offset in Z will be + or -,  or can even be the same.
Each has a specific height.

If you use say, tool 1 with no height and it is where ever, then change to say tool 2 ( has a different tool offset in Z) you will see the Z  DRO
change +  -   by the tool offset value!

Don't get confused with fixture or work offsets.

RICH

The controller keeps track of this for you.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 05, 2018, 10:23:42 AM
Getting there now :)

BTW on my setup the Z DRO does not change when tools are changed or called - the File load routine comments out all the G43 H.. lines because they are read direct from my tool table and sent to knee not the Z axis. It works very well in practice and means i keep 100% of my quill travel.

As far as Mach3 and the Z axis are concerned ALL my tools are 100% the same length :)
Title: Re: Probing - what would i need?
Post by: TPS on April 05, 2018, 10:28:42 AM
i think it doesnt matter.

in a "Standard" machine the G43HX handles the tool length differeces internaly.

in your case the M6End handles it with the knee, so at the end not difference.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 05, 2018, 10:49:00 AM
Yep.

I have a probe now, hope to test it this weekend.

I'm also writing some probing macros to play with, no idea what i need until i try it out really, I'm using the CS-Labs M31 code - seems better to keep as much as possible within the motion controller I think.

Title: Re: Probing - what would i need?
Post by: TPS on April 05, 2018, 10:56:37 AM
here is my X/Y probing libary, sorry it's in german

to use it copy the file to c:\mach3\macros\your Profile Name


to do a left lower Corner probe the code in the button would be:

Code: [Select]
Sub Main()
'probe left lower corner
Call TouchLU
End Sub

#Expand <\..\..\macros\your Profile name\ProbeFunktionen>  ##

i love this #Expand functionality, because you edit your button only one time,
and you can do all the changes on code easily in the libary file without changing Screen and so on.

Title: Re: Probing - what would i need?
Post by: TPS on April 05, 2018, 01:41:51 PM
ok had some time, made a english Version (well bad bavarian english).


if you come to teh TouchInner() TouchOuter() and
specially to the TouchTwisted() give me a shout,
i think they Need explantion, because they are complex.

Thomas
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 10, 2018, 04:39:20 PM
Well, things have not progressed well.

I did get a probe routine to run, twice, then a scripter compile error.

The next macro i tried just did nothing, now if i try G31 probing, it thinks the machine is not referenced home and goes into reset.

G31 causes no motion at all - the message line thinks the probe finished without contact.

Not sure how to fix this really, something has broken the probing calls within the CS labs controller plugin i guess.

Seems there are a few horror stories on the 'net re CS labs & Mach3 & probing but nothing definite as usual, I can't downgrade to 028 as they say because IIRC rigid tapping does not work in the version.

Is there a way to fix probing or is the start of the end for me and Mach3???
Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 01:34:52 AM
HI,
have you tryed to run M31 probing macro.

due my probing test's i fiured out, if there something faults during probing (G31/M31 started),
you have to restart Mach and the CSLab Controller to get it working again.

all my posted functions for probing, witch use all M31, are running without any Problem here.

About tapping, i also got the M84 running on my machine (V022), or do you mean other
tapping routines. if yes just let me know, and i will test on my machine.

Thomas
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 02:02:19 AM
hi

Yes, but no - I used the exact M31 code but put it inline with my own macro so i didn't need to risk calling a macro from within a macro:)

It worked a couple of times, then i tried another macro which had the compile error despite being ok, it then just started ignoring the motion and as soon as you issued a M31 it just said move finished with probe being hit and then faulted out on the retract G91 move after.

Now it won't run at all even after a full reboot a day later.

I did ask CS labs but their support is terrible.
Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 03:08:52 AM
Yes, but no - I used the exact M31 code but put it inline with my own macro so i didn't need to risk calling a macro from within a macro:)

that was the reason, why i included the original M31code into my functionlibary as a function (function Probe, in the file i posted).

if you post your code, then i will run it during the afternoon on my machine.
  
I did ask CS labs but their support is terrible.

i have allways written to a CSLab guy called Wojtek, and got allways a answer within 48h,
ok that's not even fast.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 03:16:55 AM
HI

Code below, simple Y+ edge detect.

Yes its usually Wojtek that eventually replies but the delay is terrible - this kit is not cheap stuff after all, probably the most expensive DIY controllers out there. I have been looking at their new SimCNC software but with this level of support it could take years to get a solution running :)

I cant install v022 that CSL recommend as theres an internal Mach bug that breaks my 2010 screen set, plus a few other issues i think.

Dave

Code: [Select]
Sub Main()
'***Y+ Probing Macro
'***Written by and for DD Metal Products Ltd 2018
'***Metric units only in use
'***Using CSLABS Controller M31 macro code
'***Axis scaling not expected or handled
'***Probe offset must be calibrated at "Slow Feedrate" value and set in "Probe Tip Dia" DRO first
'***Probe Z axis position is set by user first to correct height
'***Probe Y position must be within the value set in "Max Distance" DRO

Dim FeedFast, FeedSlow
Dim ProbeOffset
Dim MaxDistance
Dim X_SENSE
Dim Y_SENSE
Dim Z_SENSE
Dim CurrentAbsInc

'***Load Variables From Screen DRO's
FeedFast = GetUserDRO(1821)
FeedSlow = GetUserDRO(1822)
MaxDistance = GetUserDRO(1823)
ProbeOffset = GetUserDRO(1829)

'***Error checks
If GetOemLed(16)<>0 Then '***Check for machine coordinates setting
  Message "Please Change To Working Coordinates"
  Exit Sub
End If

If GetOemLed(825)<>0 Then '***Probe is not connected or cable broken
  Message "Probe Connection Error"
  Exit Sub
End If

'***Get the current G90/G91 state
CurrentAbsInc = GetOemLED(48)   

'***Start Probing
Message "Probing In Y+ Direction"
Sleep (1000)

Code "F" & Feedfast

SetUserDRO(1511, 0) '***X Axis
SetUserDRO(1512, MaxDistance) '***Y Axis
SetUserDRO(1513, 0) '***Z Axis

Call ProbeSurface()

X_SENSE = GetVar(2000)
Y_SENSE = GetVar(2001)
Z_SENSE = GetVar(2002)

Code "G91 G0 Y-3" '***Step back
While IsMoving()
  Sleep(50)
Wend

Code "F" & FeedSlow

SetUserDRO(1511, 0) '***X Axis
SetUserDRO(1512, 5) '***Y Axis - Must be within 5mm of travel
SetUserDRO(1513, 0) '***Z Axis

Call ProbeSurface()

X_SENSE = GetVar(2000)
Y_SENSE = GetVar(2001)
Z_SENSE = GetVar(2002)

'***Step back to release the probe
Code "G91 G0 Y-5"
While IsMoving()
  Sleep(50)
Wend

'***Raise the spindle to clear part
Code "G91 G0 Z10"
While IsMoving()
  Sleep(50)
Wend

'***Move Y axis to edge and zero the DRO
Code "G90 G0 Y" & Y_SENSE + ProbeOffset
While IsMoving()
  Sleep(50)
Wend
SetOemDRO(801,0)

'***Retract the spindle fully
Code "G53 G0 Z0"
While IsMoving()
  Sleep(50)
Wend

'***If G91 was in effect before then return to it
If CurrentAbsInc = 0 Then
  Code "G91"
Else
  Code "G90"
End If

Message "Y+ Probing Complete"

End Sub




Sub ProbeSurface()

Sleep(250)’***Needed or UserDRO's fail to update

NotifyPlugins(10103)

SetUserDRO(1510, 0)
While(GetUserDRO(1510) = 0)
  Sleep(50)
  NotifyPlugins(10104)
Wend

If(GetUserDRO(1510) = 2) Then '***Probing error - no detection in distance = abort
  Message "Probing Error - No Surface Found"
  End
End If

End Sub       
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 07:54:01 AM
It is connected with soft limits - turn them OFF and you can do a simple, single axis G31 routine.

Try and do a two-axis and on the second axis G31 you get a “probe ignored” error and it fails.

Absolutely broken I think, not only is it linked to soft limits for an unknown reason, it crashes if you try more than one axis.

So, clearly its not going to play, I have been reading a lot today and theres historic ‘net content stating G31 and M31 are broken on all but a few setups - needs version 022 of Mach which i cant use as my screen set fails on it - too old, there is a lot of non-probing people out there :(

A few have ditched CSLABS kit and gone UC300eth etc

A few have ditched due to poor/rude customer support

I just don’t know now, what to do, I have a probe i cant use, an unreliable setup and so on - any suggestions??
Title: Re: Probing - what would i need?
Post by: RICH on April 11, 2018, 08:44:11 AM
Hmmm...............
KISS and basic custom probing screen page or set?
I use a separate xml and screen set for one of my probing needs since it requires the axes to jog different than conventional
and a few other reasons.
I don't know the in and outs of your system and level of automation  you desire for setup of a job, but, maybe you can un-automate it some.

I can be frustrating at times, but, in the end you will be stronger for it all.........so they say.


FWIW,
RICH
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 09:20:02 AM
Thanks Rich,

I'm not too automated but I know what i want (what i really really want) and its just not giving it to me :(

I am fairly customised though.

I use the 2010 screen set and have added buttons and DRO's to that to suit my wants, I have an off-machine tool setter with on-screen DRO and a button that loads the reading into the tool table - pretty essential for me.

I have the file load routine comment out all G43 H.. lines as my M6 macros pass the tool length to the knee (C) axis at tool change, read from the tool table, essential.

The probing, I wanted to use the screen wizard for 2010 which is nice and all macro controlled. I want edge probe, surface probe, pocket probe, outside faces probe & centre etc.

Just getting a bit vexed now as i seem to have reached the limits for Mach3 - it keeps fighting back now which to me is a sign that it does not want to play any further.


Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 10:36:28 AM
ok tryed to run your posted code.
gave me scripter Compiler error:


Sleep(250) ’***Needed or UserDRO's fail to update

changed it to:


Sleep(250) '***Needed or UserDRO's fail to update

then it run fine on V022 and V066

Thomas


Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 11:22:58 AM
and yes probing drives cracy if softlimits are enabled,
so i midified your probing function a Little bit:

Code: [Select]
Sub ProbeSurface()

'*** turn soflimit's off if they are on
Dim SoftLimitswhereon As Boolean
If GetOEMLed(23) Then
DoOEMButton(119)
SoftLimitswhereon = True
End If

Sleep(250) '***Needed or UserDRO's fail to update

NotifyPlugins(10103)

SetUserDRO(1510, 0)
While(GetUserDRO(1510) = 0)
  Sleep(50)
  NotifyPlugins(10104)
Wend

If(GetUserDRO(1510) = 2) Then '***Probing error - no detection in distance = abort
  Message "Probing Error - No Surface Found"
End If

'*** turn soflimit's back on if they where on
Sleep(500)
If ((Not GetOEMLed(23)) And (SoftLimitswhereon = True)) Then
DoOEMButton(119)
End If

End Sub

ok now i will allso modify my probing libary ;)

Thomas
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 11:25:27 AM
ok tryed to run your posted code.
gave me scripter Compiler error:


Sleep(250) ’***Needed or UserDRO's fail to update

changed it to:


Sleep(250) '***Needed or UserDRO's fail to update

then it run fine on V022 and V066

Thomas




Hi

what was changed here??

:)
Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 11:31:36 AM
from  ’   to   '  , sorry don't the english word for it.

copy the original code:

Sleep(250)’***Needed or UserDRO's fail to update


into notepad++, enable language VB script, and you will see the the comment is not recognized as comment.

line get's green starting from here: 's fail to update

Thomas

 
Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 11:40:55 AM
ok made two screenshots of HexEdit , hope it makes it clearer
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 11:46:19 AM
Interesting, thanks

I'm not sure which keyboard is doing that, maybe the laptop.

Off out to retry the code.......
Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 11:54:37 AM
allow me a question in own interest.

is it possible that you edited this code with a MAC?
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 12:16:40 PM
Well, sort of yes but no :)

I am using a MAC laptop running parallels and the Win7 is a virtual machine so yes its a mac keyboard but in windows mode :)

Anyway, just tried the code and it gets further but still freaked out, I added a G90 before the probe surface sub and that helped a lot.

Now it seems to have direction issues  - it will probe like this -  fast Y+, slow Y+, then instead of reversing it will jump Y+ instead of switching to Y-

Baffling

I tried increasing all the Sleep() to 200 from 50, no change

it works on your setup? Even more baffling.

I was unsure if it needed 0-variable to get a negative instead of just -variable maybe that is an issue, maybe it just sucks 100% :)

Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 12:45:12 PM
Hi Dave,

i tested again this code on a V066 Setup in VB Scripter Window

Code: [Select]
Sub Main()
'***Y+ Probing Macro
'***Written by and for DD Metal Products Ltd 2018
'***Metric units only in use
'***Using CSLABS Controller M31 macro code
'***Axis scaling not expected or handled
'***Probe offset must be calibrated at "Slow Feedrate" value and set in "Probe Tip Dia" DRO first
'***Probe Z axis position is set by user first to correct height
'***Probe Y position must be within the value set in "Max Distance" DRO

Dim FeedFast, FeedSlow
Dim ProbeOffset
Dim MaxDistance
Dim X_SENSE As Double
Dim Y_SENSE As Double
Dim Z_SENSE As Double
Dim CurrentAbsInc

'***Load Variables From Screen DRO's
FeedFast = GetUserDRO(1821)
FeedSlow = GetUserDRO(1822)
MaxDistance = GetUserDRO(1823)
ProbeOffset = GetUserDRO(1829)

'TPS i do not have the DRO
FeedFast = 50
FeedSlow = 5
MaxDistance = 30
ProbeOffset = 5




'***Error checks
If GetOemLed(16)<>0 Then '***Check for machine coordinates setting
  Message "Please Change To Working Coordinates"
  Exit Sub
End If

If GetOemLed(825)<>0 Then '***Probe is not connected or cable broken
  Message "Probe Connection Error"
  Exit Sub
End If

'***Get the current G90/G91 state
CurrentAbsInc = GetOemLED(48)  


'***Start Probing
Message "Probing In Y+ Direction"
Sleep (1000)

Code "F" & Feedfast

SetUserDRO(1511, 0) '***X Axis
SetUserDRO(1512, MaxDistance) '***Y Axis
SetUserDRO(1513, 0) '***Z Axis

Call ProbeSurface()

X_SENSE = GetVar(2000)
Y_SENSE = GetVar(2001)
Z_SENSE = GetVar(2002)

Code "G91 G0 Y-3" '***Step back
While IsMoving()
  Sleep(50)
Wend

Code "F" & FeedSlow

SetUserDRO(1511, 0) '***X Axis
SetUserDRO(1512, 5) '***Y Axis - Must be within 5mm of travel
SetUserDRO(1513, 0) '***Z Axis

Call ProbeSurface()

X_SENSE = GetVar(2000)
Y_SENSE = GetVar(2001)
Z_SENSE = GetVar(2002)

'***Step back to release the probe
Code "G91 G0 Y-5"
While IsMoving()
  Sleep(50)
Wend

'***Raise the spindle to clear part
Code "G91 G0 Z10"
While IsMoving()
  Sleep(50)
Wend

'***Move Y axis to edge and zero the DRO
Code "G90 G0 Y" & Y_SENSE + ProbeOffset
While IsMoving()
  Sleep(50)
Wend
SetOemDRO(801,0)

'***Retract the spindle fully
'Code "G53 G0 Z0"
'While IsMoving()
'  Sleep(50)
'Wend

'***If G91 was in effect before then return to it
If CurrentAbsInc = 0 Then
  Code "G91"
Else
  Code "G90"
End If

Message "Y+ Probing Complete"

End Sub




Sub ProbeSurface()

'*** turn soflimit's off if they are on
Dim SoftLimitswhereon As Boolean
If GetOEMLed(23) Then
DoOEMButton(119)
SoftLimitswhereon = True
End If

Sleep(250)'***Needed or UserDRO's fail to update

NotifyPlugins(10103)

SetUserDRO(1510, 0)
While(GetUserDRO(1510) = 0)
  Sleep(50)
  NotifyPlugins(10104)
Wend

If(GetUserDRO(1510) = 2) Then '***Probing error - no detection in distance = abort
  Message "Probing Error - No Surface Found"
End If

'*** turn soflimit's back on if they where on
Sleep(500)
If ((Not GetOEMLed(23)) And (SoftLimitswhereon = True)) Then
DoOEMButton(119)
End If

End Sub



10 times in row, softlimits off, no Problem.

Thomas
Title: Re: Probing - what would i need?
Post by: TPS on April 11, 2018, 01:08:24 PM
just in case, that was the modes witch where active during the test
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 02:01:29 PM
OK, great, will have a go tomorrow hopefully
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 11, 2018, 03:12:31 PM
Some progress...

I have tried padding out the code with waits, just in case. Couldn't wait so i popped out and fired her up, no change :)

The macro i am testing is a more complex probe tip calibration ring thing so more chance to spot a pattern in the mess-ups. After staring at the code and the sequence of what happens I noticed this....


It would do the fast probe perfect, then step back, then do the slow probe and from then on it was pants - total mess :(

Now, when writing it I foolhardily presumed that as I was switching from +travel to -travel it would NOT need a step-back move - WRONG - it seems you MUST step back before issuing another PROBE call - my guess is that as the previous call ends, the probe is left touching the surface and as soon as the new call goes in, it activates the probe first, sees the existing contact and thinks “job done” without moving, from then on it just gets worse.

I added a step back after EVERY probe call and it works!

So, I thought I was on the home run, went to close Mach3 - I always press reset first before closing, so pressed it and Mach3 just bombed out back to windows. :(

two steps forwards, one back

at least part of it is positive i guess
Title: Re: Probing - what would i need?
Post by: TPS on April 12, 2018, 02:09:07 AM
to make sure that the probe Input is off before calling a new probe, is fundamental Basic i think.

during all my testing for the probe routines i also recognized, that
if you interrrupt a probe call during execution it is allways the best
way to shut down Mach and CSlab and restart. i had some realy
strange things going on without doing this.

i know it is a bug, but if you know how to handle it, it is ok for me,
because when all the routines are tested out, it will happen only
very lest times.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 12, 2018, 02:06:24 PM
Some good news at last - with the macro tweaked for correct step-back after a probe, and soft limits off, it ran perfectly tonight !

I have as a sacrificial probe a bit of TIG wire in collet, its about 2mm dia, and i'm using a live “ring” to do a calibration routine - this was the macro that worked tonight and the screen result it came up with was a probe offset of 0.9698mm - i think that is pretty amazing for a 3” long stick of TIG wire :)

I will do more tests before committing my real probe but this is very promising, and using the M31 coding.

I did get a reply from CSL re the soft limits thing and he admitted to never hearing of it before so i think that one is going nowhere fast :( It does seem very odd that there is any connection between probing and soft limits but.....
Title: Re: Probing - what would i need?
Post by: TPS on April 12, 2018, 02:19:22 PM
i will also Trigger CS about the soft Limit Thing, maybe ...
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 12, 2018, 03:15:13 PM
Just a quickie...

Currently using a N/o probe - just the usual touch plate and grounded tool, if i change to a N/c probe (internal switch) is it as simple as just flipping on the "active low" setting in ports & pins???
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 14, 2018, 11:44:34 AM
Getting there now, got most of my probe macros written and tested.

Short video of outside cylinder centre probing...

https://youtu.be/Yo7H4vkqEGI (https://youtu.be/Yo7H4vkqEGI)


And yes, changing from N/o to N/c probe style was just a matter of flipping the active low setting. N/c is far better as you can check for missing or broken probes/wires etc
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 15, 2018, 06:57:43 AM
Ok, step back time....

Been very unstable this morning -

Scripter compile errors just trying to unload a wizard, seem to have fixed that by editing the button script and adding a return or two after the call.

Mach bombing out when loading a wizard - cant seem to fix this at all, totally random, very annoying as it means a re-boot each time.

Losing the faith once more :(


If its the wizard doing it, how would i combine the wizard screen into the main screen as a page?

Its taken a couple of weeks and many hours lost to get this far I'm not giving up yet.
Title: Re: Probing - what would i need?
Post by: olf20 on April 15, 2018, 08:18:03 AM
I know your frustration just not on your scale.
I'm working on a x y probe homing script and it
works fine when I step thru it in the editor
but fails randomly when run from the
screen button.
Keep at you will get there if Mach3 is
capable.
I enjoy your projects!
olf20 / Bob
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 15, 2018, 08:25:10 AM
Have you padded it with Sleep(100) everywhere - it helps.

I am just about at the edge of a tin of petrol and torching the project now - its been fighting me all the way and i have just about had enough - its like trying to force oil and water to mix.

I enjoy a struggle but only if there is light at the end of the tunnel - this probing saga has killed that light, I just want a machine that does what i want, I have binned my ATC thoughts - I can do without that sort of grief I think, if it cant handle simple probing then an ATC has no chance.

I know its all plugin/Mach related but I just get two steps forward and four backwards.

Title: Re: Probing - what would i need?
Post by: RICH on April 15, 2018, 07:08:36 PM
If its the wizard doing it,
Quote
how would i combine the wizard screen into the main screen as a page?

If using Machscreen, just select everything of the wizard page and copy/paste  the wizard screen page into an empty page of the other screen.


RICH
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 16, 2018, 02:12:39 AM
Thanks Rich, I'm going to look at that tonight, its not quite that easy as the main set uses layer 0 a lot so all the pages have some space lost. I will likely have to pick and paste only the critical parts.

But it does seem to be wizard related. A friend has also asked me to check the PC RAM is still all there and has enough.
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 16, 2018, 12:26:49 PM
still working on this ;)

I dont suppose some kind soul would let me know exactly which buttons/controls MUST be on a screen to make it function?

I am building a test page but cant even get jog or MDI to give motion - i have it homing ok though


Thanks
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 16, 2018, 01:24:39 PM
Ok, got it ;)

Jog on/off button :)


But...

Any reason G53 fails?
If i load a file or MDI it I get "cannot use G53 incremental. Block...."
Title: Re: Probing - what would i need?
Post by: TPS on April 16, 2018, 02:03:25 PM
you can not use a G53 in G91 (incremental)

G53 is allways a absolute (G90) move
Title: Re: Probing - what would i need?
Post by: Davek0974 on April 16, 2018, 02:09:09 PM
That would likely explain it then thanks :)

IIRC it was stuck in G91 when i tried it
Title: Re: Probing - what would i need?
Post by: TPS on April 16, 2018, 02:15:04 PM
here something about G53 i found in the forum