Page 1 of 1

Re: Macro for probing inside center of distance

PostPosted: Sun Nov 27, 2016 11:36 am
by TadasM
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 24494 times


Thank you :)

Re: Macro for probing inside center of distance

PostPosted: Sun Nov 27, 2016 12:03 pm
by ger21
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.

Re: Macro for probing inside center of distance

PostPosted: Sun Nov 27, 2016 12:24 pm
by TadasM
Thank You Gerry,

I will try and will come back with results :)

Re: Macro for probing inside center of distance

PostPosted: Sun Nov 27, 2016 5:34 pm
by TadasM
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

Re: Macro for probing inside center of distance

PostPosted: Mon Nov 28, 2016 5:39 pm
by TadasM
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) ? :) :)

Re: Macro for probing inside center of distance

PostPosted: Tue Nov 29, 2016 5:35 pm
by TadasM
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 :)