Can UCCNC trace a border around job?

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

Can UCCNC trace a border around job?

Postby The-Meerkat » Sun Jun 13, 2021 8:44 pm

When I use Lightburn software on my laser, I can load a job and click on a button called “Frame”. The laser head will move without firing and simulate a tight rectangle around the job. This is a very useful visual check for lining up the material to be cut. I can click the button and move the material around repeatedly until I get it exactly where I want it before starting. Is there a function like this in UCCNC for plasma cutting? I’d sure like to know how to do it. I know I can set up in SheetCam to use a corner or center. However, being able to quickly trace an outline with the torch head really would really help when I’m trying to fit a cut job between other previous cuts to maximize usage of an expensive sheet of metal.
The-Meerkat
 
Posts: 43
Joined: Wed Apr 01, 2020 1:23 am
Location: North County San Diego

Re: Can UCCNC trace a border around job?

Postby Vmax549 » Sun Jun 13, 2021 9:17 pm

Years back I did a macro that would travel the extents of the part in X/Y for a plasma cutter. It would always start at the minimum position of X/Y. I used it for exactly what you are needing. So it is possible.

(;-) TP
Vmax549
 
Posts: 331
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

Re: Can UCCNC trace a border around job?

Postby eabrust » Mon Jun 14, 2021 1:43 am

Try this, it's likely one Terry started, and has been modified a few times over the years.

The last addition I made was to have it optionally go to 'center locations' along the sides instead of just the 4 corners, helpful such as if you have a round item. I haven't used it in a while.

You will want to check the FR for your feedrate, and the DT value for if you have UCCNC delay setup for mSec or Sec.

regards
Eric

Code: Select all

/*  M20002
   Part Extents Macro to test material fit

   ported from Mach3 to C# for uccnc, thanks to BR549/Vmax549/TP for the original macro
   25/06/2016 - robertspark
   3/19/17 - E Brust - Allow mid points for round items.


    NOTE: Set your feedrate and Dwell Time according to you machine parameters / units / requirements.
*/

double FR = 100; // sets Feedrate
double DT = 3000; // Sets Dwell Time (mSec, 3000 = 3 sec)



double XMax;
double XMin;
double YMax ;
double YMin ;
double numobjects;


numobjects=Convert.ToDouble(AS3.Getfield(894));


   if(numobjects==0)
   {         
   MessageBox.Show("Load a File And Restart");
   return;
   }


XMax = Convert.ToDouble(AS3.Getfield(888)); // 888  Diagnostics_maxX
XMin = Convert.ToDouble(AS3.Getfield(885)); // 885  Diagnostics_minX
YMax = Convert.ToDouble(AS3.Getfield(889)); // 889  Diagnostics_maxY
YMin = Convert.ToDouble(AS3.Getfield(886)); // 886  Diagnostics_minY

       DialogResult tst;
       tst = MessageBox.Show("Is your part round / want to hit midpoints?  Click YES for centers of sides/circle, NO for corners/square" , "mode", MessageBoxButtons.YesNo);      
      
      
      DialogResult result;
      result = MessageBox.Show("Is Your Z HEIGHT Safe To Travel?", "check!!!" , MessageBoxButtons.YesNo);
      
       if (result == System.Windows.Forms.DialogResult.Yes)
      {
      if (tst == System.Windows.Forms.DialogResult.Yes)
      {
/*          exec.Code("G92 X0 Y0 Z0"); // Zero the DRO's
         exec.Code("G01 X" + XMin + " Y" + YMin + " F" + FR); // Move to Minimum X & Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep(); */
   
         exec.Code("G04 P" + DT);
         exec.Code("G01 x" + XMin + " y" + (YMin+YMax)/2 + " F" + FR); // Move to Maximum Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();

   
/*          exec.Code("G04 P" + DT);
         exec.Code("G01 Y" + YMax); // Move to Maximum Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep(); */
         
         exec.Code("G04 P" + DT);
         exec.Code("G01 X" + (XMin+XMax)/2 + "Y" + YMax); // Move to Maximum X Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
/*          exec.Code("G04 P" + DT);
         exec.Code("G01 X" + XMax); // Move to Maximum X Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep(); */
         

         exec.Code("G04 P" + DT);
         exec.Code("G01 x" + XMax + " Y" + (YMin+YMax)/2); // Move to Minimum Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();      

         
/*          exec.Code("G04 P" + DT);
         exec.Code("G01 Y" + YMin); // Move to Minimum Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep(); */

         exec.Code("G04 P" + DT);
         exec.Code("G01 X" + (XMin+XMax)/2 + " Y" + YMin); // Move to Minimum X Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
/*          exec.Code("G04 P" + DT);
         exec.Code("G01 X" + XMin); // Move to Minimum X Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep(); */
         
         exec.Code("G04 P" + DT);
         exec.Code("G01 X0 Y0"); // Move to 0,0 X & Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         }
      
         
      
      
      if (tst == System.Windows.Forms.DialogResult.No)

         {
         exec.Code("G92 X0 Y0 Z0"); // Zero the DRO's
         exec.Code("G01 X" + XMin + " Y" + YMin + " F" + FR); // Move to Minimum X & Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
         exec.Code("G04 P" + DT);
         exec.Code("G01 Y" + YMax); // Move to Maximum Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
         exec.Code("G04 P" + DT);
         exec.Code("G01 X" + XMax); // Move to Maximum X Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
         exec.Code("G04 P" + DT);
         exec.Code("G01 Y" + YMin); // Move to Minimum Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
         exec.Code("G04 P" + DT);
         exec.Code("G01 X" + XMin); // Move to Minimum X Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
         exec.Code("G04 P" + DT);
         exec.Code("G01 X0 Y0"); // Move to 0,0 X & Y Coordinates
         while(exec.IsMoving()){}
         exec.Wait(200);
         Console.Beep();
         
      }
      }
   
   
       if (result == System.Windows.Forms.DialogResult.No)
      {

         MessageBox.Show("Move Z To A Safe Position And Restart");

      }
   
      
      
CraftyCNC: Plugins for UCCNC (and other neat stuff): http://www.craftycnc.com/plugins-for-uccnc/
eabrust
 
Posts: 357
Joined: Fri Sep 16, 2016 2:32 am
Location: Near Shirland IL, USA

Re: Can UCCNC trace a border around job?

Postby Battwell » Mon Jun 14, 2021 9:10 am

thats a handy one. will be adding it to my screen :-)
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

Re: Can UCCNC trace a border around job?

Postby The-Meerkat » Mon Jun 14, 2021 3:28 pm

Awesome. I’ll give it a try. Thanks Eric.
The-Meerkat
 
Posts: 43
Joined: Wed Apr 01, 2020 1:23 am
Location: North County San Diego

Re: Can UCCNC trace a border around job?

Postby The-Meerkat » Tue Jun 15, 2021 1:20 am

I created a button and added the macro to my run screen today. It works great. It’s exactly what I was looking for. Bada-Bing!
The-Meerkat
 
Posts: 43
Joined: Wed Apr 01, 2020 1:23 am
Location: North County San Diego


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 26 guests