New Probe Screen in Test Release 1.2108

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

Re: New Probe Screen in Test Release 1.2108

Postby dezsoe » Sun Mar 10, 2019 7:44 am

The probe screen is prepared to manage the tool table and ATCs, but these functions will be developed later.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: New Probe Screen in Test Release 1.2108

Postby dezsoe » Sun Mar 10, 2019 7:51 am

Alex,

Sorry, I forgot to answer you. The count gage option is not limited to Z probing, because e.g.g you can also probe the edge of a workpiece with a probe block or a piece of PCB. I was thinking a lot about how to remember the settings. My first idea was what you write: save settings per probe mode. Finally, I ended up with this way, but as I see I have to think over again. Maybe, I could have a checkbox to select "memory options". :)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: New Probe Screen in Test Release 1.2108

Postby Karnage » Sat Jun 08, 2019 10:23 am

Firstly, thank you to the whole team behind UCCNC. The quality of the product/software and support has been fantastic and I think the new additions in the test release are excellent!

Currently I have been using A_Camera's probe screen with a couple of tweaked macros including a semi auto tool change. Spindle stops > moves to tool change pos (defined in Fusion 360 Post)> message pops up asking to confirm tool is changed > moves to fixed position and probes the new tool> continues with g code.

As a non-programmer is there an easy way to recreate the same functionality with the new probing screen or does this still require a macro?
If it does require a macro, can you reference the data already collected in the new probing screen such as:

"fixed plate position" - I guess this can be referenced by the fields on the Setup tab of the probe screen?
"work piece to fixed plate difference" - i don't see this as a field anywhere?

Below is my current macro - I managed to bumble through tweaking a few things and adding MIST (Air only) on to ensure the fixed plate is clear before the tool touched down.

Thanks in advance, and any advice in changing the macro to suit the new version is very much appreciated!

Code: Select all
 //M6 Macro for automatic tool measuring.  First the machine moves to the tool change position, then to the fixed plate
//to measure the new tool length 

double ToolChangeX = 200;     //Tool change X position (all in machine coordinates)
double ToolChangeY = 200;     //Tool change Y position
double ToolChangeZ = -1;   //Tool change Z position

double FixedPlateX = 50;   //Fixed plate X position (machine coordinate)
double FixedPlateY = 550;   //Fixed plate Y position

double SafeZ = 0;      //Safe Z in machine coordinates
double ZRetractHeight = 25;     //Height above Z0 to which probe will retract
double CoarseRate = 400;    //Feedrate for initial probing
double FineRate = 1;        //Feedrate for fine probing
double Zmin = -180;       //maximum probing distance


double PlateDifference = exec.GetCpos();   //Fetches the plate difference from the C axis DRO



// G91 Sets incremental mode,
// G90 Sets absolute distance mode
// G53 Sets move in absolute coordinate for that line

//int originaldistancemode = exec.actualdistmode; // remember the distance mode
//int originalmodalmode = exec.actualmodal; // remember the modal mode

exec.Stopspin();   //Turn off spindle

exec.Code ("G91");   //sets incremental mode for the whole macro

double XOriginalPos = exec.GetXmachpos(); // Get the current machine coordinates
double YOriginalPos = exec.GetYmachpos(); // Get the current machine coordinates
double ZOriginalPos = exec.GetZpos(); // Get the current machine coordinates

exec.Code ("G53 G00 Z" + ToolChangeZ);   //Moves to tool change position
while (exec.IsMoving ()){}
exec.Wait (200);
exec.Code ("G53 G00 X" + ToolChangeX+ " Y" + ToolChangeY);   //Moves to tool change position
while (exec.IsMoving ()){}
exec.Wait (200);

MessageBox.Show ("Press OK when toolchange is complete");   
exec.Wait (200);


exec.Code ("G53 G00 X" + FixedPlateX + " Y" + FixedPlateY);   //Move to Fixed Plate Position
while(exec.IsMoving()){}
exec.Wait(200);
exec.Miston(); //Turn Mist On

exec.Code("G31 Z" + Zmin + "F" + CoarseRate); // Probe Z quickly to get rough height
while(exec.IsMoving()){}
exec.Wait(200);

exec.Code ("G00 Z" + .10); // Retract .1" above the plate
while(exec.IsMoving()){}
exec.Wait(100);

exec.Code("G31 Z" + Zmin + "F" + FineRate); // Probe Z slowly for better resolution
while(exec.IsMoving()){}
exec.Wait(200);
exec.Stopcoolant(); // Turn Mist Off

//because we stopped at the fixed plate, we now want to update our DRO to the value of the plate difference

exec.mainform.sumoffsetcontrol1.G54.newCzinput(PlateDifference);  // Set G54 to new Zzero
exec.mainform.sumoffsetcontrol1.G55.newCzinput(PlateDifference);  // Set G55 to new Zzero   
exec.mainform.sumoffsetcontrol1.G56.newCzinput(PlateDifference);  // Set G56 to new Zzero
exec.mainform.sumoffsetcontrol1.G57.newCzinput(PlateDifference);  // Set G57 to new Zzero
exec.mainform.sumoffsetcontrol1.G58.newCzinput(PlateDifference);  // Set G58 to new Zzero
exec.mainform.sumoffsetcontrol1.G59.newCzinput(PlateDifference);  // Set G59 to new Zzero

exec.Code ("G53 G00 Z" + SafeZ);   //retracts Z
while(exec.IsMoving()){}
exec.Wait(100);

exec.Code ("G53 G00 X" + XOriginalPos + " Y" + YOriginalPos);   //moves to original XY position
while(exec.IsMoving()){}
exec.Wait(100);

exec.Code ("G90");  //returns machine to absolute for Z move and rest of code

//exec.Code ("G00 Z" + ZOriginalPos);
//while(exec.IsMoving()){}
//exec.Wait(100);

//exec.Code("G" + originaldistancemode); // Set system back to the original distance mode
//exec.Code("G" + originalmodalmode); // Set system back to the original distance mode

exec.Code ("G90");  //returns machine to absolute
Karnage
 
Posts: 32
Joined: Sat Nov 10, 2018 12:30 pm

Re: New Probe Screen in Test Release 1.2108

Postby Karnage » Tue Jun 11, 2019 10:59 am

I've made some progress thanks to the other topic posts http://forum.cncdrive.com/viewtopic.php?f=4&t=1891&hilit=1.2108&start=30

I've made a stock probe macro and and toolchange macro. But i could use some help please.

Firstly, both scripts work when called from the MDI or when assigned to a hotkey but the mist does not turn on?

Secondly, when I assign the toolchange macro to M6 and set the checkbox for "run toolchange macro (m6)" the macro does not work?

Code: Select all
// Initial Z Probe for stock

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("The machine was not yet homed, home the machine before run to parking position!");
  exec.Stop();
  return;
}

exec.Callbutton(801); // select tool probe mode
exec.Callbutton(840); // select touch probe mode
exec.Callbutton(850); // Ref current as workpiece
exec.Miston();; //Turn Mist On
exec.Callbutton(821); // start probing
exec.Stopcoolant(); // Turn Mist Off



Code: Select all
// Tool Change Macro

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("The machine was not yet homed, home the machine before run to parking position!");
  exec.Stop();
  return;
}


exec.Callbutton(801); // select tool probe mode
exec.Callbutton(842); // select Fixed tool probe mode
exec.Callbutton(848); // move to fixed probe pos
exec.Miston(); //Turn Mist On
exec.Callbutton(821); // start probing
exec.Stopcoolant(); // Turn Mist Off
Karnage
 
Posts: 32
Joined: Sat Nov 10, 2018 12:30 pm

Re: New Probe Screen in Test Release 1.2108

Postby ger21 » Tue Jun 11, 2019 11:34 am

You have two ;; after mist on. That might be the issue.

You could also try

Code: Select all
exec.Code("M7"); //Mist On
exec.Code("M9"); // Mist Off


Not sure about the M6 macro. Are there any errors?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: New Probe Screen in Test Release 1.2108

Postby Karnage » Tue Jun 11, 2019 12:13 pm

Thanks Gerry,

I did miss the ";;" but that is not in both macros. I will however try your suggestion when I go down to the shed.

Any idea as to why the m6 does not work when called on toolchange but does when called directly?
Karnage
 
Posts: 32
Joined: Sat Nov 10, 2018 12:30 pm

Re: New Probe Screen in Test Release 1.2108

Postby ger21 » Tue Jun 11, 2019 1:10 pm

Again, are there any errors?
What does it do, when you say that it "doesn't work"?

Are you sure it's in the correct folder?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2714
Joined: Sat Sep 03, 2016 2:17 am

Re: New Probe Screen in Test Release 1.2108

Postby dezsoe » Tue Jun 11, 2019 2:50 pm

Hi Karnage,

Could you explain in details what do you want to do? Running the probe screen functions from the M6 macro is a bit tricky, but it can be done. If you tell me all the details then I can make it for you.

(The problem is that the probe screen runs G-codes to move and probe. When cycle is started the probe screen will do nothing, because adding G-codes while other G-codes are executed would be a bit extreme. :) So, while you run a G-code the M6 calls the functions, but nothing will happen. You have to stop the code in M6, call the probing functions and restart the cycle. It works fine, I've already written this kind of M6 for somebody else.)
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: New Probe Screen in Test Release 1.2108

Postby Karnage » Tue Jun 11, 2019 10:22 pm

ger21 wrote:Again, are there any errors?
What does it do, when you say that it "doesn't work"?

Are you sure it's in the correct folder?


Thanks again Gerry, I should have been more specific as I have two separate issues, but I think Dezsoe has answered one now and I'm starting to wonder if it has some bearing on the other issue too. No errors, they are in the correct folder.

Issue 1:
I tried your suggestion for the mist call, interestingly this turned the mist an as expected, but did not turn the mist off. I tried adding "while (exec.IsMoving ()){}" between the probe call and the m9 to see if this would help and it made no difference.

When I use "exec.Miston()" the mist relay clicks (opens and closes rapidly) but the rest of script still performs correctly. I presume this means the code is working, i also tried using "is moving" but this did not help.


Issue 2:
Apart from the mist, both scripts work when called from a hot key, ie 20056.txt will:

1. select "probe mode"
2. select "fixed tool probe"
3. move to the fixed probe position
4. probe

when the same script is saved as m6.txt it does not work. it does not show any error, the spindle simply moves from my tool change position back to the job as if to be ignoring the script entirely.


dezsoe wrote:Hi Karnage,

Could you explain in details what do you want to do? Running the probe screen functions from the M6 macro is a bit tricky, but it can be done. If you tell me all the details then I can make it for you.

(The problem is that the probe screen runs G-codes to move and probe. When cycle is started the probe screen will do nothing, because adding G-codes while other G-codes are executed would be a bit extreme. :) So, while you run a G-code the M6 calls the functions, but nothing will happen. You have to stop the code in M6, call the probing functions and restart the cycle. It works fine, I've already written this kind of M6 for somebody else.)


Thank you Dezsoe. The work flow i'm hoping to achieve is a semi automatic tool change.

1. G-Code runs.
2. Spindle moves to tool change position, (the Fusion 360 post includes a tool change position)
3. I manually change the tool (later I would like to incorporate an ATC)
4. The Tool height is measured calling buttons on the probing screen using the below script
5. milling continues until next tool change, rinse, repeat.

As I mentioned above, if I call this macro manually it works (except for the air blast for clearing the tool sensor)

Code: Select all
// Tool Change Macro

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("The machine was not yet homed, home the machine before run to parking position!");
  exec.Stop();
  return;
}

exec.Callbutton(801); // select tool probe mode
exec.Callbutton(842); // select Fixed tool probe mode
exec.Callbutton(848); // move to fixed probe pos
exec.Miston(); //Turn Mist On
exec.Callbutton(821); // start probing
exec.Stopcoolant(); // Turn Mist Off


I could still install A_Camera's probing screen, as my current macro uses fields (labels?) from his probe screen, but it seems counter intuitive to install another probe screen when the included one is excellent.

I presume the alternative is to re-write the macro calling fields from the new screen, but this is still a work around as it uses the C-axis DRO to store the tool to work piece difference.

I presume a lot of users could use a semi auto tool change as used above, due to a medical condition my memory is very poor, this makes it easy for me to forget to check the tool length after a tool change, it also makes it really hard for me to learn the basics to write macros, so I'm stuck stealing code and mimicking things through trial and error.

One last question, i have used the callbutton with a hotkey to call the probing screen (800), is there a way to call page 2, page 3 and settings in the same way?

Gents, thank you for your help, I have read through a lot of posts and have tried to help myself before asking. I'm sure it's tedious dealing with waves of newbies who come asking similar questions, your experience and advice is i'm sure appreciated by many of the users.

Thanks,
Jeremy
Karnage
 
Posts: 32
Joined: Sat Nov 10, 2018 12:30 pm

Re: New Probe Screen in Test Release 1.2108

Postby dezsoe » Wed Jun 12, 2019 1:55 pm

Hi Jeremy,

One last question, i have used the callbutton with a hotkey to call the probing screen (800), is there a way to call page 2, page 3 and settings in the same way?


The ProbeToolQuickJump (button 800) jumps to the probe screen and selects the tool probe mode on page 1. There are no other quick jump functions, but you can call exec.selectlayer(nnn) functions to select the required pages. You have to select the TOOLS (5) page first, then the PROBE (26) and then the page (27 to 30) you need.

I have some more questions about how you start the whole job. Is your probe fixed to the table? How do you probe the surface of the workpiece before you start the job?
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

PreviousNext

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: Bing [Bot] and 22 guests