Macro for probing inside center of distance

Here is where you can drop off Examples of WORKING macros,plugins,Gcode programs , macro Wizards etc.
Please give a brief description of what it is and how it works.

Re: Macro for probing inside center of distance

Postby TadasM » Sun Nov 27, 2016 11:36 am

Hi Vmax549,

Is there a chance to add the "E" "H" "P" "Q" values into fields and macro executed with a press of a button (when written values in the text fields are taken into macro).

Something like this? :
Probing center.JPG
Probing center.JPG (13.56 KiB) Viewed 22446 times


Thank you :)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Macro for probing inside center of distance

Postby ger21 » Sun Nov 27, 2016 12:03 pm

Replace this:

Code: Select all
// E = X probing distance
// H = Y probing Distance
// P = Probing  Feed Rate
// Q = Z probing Depth


if ( (Qvar == null) || (Evar == null) || (Hvar == null) || (Pvar == null) )
   {
   MessageBox.Show("There Is a Missing Parameter E H Q P");
     exec.Stop();
     return;
   }

double?  Xlen = Evar;
double?  Ylen = Hvar;
double?  Frate = Pvar;
double?  Zdepth = Qvar;



With this:
Code: Select all
double  Xlen = AS3.Getfielddouble(20001); // X probing distance
double  Ylen = AS3.Getfielddouble(20002); // Y probing Distance
double  Zdepth = AS3.Getfielddouble(20003);// Z probing Depth
double  Frate = AS3.Getfielddouble(20004); // Probing  Feed Rate


Number the fields to match the code, 20001-20004.
Name the macro and the button with the same number.

There's no error checking if the values you enter are not correct.
Note: I didn't check this.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: Macro for probing inside center of distance

Postby TadasM » Sun Nov 27, 2016 12:24 pm

Thank You Gerry,

I will try and will come back with results :)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Macro for probing inside center of distance

Postby TadasM » Sun Nov 27, 2016 5:34 pm

I tested original macro posted by Vmax549, it works perfectly, with all notifications, as it is described. As posted earlier, I want to have possibility to add values visually (dedicated textfields). Advice from Gerry works well. Personally, I prefer Coarse and Fine (double) probing, so I managed to modify original macro to do that. However I lost functionality of this part of code (same for "Y" axis):

Code: Select all
if (Xlen != 0 )
   {
   if ((Xpos1 - Xstart) >= Xlen)
      {
      MessageBox.Show("There was a MISSED probe trip in X right , Reset E parameter");
        exec.Stop();
        return;
      }
   }

 if (Xlen != 0 )
   {
   exec.AddStatusmessage("The machine moved to X right position");
   exec.Wait(100);
   }


Now what it does, is when it reaches specified distance machine assumes the probe was triggered and continues with other part of macro. It would be great if you could help to get this code working with on screen notifications as per original Vmax549 macro :)

Thak You
Attachments
M20003.txt
(4.75 KiB) Downloaded 897 times
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Macro for probing inside center of distance

Postby TadasM » Mon Nov 28, 2016 5:39 pm

Vmax549,

Thank you for your detailed replies. Much appreciated. My goal is to have commonly used probing's on "RUN" screen (I left some space for all that stuff):
Screenset MMC.JPG


Sadly I'm not good on creating macros. I can modify or adjust them a bit at the most. So I'm very happy that You are sharing some of Your great work. Any plans to make such probing routine using new probing method (using tTrip point values) ? :) :)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Macro for probing inside center of distance

Postby TadasM » Tue Nov 29, 2016 5:35 pm

Vmax549 wrote:Working on one JUST for you (;-) Center of Space, Double Tap. Using probe points.

Can you give me a list of the ones you need ?

(;-) TP


:shock: :shock: Fantastic ! :)

I have sent you a PM :)
TadasM
 
Posts: 64
Joined: Thu Oct 27, 2016 10:00 am
Location: Lithuania

Re: Macro for probing inside center of distance

Postby gabi68 » Wed Dec 07, 2016 10:56 pm

Hi Terry,

This is very useful macro. I have 1.2026 ver and I not seeing any messages besides the completed (center of X Y completed). How is this supposed to work? I see there is G31 call. I have a macro for Z probe. Can I use the probe device for this task also?
What I mean with that is to put the auto Z plate to the side of the stock and probe.
If that is not working can you point me in the right direction?
Also can you post a finished version of what you have regarding this macro.

Many thanks in advance.
Gabi
gabi68
 
Posts: 57
Joined: Wed Dec 07, 2016 10:35 pm

Re: Macro for probing inside center of distance

Postby gabi68 » Sat Dec 10, 2016 12:19 pm

Hi Terry,

I dload the macro and use it. First no messages, only finished message. I have some questions:
- how is this supposed to work? I have a z plate and thinking to use that for finding centre of a stock.
- can you post the finished version, please?

Many thanks
Gabi
gabi68
 
Posts: 57
Joined: Wed Dec 07, 2016 10:35 pm


Return to UCCNC TOOL BOX

Who is online

Users browsing this forum: No registered users and 1 guest