semi auto tool change probe screen and available macros

Post anything you want to discuss with others about the software.

semi auto tool change probe screen and available macros

Postby theshade » Mon Jun 28, 2021 12:51 pm

Dear All,

I just built my CNC which now works(moves fine) in all axis... does consistant zeroes and all what you can expect.
I received the UCCNC electronics last week and it works fine...

my problem.
I just spent 4 evenings now reading the doc, reading everything in the forum, watching videos all on the subject of "probing", "tool offset" and "tool changes"
comparing M6 macros from 1-2 years old,
G31,
and the pretty bad documentation on the probing plugin are now pretty familiar. (not sure I understand it though)

To be specific I have a AMB spindle installed with the "semi automatic tool change" let's say an improved manual tool changer.

https://www.amb-elektrik.de/produkte/fr ... -systemen/

and will probably do mostly wood working 95% with multiple tool changes.

my tool probe (one of these) seems to work fine.
probe.png



I followed and managed to replicate the video youtube from Daniel Collins (more or less)
1. go to corner of workpiece use as reference I also set one of the G55-G58 origins to it
2. use the probe screen.
3. I haven't done any machining yet because I don't think I understand what I am or the software is doing.

One thing that I do not undertstand is that none of the macros I see ever do put any of the tool offset in the table using G10
G10 L1 ....

I was expecting that if I use multiple tools T1-T8. the probing screen or some T3 M6 macro with some manual tool change would actuly store my latest probing in the table so I could see if the tools would have some fixed offset from one insertion to the next one or such thing.

But searching for G10 L1 in the forum seems to yield no macros and I am honestly not sure about what the probing screen does but it doesn't seem to store data in the tool table.

I am not very sure about the process I need because I suppose (and understand now that everyone has his "own" flavour of what is the best solution for tool changes and such but.

I would like to start simple with something like:

1. go to the material and reference the first tool T1.
2. probe T1 and have it stored as zero...
3. run a G-code example with some machining and multiple tool changes (maybe T1-T4 M6)
for each tool change
probe and store the different offsets in the tool table
before machining so I can check that after the tool change the tool offset really compensates the difference in tool lenght.

I suppose the probing tool does something like that... but since it doesn't explain how, and I don't see where the data is stored and I don't really understand it for now.

Sorry for this very newbish post

p.s. the ABM specifies that the tools could be mounted in the clamps and be more or less repeatable but I am not sure of that yet because when not in the spindle
it is very easy to have the tool moving in the clamp and I am not sure there is a proper referencing when closing the handle so I need to validate that with 2 consecutive tool changes using the probe tool plate

p.p.s Also as a newbie it is very difficult to judge if a post from 2-3 years old is still current. Since the probe plugin is now here which are the M6 and other macros that are still valid, should I use the G31 button or really avoid it?
A few examples process flow with macros compatible with the "current" state of the art would be extremely usefull I suppose.
theshade
 
Posts: 5
Joined: Fri Jun 25, 2021 3:45 pm

Re: semi auto tool change probe screen and available macros

Postby ger21 » Mon Jun 28, 2021 2:31 pm

One thing that I do not undertstand is that none of the macros I see ever do put any of the tool offset in the table using G10
G10 L1 ....



Typically, you'd only use the offset in the tool table if you had fixed length tool holders. If the tools are not the exact same length every time you put them in, the tool table offsets can't really be used.

Looks like your spindle is just a Kress spindle with a standard collet?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: semi auto tool change probe screen and available macros

Postby theshade » Mon Jun 28, 2021 3:57 pm

Thank you for your answer,

Typically, you'd only use the offset in the tool table if you had fixed length tool holders. If the tools are not the exact same length every time you put them in, the tool table offsets can't really be used.

Looks like your spindle is just a Kress spindle with a standard collet?


I think I know why you say that... but I'd still like to have them set in the table.
And it is actually more than that because the collet attaches to a collet holder and you can have many of them and it is the collet holder which keeps the reference.
looking at the faq:
https://www.amb-elektrik.de/produkte/fr ... angen?c=94
in german they say:

F: Ist die Einspanntiefe des Werkzeuges immer gleich?
A: Ja, im Inneren ist ein verstellbarer Tiefenanschlag, der synchron zu der Hebelbewegung nach hinten fährt, sodass das Werkzeug immer gleich eingespannt ist (das System ist zum Patent angemeldet).

Which translates to:
Q: Is the clamping depth of the tool always the same?
A: Yes, inside there is an adjustable depth stop that moves backwards in sync with the lever movement so that the tool is always clamped in the same way (patent pending for the system).

the video also mentions it:
amb.jpg
theshade
 
Posts: 5
Joined: Fri Jun 25, 2021 3:45 pm

Re: semi auto tool change probe screen and available macros

Postby ger21 » Tue Jun 29, 2021 11:57 am

I don't really understand how that system works. Is the bit held in place in the collet when it's not in the spindle?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: semi auto tool change probe screen and available macros

Postby theshade » Tue Jun 29, 2021 1:53 pm

Well I don't really know exactly, I can look but this is beyond the point.
My questions is really more of a software question and where can I find examples of macros which use the latest generation of probing screen and would store my tools in the table.
I willl then be able to monitor their length and tell you how good and repoducible this system really is.

please understand that I come here fresh with no previous knowledge or preconception of how things "should be" just my pure logique... and maybe I don't get things right ...

but in my mind if you have multiple tools + Z probe + tool offset table + a new probe screen. I expect all of them to come together to make "tool changes" a little bit easier and controllable.

So I am curious why I can't find something /examples/ which does it already even if I have to adjust x-y positions of things I'll be fine... but you get the basic idea... no?

Cheers,

Shady
theshade
 
Posts: 5
Joined: Fri Jun 25, 2021 3:45 pm

Re: semi auto tool change probe screen and available macros

Postby ger21 » Tue Jun 29, 2021 4:04 pm

Yes, I understand your reasoning.
As I mentioned, very few people have the need for this, as it's typically only used with ATC spindles.

What you want to do is have all of your tool lengths in the tool table, and use G43 length offsets. So that when you change tools, you just change the G43 offset. No need to probe at all when changing tools with this method.

Unfortunately, I don't have any code or link to code that does this.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: semi auto tool change probe screen and available macros

Postby theshade » Tue Jun 29, 2021 10:03 pm

Dear Gerry,

Thank you for your time answering my questions. I find it sometimes very useful to simply write things down and clarify my own ideas by doing so.

I would just reply to you that at the begining, until I build trust in my system, I will probably "always" probe anyway because I don't really care if I lose 10 seconds at every tool change. So if there was a dialog box asking for the tool change with a checkbox ([]probe always) I would probably just leave it on for some time

Still being able to have all the tools listed, numbered and organised with the lenght offset probed would seem more "clear" to me even if the offset lenght would slightly change from one run to the next one, it is something I would be able to trace.
i.e. if T4 used to be +0.45 and suddenly changed to +0.8... I would know something is odd and maybe pause the job...
theshade
 
Posts: 5
Joined: Fri Jun 25, 2021 3:45 pm

Re: semi auto tool change probe screen and available macros

Postby theshade » Wed Jun 30, 2021 5:50 pm

I started looking at the M6 macro that goes allong with the new probing screen

Just trying to understand it I wanted to display the internal variable to be able to later compute the difference to Tool1 and store them in the tool table.
Unfortunately the internal variable (5063) is not the same in the probing screen and the normal probing macro...
How can I retrieve these variable and why is not the same being used?
I actually understand the probing screen is not actually part of UCCNC but a plugin so is it all "hidden" what happens inside? I suppose I should use field 2711 instead...

Code: Select all
exec.Callbutton(821);                                                           // Start probing
while (!AS3.Getbuttonstate(821) && !exec.Ismacrostopped()) Thread.Sleep(10);
while (AS3.Getbuttonstate(821) && !exec.Ismacrostopped()) Thread.Sleep(10);
exec.Wait(500);
if (exec.Ismacrostopped()) return;

MessageBox.Show("X" + exec.ivars[5061]+ "Y" + exec.ivars[5062]+ "Z" + exec.ivars[5063])
;
theshade
 
Posts: 5
Joined: Fri Jun 25, 2021 3:45 pm

Re: semi auto tool change probe screen and available macros

Postby Battwell » Sun Jul 04, 2021 1:13 pm

this is my m31 probing code that saves result to tool table etc. (for the tool in use). can be added into your m6 macro.


Code: Select all
int headnumber = 1;     //hsd
int headdownport = 3;
int headdownpin = 6;
int head1downport = 3;
int head1downpin = 6;
int head2downport = 3;
int head2downpin = 7;//         dont worry about above- not used in this machine.
// Probing settings//
double Zmin = -200;
double Zmin2 = -3;
double Feedrate = 500;
double Feedrate2 = 30;
double SafeZ2 = -50;
double retractheight = 10;
double retractheight2 = 2.5;
int Newtool = exec.Getnewtool();
int stoppedled=11;
// ***set tool field number***

int Boxnumber = 195;// fieldnumber for tools 1-20 (field 196)
if (Newtool >20)
{
Boxnumber = 921-21;// fieldnumber for tools 21-96. minus 21 so tool increment is correct
}

// ***end of set tool field number***


double probeyes = exec.Getvar (1);


double ToolXchgpos = -200; // Toolchange X position
double ToolYchgpos = -36.5; // Toolchange Y position  // HSD
double probeheight = -150.71;// hsd // use m312 to get exact position of probe with no tool
double probeX = 4;          // these are machine co ordinates of probe position
double probeY = -36.5;

//M31 probing macro

if (AS3.GetLED(18) && !AS3.GetLED(stoppedled));      // check idle (18)-then check spindle stopped: relay on vfd
//if (probeyes <1)
               { // probe if #1=0 *********************


if(!exec.GetLED(56)||!exec.GetLED(57)||!exec.GetLED(58)) // If machine was not homed then it is unsafe to move in machine coordinates, stop here...
{
  MessageBox.Show(exec.mainform,"MACHINE NOT HOMED, home the machine before tool change!");
  exec.Stop();
  return;
}

while(exec.IsMoving()){}
exec.Wait(200);
if(exec.GetLED(37)) // if probe signal is on - probe stuck! stop here...
{
  MessageBox.Show(exec.mainform,"The probe signal isnt ready-check probe!");
exec.Setvar(0, 100);//stops manual change macroloop blocking the output for eject
  exec.Stop();
  return;
}

//HEAD DOWN
//exec.Setoutpin(headdownport,headdownpin);

double Zoriginalpos = exec.GetZmachpos(); // Get the current Z machine coordinates

exec.Setvar(5063,0);


exec.Code("G00 G53   Z-0.5");//  // Move above the probe sensor position in z
exec.Code("G00 G53  Y" + probeY + "Z-0.5");//  // Move to the probe sensor position in XY
while(exec.IsMoving()){}

//********switch to incremental *********
exec.Code("G91");

exec.Code("G31 Z" + Zmin + "F" + Feedrate); // Move to the probe sensor position in z
while(exec.IsMoving()){}

exec.Wait(100);
Console.Beep();


if(!exec.GetLED(244)) // if didnt hit probe  stop here...
{
  MessageBox.Show(exec.mainform,"The probe didnt hit!");
  exec.Stop();
  return;
}



double probed1 = exec.Getvar(5063); // Get the current Z  coordinates//*****using vars

//exec.AddStatusmessage("probe at   "+ probed1);
exec.Code("G90");
exec.Code("G01 f200  Z" + probed1 );
while(exec.IsMoving()){}
exec.Wait(100);
Console.Beep();



double Zoriginalposprobed = exec.GetZmachpos(); // Get the current Z machine coordinates

double Zoriginalposprobed2 = exec.GetZmachpos(); // Get the current Z machine coordinates



double probedpos= Zoriginalposprobed - Zoriginalpos;
double probedpos2= Zoriginalposprobed2 - Zoriginalpos;// *****using vars


//exec.AddStatusmessage("Tool length old method1  "+ probedpos);




exec.Code("G91");

//double backoff = exec.GetZmachpos() + retractheight2;

//exec.Code("G00 G53 Z" + backoff); // Move few mm?? above probe plate
exec.Code("G00  Z"+ retractheight2 ); // Move 2 mm?? above probe plate
 while(exec.IsMoving()){}
 exec.Wait(100);

exec.Setvar(5063,0);
//Console.Beep();

if(exec.GetLED(37)) // if probe signal is on- probe stuck! stop here...
{
  MessageBox.Show(exec.mainform,"The probe signal isnt ready-check probe!");
exec.Setvar(0, 100);//stops manual change macroloop blocking the output for eject
  exec.Stop();
  return;
}


exec.Code("G31 Z" + Zmin2 + "F" + Feedrate2); // slow probe
while(exec.IsMoving()){}

exec.Wait(100);
Console.Beep();

if(!exec.GetLED(244)) // if didnt hit probe  stop here...
{
  MessageBox.Show(exec.mainform,"The probe didnt hit!");
exec.Setvar(0, 100);//stops manual change macroloop blocking the output for eject
  exec.Stop();
  return;
}




double probed2 = exec.Getvar(5063); // Get the current Z  coordinates//*****using vars

//exec.AddStatusmessage("probed position   "+ probed2);
exec.Code("G90");
exec.Code("G01 f200  Z" + probed2 );
while(exec.IsMoving()){}
exec.Wait(100);
Console.Beep();
//Zoriginalposprobed2= exec.GetZmachpos(); // Get the current Z machine coordinates

//********switch to absolute *********
exec.Code("G90");


if(!exec.Ismacrostopped()) // If tool change was not interrupted with a stop only then validate
     {

 Zoriginalposprobed = exec.GetZmachpos(); // Get the current Z machine coordinates
double goodprobed = exec.Getvar(5060); // ****using vars
//exec.AddStatusmessage("probe good?    "+ goodprobed);


 probedpos= Zoriginalposprobed - Zoriginalpos;
exec.Wait(100);
//probedpos2= Zoriginalposprobed2 - Zoriginalpos;//*****using vars




double tooloffset=  Zoriginalposprobed - probeheight;


exec.AddStatusmessage("Tool length now  "+ tooloffset);


 exec.Code("G00 G53  Z-0.5");// // Move z to -0.5 from home switch
 while(exec.IsMoving()){}
 exec.Wait(100);
exec.Code("G00 G53  y200");// // Move y to +200mm from home switch
 while(exec.IsMoving()){}
 exec.Wait(100);





// **** Set tool table ****


int fieldtoset= (Boxnumber + Newtool);// different field numbers now with extra tools added in this version

AS3.Setfield(tooloffset, fieldtoset);
exec.Wait(100);
AS3.Validatefield(fieldtoset);
//exec.AddStatusmessage("field # "+ fieldtoset);


exec.Callbutton(168);// apply all settings
 exec.Wait(100);
exec.Callbutton(167);// save all settings
 exec.Wait(100);


AS3.Setfield(tooloffset, 169);//set tooloffset z

exec.Wait(200);
AS3.Validatefield(169); // this updates all settings with new z offset.

exec.Wait(100);
while(exec.IsMoving()){}

      
if(Newtool <96)
{
if(!exec.Ismacrostopped()) // If tool change was not interrupted with a stop only then validate new tool number
{
exec.Code("G0 G43 H"+ Newtool); // Load new tool offset
exec.Wait(100);
  exec.Setcurrenttool(Newtool); //Set the current tool -> the new tool
exec.Wait(100);
 // MessageBox.Show("Tool change done.");
exec.AddStatusmessage("Tool PROBED OK   Tool # "+ Newtool);

}
else
{
 exec.StopWithDeccel();
exec.Setvar(0, 100);//stops manual change macroloop blocking the output for eject
 MessageBox.Show("Tool change was interrupted by user!");
}
     }
}

      

               } //end of no probe loop *****************
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 867
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk


Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 27 guests