Best method of saving tool pocket content

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Re: Best method of saving tool pocket content

Postby Battwell » Tue Oct 31, 2017 3:24 pm

IMG_3642.JPG
IMG_3642.JPG (29.71 KiB) Viewed 15526 times

added a tool rack disply- of the simplest form to the main run screen.

havnt tried it- but il play with writekey.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 827
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Best method of saving tool pocket content

Postby Robertspark » Tue Oct 31, 2017 6:45 pm

With the imminent arrival of g41+g42 to uccnc will the present single value tooltable not have to change?

That being said are we able to have a peek at what is proposed?

I suspect that tool diameter is essential, however, would there not be some merit in adding two position geometry for lathe X+Z....

Maybe "H" should become Z for turning, then it's only one other parameter required?

_________

Thought I'd ask so no one is wasting their time if something is being done by cncdrive or others

(Progress made collaboratively... same distance traveled, but less waste)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Best method of saving tool pocket content

Postby ger21 » Tue Oct 31, 2017 7:12 pm

Based on CNC Drive's response the other day, it doesn't look like you're going to see any Lathe features any time soon.

But I wouldn't mind seeing a preview of the G42/G42 feature.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Best method of saving tool pocket content

Postby Robertspark » Tue Oct 31, 2017 7:18 pm

ger21 wrote:Based on CNC Drive's response the other day, it doesn't look like you're going to see any Lathe features any time soon.


Yes, I agree.

But g41+42 are supposed to be in development (for mill router and plasma) and I would have thought you'd need tool diameter.

Tool table already has tool length, so for lathe we may be able to reuse these assigned codes for other X Z tool geometry offsets.

Hence cncdrive have to create additional fields for the tooltable, why not wait for them to become available and look to reuse them for your own purpose (avoids having to do major screenshot edit the tooltable and macro write to the profile)
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Best method of saving tool pocket content

Postby Battwell » Tue Oct 31, 2017 7:27 pm

strings, integers, doubles- are doing my head in! lol
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 827
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Best method of saving tool pocket content

Postby Robertspark » Tue Oct 31, 2017 7:37 pm

I know that it is frowned upon in the land of c#, but I use my own form of Hungarian notation

It allows me to keep track of what the variables are to make sure I am using the same types together or convert them at the right time.

str ... String
int ... Integer
dbl ... Double
fcn ... Function

Whatever works for you...

Use notepad++, and keep the errorlog file open so when you edit a macro (or macro loop) and run it you flip back to notepad and it will tell you if there is an error by taking you to the changed errorlog file
Robertspark
 
Posts: 1892
Joined: Sat Sep 03, 2016 4:27 pm

Re: Best method of saving tool pocket content

Postby Battwell » Tue Oct 31, 2017 8:59 pm

How do you convert a string to a double
Using readkey gives me a string
But I need to write it with setfield as a double
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 827
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Best method of saving tool pocket content

Postby Battwell » Tue Oct 31, 2017 9:24 pm

I have worked out most of what I need and tested in a macro
Just stumped on this last bit
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 827
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: Best method of saving tool pocket content

Postby ger21 » Tue Oct 31, 2017 9:36 pm

Convert.ToDouble(string)

So something like this:

double NewKey = Convert.ToDouble(keystring)
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2671
Joined: Sat Sep 03, 2016 2:17 am

Re: Best method of saving tool pocket content

Postby Dan911 » Tue Oct 31, 2017 9:52 pm

Hey Barttwell,

I created a simple plugin for a friend a while back similar to your needs, I just modified it a bit. It will save tool and pocket # to your .pro file. You would just have to modify your M6 to read from your .pro. Example below is tool3 and what ever you set your pocket to.

UC.Readkey("ATC Setup", "Tool3pocket", "");


To test drop it in plugin folder check "start up" and "enable". Use configure to set up

Hope you can find this of some use,

Dan

EDIT- And yes I' m a idiot and spelled compression wrong, I'm lost without spell check...lol

UCCNC.JPG
Last edited by Dan911 on Tue Oct 31, 2017 10:18 pm, edited 2 times in total.
Dan911
 
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

PreviousNext

Return to Macros

Who is online

Users browsing this forum: No registered users and 4 guests