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 Karnage » Wed Jun 12, 2019 8:48 pm

Thanks Dezsoe,

I have tried using as3.select layer and this works if I press the hotkey twice, first press goes to whichever probe tab I was previously on (eg "page 2), second press changes to setup tab. i tried repeating the 3 lines in the macro and this didn't help, I still had to press the hotkey twice.

Code: Select all
// Call Probe Setup page

AS3.selectlayer(5);
AS3.selectlayer(26);
AS3.selectlayer(30);



I tried changing to your suggestion, and this does not work with the below error:
CS1061 | in line: 13 | error text: 'UCCNC.Executer' does not contain a definition for 'selectlayer' and no extension method 'selectlayer' accepting a first argument of type 'UCCNC.Executer' could be found (are you missing a using directive or an assembly reference?)
CS1061 | in line: 14 | error text: 'UCCNC.Executer' does not contain a definition for 'selectlayer' and no extension method 'selectlayer' accepting a first argument of type 'UCCNC.Executer' could be found (are you missing a using directive or an assembly reference?)
CS1061 | in line: 15 | error text: 'UCCNC.Executer' does not contain a definition for 'selectlayer' and no extension method 'selectlayer' accepting a first argument of type 'UCCNC.Executer' could be found (are you missing a using directive or an assembly reference?)

Code: Select all
// Call Probe Setup page

exec.selectlayer(5);
exec.selectlayer(26);
exec.selectlayer(30);



In regard to probing, i probe directly on metal jobs, and with a mobile plate on non conductive jobs. With the previous version using A-Camera's probe screen, this called parameters such as plate thickness, probe diameter, fast probe speed, and slow probe speed. My thinking is that all of these parameters are in the new build so this could be handled internally using the below macro: which works exactly as I need except for the mist on and off not working (see previous above in regard to what i have tried) and the macro not working as m6 which you've explained won't work.

After using the below macro, and using then probing at the fixed position everything is reference and I hope that after I manually change the tool, the macro will handle moving back to the fixed probe position, turn on mist to clear any chips and then probe to adjust tool length.

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


I have also attached my old m6 macro, which calls the parameters from A_Camera's probing screen for reference.

Thank you again, I hope that i have explained this well enough, i don't often explain things clearly.
Attachments
M6.txt
(5.32 KiB) Downloaded 878 times
Karnage
 
Posts: 32
Joined: Sat Nov 10, 2018 12:30 pm

Re: New Probe Screen in Test Release 1.2108

Postby dezsoe » Thu Jun 13, 2019 9:54 am

Hi Jeremy,

Sorry, it's AS3, not exec, it was my mistake.

You have to press the button twice, because when the probe layer is selected from an other layer then it jumps to that page where the current selected probe mode can be found.

You should use mobile probe mode instead of fixed. The fixed probe mode is designed to work with tool lenght offset, I'll have to find out a better name/description, because it's a bit confusing.

Set the checkbox at "Save mobile probe pos. on exit" and then set the mobile probe position to your fixed probe. Now you heve 3 options:
1. Conductive workpiece: turn off "Axis 1 count gage", go to your workpiece and press "Reference probe as workpiece". It will probe the surface, then the probe.
2. Non-conductive workpiece: use your plate. The same as 1., but first set the "Gage height" to your plate thickness and turn on "Axis 1 count gage".
3. You set the tool to the workpiece manually (with paper etc.): set the tool to your workpiece and press "Reference current as workpiece".

Now the program knows the difference between the workpiece and the probe, so next time you can start a tool probe by pressing the "Start probing" button.

The attached M6 macro does the same with some more functions. You have to set a tool change position in the macro. (It will be the same that you set in Fusion 360. I didn't delete this from the macro, so if anybody else needs it then it is there.) When an M6 call is in the g-code, it will go to the tool change position and wait for the tool change. Then it travels to the probe and probes the tool. The mist will be turned on while probing. When the probe is finished it will return to the original position and continue the g-code execution. If the probing was not successful the g-code execution will not continue.

Code: Select all
if (!exec.GetLED(308))                                                          // Mobile wp referenced
{
  exec.AddStatusmessage("The workpiece was not referenced.");
  return;
}

bool wasCycleRunning = exec.GetLED(54);

if (wasCycleRunning)
{
  exec.Stop();
  while(exec.IsMoving()){}
  exec.Code("");
}

int CurrTool = exec.Getcurrenttool();
int NewTool = exec.Getnewtool();

if (NewTool == -1)                                                              // -1 -> there was no T word
{
  exec.AddStatusmessage("There was no T word for the M6.");
  return;
}

string NewToolName = "T" + NewTool;

if (NewTool == CurrTool)
{
  if (wasCycleRunning) exec.Callbutton(128);                                    // Cycle start if it was started
  return;
}

double cpX = exec.GetXmachpos();
double cpY = exec.GetYmachpos();
double cpZ = exec.GetZmachpos();

double cpwZ = exec.GetZpos();

if (!GotoMachPos(tcpX, tcpY, tcpZ)) return;

MessageBox.Show(exec.mainform, "Insert new tool " + NewToolName, "Change tool");
if (exec.Ismacrostopped()) return;

exec.Setcurrenttool(NewTool);
while (exec.IsMoving());

exec.Callbutton(801);                                                           // Tool probe
exec.Callbutton(841);                                                           // Mobile probe
exec.Callbutton(800);                                                           // Quick jump to probe screen

if (!AS3.Getbuttonstate(851)) exec.Callbutton(851);                             // Zero probed axes

exec.Callbutton(848);                                                           // Goto probe pos

exec.Wait(100);
while (exec.IsMoving());
if (exec.Ismacrostopped()) return;

exec.Miston();                                                                  // Turn Mist On

exec.Callbutton(821);                                                           // Start probe
while (!AS3.Getbuttonstate(821) && !exec.Ismacrostopped()) Thread.Sleep(10);
while (AS3.Getbuttonstate(821) && !exec.Ismacrostopped()) Thread.Sleep(10);
exec.Wait(500);
if (exec.Ismacrostopped()) return;

exec.Stopcoolant();                                                             // Turn Mist Off

if (exec.GetLED(300)) return;                                                   // If probe failed then exit (g-code is stopped!)

AS3.selectlayer(2);

if (!GotoMachPos(cpX, cpY, GetMachFromWorkZ(cpwZ))) return;

if (wasCycleRunning) exec.Callbutton(128);                                      // Cycle start if it was started

return;

#Events

const double tcpX = 50;                                                         // Tool change position
const double tcpY = 10;
const double tcpZ = 40;

bool GotoMachPos(double x, double y, double z)
{
  List<string> codelist = new List<string>();                                   //Create a new List of strings.

  double cZ = exec.GetZmachpos();
  double safeZ = AS3.Getfielddouble(2734);                                      // SafeZ
  double moveZ = cZ;

  if (moveZ < safeZ) moveZ = safeZ;
  if (moveZ < z) moveZ = z;
  if (cZ < moveZ)
    codelist.Add("G0 G53 Z" + moveZ.ToString("F6"));
  codelist.Add("G0 G53 X" + x.ToString("F6") + " Y" + y.ToString("F6"));
  codelist.Add("G0 G53 Z" + z.ToString("F6"));

  exec.Codelist(codelist);                                                      //Execute the List of g-codes.
  while (exec.IsMoving());

  return !exec.Ismacrostopped();
}

double GetMachFromWorkZ(double wz)
{
  double g92offset = AS3.Getfielddouble(502);
  double tooloffset = AS3.Getfielddouble(169);
  double workoffset = AS3.Getfielddouble(133 + 6 * (int)(exec.Getactualmodalcode(12) - 54) + 2);
  return (wz + workoffset + g92offset + tooloffset);
}
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 Delco » Thu Jun 13, 2019 10:17 am

With the probe screen , how do I get it to move Z to G53 Z-1 after a probe , had a issue where I did a tool change , probed for new Z and then forgot to move Z up enough before continuing the cycle and dragged the bit through a clamp.

Would also be nice if all the setting for each probe type saved for each type independantly so next time you came back to that type of probe it has the settings you last used for that type of probe.
Delco
 
Posts: 364
Joined: Tue Apr 02, 2019 4:23 am

Re: New Probe Screen in Test Release 1.2108

Postby Karnage » Thu Jun 13, 2019 12:25 pm

dezsoe wrote:Hi Jeremy,

Sorry, it's AS3, not exec, it was my mistake.

You have to press the button twice, because when the probe layer is selected from an other layer then it jumps to that page where the current selected probe mode can be found.

You should use mobile probe mode instead of fixed. The fixed probe mode is designed to work with tool lenght offset, I'll have to find out a better name/description, because it's a bit confusing.

Set the checkbox at "Save mobile probe pos. on exit" and then set the mobile probe position to your fixed probe. Now you heve 3 options:
1. Conductive workpiece: turn off "Axis 1 count gage", go to your workpiece and press "Reference probe as workpiece". It will probe the surface, then the probe.
2. Non-conductive workpiece: use your plate. The same as 1., but first set the "Gage height" to your plate thickness and turn on "Axis 1 count gage".
3. You set the tool to the workpiece manually (with paper etc.): set the tool to your workpiece and press "Reference current as workpiece".

Now the program knows the difference between the workpiece and the probe, so next time you can start a tool probe by pressing the "Start probing" button.

The attached M6 macro does the same with some more functions. You have to set a tool change position in the macro. (It will be the same that you set in Fusion 360. I didn't delete this from the macro, so if anybody else needs it then it is there.) When an M6 call is in the g-code, it will go to the tool change position and wait for the tool change. Then it travels to the probe and probes the tool. The mist will be turned on while probing. When the probe is finished it will return to the original position and continue the g-code execution. If the probing was not successful the g-code execution will not continue.

Code: Select all
if (!exec.GetLED(308))                                                          // Mobile wp referenced
{
  exec.AddStatusmessage("The workpiece was not referenced.");
  return;
}

bool wasCycleRunning = exec.GetLED(54);

if (wasCycleRunning)
{
  exec.Stop();
  while(exec.IsMoving()){}
  exec.Code("");
}

int CurrTool = exec.Getcurrenttool();
int NewTool = exec.Getnewtool();

if (NewTool == -1)                                                              // -1 -> there was no T word
{
  exec.AddStatusmessage("There was no T word for the M6.");
  return;
}

string NewToolName = "T" + NewTool;

if (NewTool == CurrTool)
{
  if (wasCycleRunning) exec.Callbutton(128);                                    // Cycle start if it was started
  return;
}

double cpX = exec.GetXmachpos();
double cpY = exec.GetYmachpos();
double cpZ = exec.GetZmachpos();

double cpwZ = exec.GetZpos();

if (!GotoMachPos(tcpX, tcpY, tcpZ)) return;

MessageBox.Show(exec.mainform, "Insert new tool " + NewToolName, "Change tool");
if (exec.Ismacrostopped()) return;

exec.Setcurrenttool(NewTool);
while (exec.IsMoving());

exec.Callbutton(801);                                                           // Tool probe
exec.Callbutton(841);                                                           // Mobile probe
exec.Callbutton(800);                                                           // Quick jump to probe screen

if (!AS3.Getbuttonstate(851)) exec.Callbutton(851);                             // Zero probed axes

exec.Callbutton(848);                                                           // Goto probe pos

exec.Wait(100);
while (exec.IsMoving());
if (exec.Ismacrostopped()) return;

exec.Miston();                                                                  // Turn Mist On

exec.Callbutton(821);                                                           // Start probe
while (!AS3.Getbuttonstate(821) && !exec.Ismacrostopped()) Thread.Sleep(10);
while (AS3.Getbuttonstate(821) && !exec.Ismacrostopped()) Thread.Sleep(10);
exec.Wait(500);
if (exec.Ismacrostopped()) return;

exec.Stopcoolant();                                                             // Turn Mist Off

if (exec.GetLED(300)) return;                                                   // If probe failed then exit (g-code is stopped!)

AS3.selectlayer(2);

if (!GotoMachPos(cpX, cpY, GetMachFromWorkZ(cpwZ))) return;

if (wasCycleRunning) exec.Callbutton(128);                                      // Cycle start if it was started

return;

#Events

const double tcpX = 50;                                                         // Tool change position
const double tcpY = 10;
const double tcpZ = 40;

bool GotoMachPos(double x, double y, double z)
{
  List<string> codelist = new List<string>();                                   //Create a new List of strings.

  double cZ = exec.GetZmachpos();
  double safeZ = AS3.Getfielddouble(2734);                                      // SafeZ
  double moveZ = cZ;

  if (moveZ < safeZ) moveZ = safeZ;
  if (moveZ < z) moveZ = z;
  if (cZ < moveZ)
    codelist.Add("G0 G53 Z" + moveZ.ToString("F6"));
  codelist.Add("G0 G53 X" + x.ToString("F6") + " Y" + y.ToString("F6"));
  codelist.Add("G0 G53 Z" + z.ToString("F6"));

  exec.Codelist(codelist);                                                      //Execute the List of g-codes.
  while (exec.IsMoving());

  return !exec.Ismacrostopped();
}

double GetMachFromWorkZ(double wz)
{
  double g92offset = AS3.Getfielddouble(502);
  double tooloffset = AS3.Getfielddouble(169);
  double workoffset = AS3.Getfielddouble(133 + 6 * (int)(exec.Getactualmodalcode(12) - 54) + 2);
  return (wz + workoffset + g92offset + tooloffset);
}




Thank you Dezsoe! thank you for explaining the reason behind the tab macro needing a double press. it's no big deal.


Without sounding ungrateful, I just added the file and ended up with an error:
UCCNC macro compiler error log file
--------------------------------------
Last error dated: 6/13/2019 9:36:58 PM
In macro: M6
--------------------------------------
CS1056 | in line: 80 | error text: Unexpected character '˜'
--------------------------------------

i had a quick look at the code and couldn't see anything obvious from little I understand, but also line 80 is blank?

Thank you again for your help!

Also, sorry again for bombarding you with questions. Do you have any idea's why the mist turns on but not off using this code for the initial prob?

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.Code("M7"); //Mist On
exec.Callbutton(821); // start probing
exec.Code("M9"); // Mist Off
Karnage
 
Posts: 32
Joined: Sat Nov 10, 2018 12:30 pm

Re: New Probe Screen in Test Release 1.2108

Postby dezsoe » Thu Jun 13, 2019 1:49 pm

Hi Jeremy,

Line 80 is not line 80. :) You have to subtract 9, because the macro text is inserted into a "frame" program and compiled together. So, that is line 71, "AS3.selectlayer(2);". I think, you have a copy-paste error. I attach the macro, so you can download it.

There is something with the M7/M9 calls. I could not figure out yet. I also couldn't switch the mist with M7/M9.
Attachments
M6.txt
(3.72 KiB) Downloaded 923 times
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 » Thu Jun 13, 2019 4:09 pm

Hi Delco,

When you probe the tool it will go back to that position where you pressed the Start probing button. You can set the SafeZ height on the Setup page of the probe screen.

Do you mean to save all the switches and parameters per probe mode? I think it would be confusing for most people. The first idea was to do that way, but it seem to be confusing that you set some parameters and when you switch to another probe mode then you have to set them all again. And if something changes you have to go through all modes.
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 » Thu Jun 13, 2019 8:29 pm

dezsoe wrote:Hi Jeremy,

Line 80 is not line 80. :) You have to subtract 9, because the macro text is inserted into a "frame" program and compiled together. So, that is line 71, "AS3.selectlayer(2);". I think, you have a copy-paste error. I attach the macro, so you can download it.

There is something with the M7/M9 calls. I could not figure out yet. I also couldn't switch the mist with M7/M9.


Thankyou again, it is very much appreciated. The code works perfectly.

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

Re: New Probe Screen in Test Release 1.2108

Postby Delco » Fri Jun 14, 2019 10:29 am

dezsoe wrote:Hi Delco,

When you probe the tool it will go back to that position where you pressed the Start probing button. You can set the SafeZ height on the Setup page of the probe screen.

Do you mean to save all the switches and parameters per probe mode? I think it would be confusing for most people. The first idea was to do that way, but it seem to be confusing that you set some parameters and when you switch to another probe mode then you have to set them all again. And if something changes you have to go through all modes.


I find with my workflow it would be benificial for each probe type to have its own settings saved.
I always have a the guage set at 5.484mm for the probe tool probing Z , when doing a outer corner probe I have a 8mm blank so need the guage value to be 4 mm , I should not need to go in and change the guage value or resect what guage count to use unless I have change my setup , maybe have it set to it keeps the last values entered for each indivdual probe type so next time you come back to it then the parameters are already set correctly.

How do we set probe Dia , it comes up back on my screen


I always jog down before doing a probe , maybe I need to just increase my distance and do the probe from where the tool change position is.

I am enjoying using UCCNC but some things do not seem intuitve yet.
Delco
 
Posts: 364
Joined: Tue Apr 02, 2019 4:23 am

Re: New Probe Screen in Test Release 1.2108

Postby dezsoe » Fri Jun 14, 2019 10:45 am

Hi Delco,

It's the first release of the probe screen. I'm collecting information and making a list of ideas. I put your problem on the list and maybe I can find out something.

The diameter comes from the tool table, but you can override it on the setup page.
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 Delco » Sun Jul 14, 2019 8:24 am

Any updates on the probing in the latest update , so frustrating and made a heap of errors because the values and settings for simple probe and corner probe dont save for each type of probe , go to corner probe and set it up for a 8mm dia probe to use axis count dia , then when going to simple probe top surface I forget to turn off axis count dia back to guage AGHHHHHHHHHHHHHHHHHHHHHHHHHH. a 4 hr job ruined.

Can we please have each probe type save automatically the last used settings on exit.
Delco
 
Posts: 364
Joined: Tue Apr 02, 2019 4:23 am

PreviousNext

Return to General discussion about the UCCNC software

Who is online

Users browsing this forum: No registered users and 21 guests