DRO for Requested tool

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

Re: DRO for Requested tool

Postby dezsoe » Thu May 10, 2018 1:21 pm

You can find it in:

Code: Select all
int NewTool = exec.Getnewtool();

If it is -1 then M6 was called without T parameter. You can copy it to a user DRO, if needed.
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: DRO for Requested tool

Postby kig23 » Thu May 10, 2018 5:13 pm

Hi Terry, i don't think you need a macroloop. Just use something like this :
Code: Select all
int newTool = exec.Getnewtool();
if (!exec.Ismacrostoped())
{
   AS3.Setfield (Conver.ToDouble(newTool), int fieldnumber);
   AS3.Validatefield(int fieldnumber);
}
else
{
   return;
}


in M6 macro to update the user DRO value every time you use M6 command.
Last edited by kig23 on Thu May 10, 2018 5:27 pm, edited 1 time in total.
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: DRO for Requested tool

Postby dezsoe » Thu May 10, 2018 5:46 pm

If you have a prestage macro, why don't you give a parameter to it?

Code: Select all
M66 P<tool>
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: DRO for Requested tool

Postby kig23 » Thu May 10, 2018 5:57 pm

You can create a custom LoadFile button that executes a macro. Inside the macro :
1. First read the file to by loaded and get all prestage tools values (M66 ( Prestage Tool)) in order, then create an array or you can use uccnc user variables to store that data.
2. Load the file.
and you have all prestage tools values in advance. Maybe i'm missing something, It's just an idea.
Last edited by kig23 on Thu May 10, 2018 5:59 pm, edited 1 time in total.
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy

Re: DRO for Requested tool

Postby dezsoe » Thu May 10, 2018 5:58 pm

I made a quick test, and M66 can use the Getnewtool() function, so the example g-code that you wrote works!

Code: Select all
// M66
int NewTool = exec.Getnewtool(); // -1 -> nem volt T!
string NewToolName =
  "T" + NewTool + " " + ((NewTool > 0) ? exec.Readkey("Tooltablevalues", "Description" + NewTool.ToString(), "") : "No tool");
if (NewToolName == "") NewToolName = "T" + NewTool + "?";
AS3.Additemtolistbeginning("Insert " + NewToolName, 2);
dezsoe
 
Posts: 2093
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: DRO for Requested tool

Postby kig23 » Fri May 11, 2018 9:46 am

Vmax549 wrote:Yes I can program UCCNC to provide it but I should not have to as then it only works for me in this application. It does nothing for other users that could use it as well.


Hi Terry,
i appreciate your desire to help others, but you can write a macro with your solution and then post it. This way the people can use it and if they need can make some changes. Maybe i'm wrong but UCCNC gives you all the tools that you need to implement this method. Am i missing something?
kig23
 
Posts: 161
Joined: Sat Mar 31, 2018 6:58 am
Location: Italy


Return to Ask a question from support here

Who is online

Users browsing this forum: Bing [Bot] and 25 guests

cron