Mobile Probe: reference current as workpiece problem

If you have a question about the software please ask it here.

Mobile Probe: reference current as workpiece problem

Postby nhauber » Sat Apr 16, 2022 5:16 pm

When I startup UCCNC home the machine and then want to reference the workpiece, it doubles the offset it should have and then plunges into the position I started from. It starts working correctly if I play around with other options of the probing screen, but I don't know what causes or fixes this exactly and it certainly seems like unwanted behavior, or maybe I'm doing something wrong.
This is what it looks like:


I'd really appreciate the help, as this function is vital for the manual tool change macro I'm using.
nhauber
 
Posts: 1
Joined: Sat Apr 16, 2022 5:07 pm

Re: Mobile Probe: reference current as workpiece problem

Postby fendar2005 » Sun Apr 24, 2022 11:51 am

Can I also bump this. Thanks in anticipation of replies, bonus thanks to get this working :-)

My symptoms are similar.

1. Ensure CNC homed
2. Move cutter so it is above the mobile probe (probe is a RATTMMOTOR https://www.amazon.co.uk/gp/product/B08NSQNJRV/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1 )
3. Press Set as Mobile Probe position.
4. Move cutter so it is level with top of workpiece (setting the Z height jus off to the side of the workpiece for testing )
5. Set Z zero
6. Press Reference current as workpiece
7. Press Start Probing
8. Cutter moves to X,Y of probe at same Z level (I'd rather the Z move up to Z machine zero coordinates) OK this was fixed by setting Greater Z is safer in G17 and setting Z height to 0.5 which prevents triggering Z top limit switch :-)
9. Cutter moves up to the Z height No longer the case since adjusting setting in step 8
10. Cutter then is moved down to touch the mobile probe
11. Cutter moves back up a small bit then back down for fine adjustment then returns to Z hieght to original position
12. M6 is called, tool changed and cutter moves above mobile probe again then repeats the touchoff on the probe.
13. On return to where the Reference current as workpiece was set the cutter/Z zero is always 8.47mm below the top of the material.

Below is the M6 macro I am using, I have added a small bit as I'm currnetly yet to sort out the VFD, connections and control the spindle with UCCNC.

// 1) We save XY coordinates machines, Z relative
// ​​2) Raise Z to maximum
// 3) We are going to the zone of tool changing
// 4) We ask that the tool changed?
// 5) We are going to where milling stopped
// 6) We ask a toolsetter in place?
// 7) measure mill
// 8) we subtract the height of the plate and write as a new zero
// 11) go down to the relative height
// All heights store in machine coordinates

double ToolChangeX = 0; // Coordinates of the zone tool change
double ToolChangeY = 200; //
double ToolProbeX = -0.2638; //Tool Probe - Added by DF
double ToolProbeY = 373.150; //Tool Probe - Added by DF

double SafeZ = 0; // Safe Z in machine coordinates
double ZRetractHeight = 15; // rebound height for more accurate measurement
double FastRate = 250; // The speed of the first "fast" touch
double SlowRate = 25; // The speed of the second "slow" touch
double Zmin = -100; // Z search distance
double XOriginalPos = exec.GetXmachpos(); // We get current machines coordinates
double YOriginalPos = exec.GetYmachpos(); //
double ZOriginalPos = exec.GetZpos(); // and relative Z.
double newZpos = 0; // Calculated Z.
double OffsetDiv = 0; // The thickness of the measuring plate - Changed to Zero as using a bed mounted probe

// Help
// G91 mode of operation in increments
// G90 absolute coordinate mode
// G53 Mode of absolute coordinates for one command
// G31 move to sensor worker

// Turn off the spindle
exec.Stopspin();

MessageBox.Show ("Check Spindle. Press OK when Spindle is Stopped");
exec.Wait (200);


// All Macro in increments are working
exec.Code ("G91");
// Climb to safe height
exec.Code ("G53 G00 Z" + SafeZ);
while (exec.IsMoving ()){}
exec.Wait (200);
// We go to change the tool
exec.Code ("G53 G00 X" + ToolChangeX+ " Y" + ToolChangeY);
while (exec.IsMoving ()){}
exec.Wait (200);
MessageBox.Show ("Press OK when toolchange is complete");
exec.Wait (200);
// //Move back
//exec.Code ("G53 G00 X" + XOriginalPos + " Y" + YOriginalPos);
// while(exec.IsMoving()){}
// exec.Wait(200);

// warning moving to tool probe X Y - Added by me DF
MessageBox.Show ("OK to move to Tool Probe Position");
exec.Wait (200);
exec.Code ("G53 G00 X" + ToolProbeX + " Y" + ToolProbeY);
while (exec.IsMoving ()){}
exec.Wait (200);

// original script carry on

// warning to set Toolsetter
MessageBox.Show("Toolsetter installed and ON?");
// Measurement on Toolnetter
exec.Code("G31 Z" + Zmin + "F" + FastRate);
while(exec.IsMoving()){}
exec.Wait(200);
exec.Code ("G00 Z" + ZRetractHeight);
while(exec.IsMoving()){}
exec.Wait(200);
exec.Code("M07");//We blow the cutter to get rid of chips
exec.Wait(1000);
exec.Code("M09");
exec.Wait(200);
exec.Code("G31 Z" + Zmin + "F" + SlowRate);
while(exec.IsMoving()){}
exec.Wait(200);

newZpos = OffsetDiv;//At the time of touching the plate, the end of the cutter is located on the thickness of the plate above the place you want to count the zero axis z

exec.mainform.sumoffsetcontrol1.G54.newCzinput(newZpos);//We write down a new height in all coordinate systems
exec.mainform.sumoffsetcontrol1.G55.newCzinput(newZpos);
exec.mainform.sumoffsetcontrol1.G56.newCzinput(newZpos);
exec.mainform.sumoffsetcontrol1.G57.newCzinput(newZpos);
exec.mainform.sumoffsetcontrol1.G58.newCzinput(newZpos);
exec.mainform.sumoffsetcontrol1.G59.newCzinput(newZpos);

// Move back
exec.Code ("G53 G00 Z" + SafeZ );

// Warning to start spindle
MessageBox.Show ("Check Spindle. Press OK when Spindle is running");
exec.Wait (200);

exec.Code ("G53 G00 X" + XOriginalPos + " Y" + YOriginalPos);
while(exec.IsMoving()){}
exec.Wait(200);

//Return to absolute mode
exec.Code ("G90");
//Lower Z to the memorandum memorized
exec.Code ("G00 Z" + ZOriginalPos);
while(exec.IsMoving()){}
exec.Wait(100);
fendar2005
 
Posts: 10
Joined: Mon Mar 14, 2022 12:37 pm

Re: Mobile Probe: reference current as workpiece problem

Postby fendar2005 » Sun Apr 24, 2022 7:36 pm

OK I found another M6 Macro and had a bit of a play and have some good progress but it is too late on a Sunday for me to document the process properly. Hopefully it will stay in my mind till I get another chance.

The code I used was in this topic https://www.forum.cncdrive.com/viewtopic.php?f=11&t=2871#

But I need to add some prompts to start spindle and cannot workout where to put these, the code is different format from before and above my level of coding.
fendar2005
 
Posts: 10
Joined: Mon Mar 14, 2022 12:37 pm


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 46 guests