2017 Screenset - Probing Issue

If you created a new screenset and want to share it with others then please post it here. You can talk about screens here.

Re: 2017 Screenset - Probing Issue

Postby spumco » Sun Jan 07, 2018 6:27 pm

Gerry - thanks a ton for the support. Are you going to send out an update email or should I check back here?

I'm happy to test them as much as you want before you release in to the wild.
spumco
 
Posts: 306
Joined: Mon Oct 03, 2016 10:10 pm

Re: 2017 Screenset - Probing Issue

Postby ger21 » Sun Jan 07, 2018 6:43 pm

Shoot me an email, and I'll send them to you first.
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: 2017 Screenset - Probing Issue

Postby dezsoe » Sun Jan 07, 2018 10:33 pm

Gerry,

You can also pack the two lines:

Code: Select all
DistString = String.Format("{0:F6}", DistN); // Convert to String
exec.Code("G0 X" + DistString); // Back away from edge

Into one:

Code: Select all
exec.Code("G0 X" + DistN.ToString("F6")); // Back away from edge
dezsoe
 
Posts: 2049
Joined: Sun Mar 12, 2017 4:41 pm
Location: Csörög, Hungary

Re: 2017 Screenset - Probing Issue

Postby cncdrive » Mon Jan 08, 2018 4:40 am

Yes, Dezsoe is correct.
When you do a "G0 X"+ mynumber code then what happens is the mynumber.ToString(); function is called as it is converted to string and is appended to the "G0 X" string.
The .ToString(); is the default prototpye of the .ToString function, so in this case no parameter is passed to the Tostring function and so no Formatter is used and then the exponent notation format can happen.
But as Dezsoe said you could use the mynumber.Tostring(IFormatProvider); where you pass the format parameter to the Tostring function and so the double number will be formatted to string using the formatter you gave as parameter.
And so you could make the whole code shorter this way.

Another way to shorten down the code is to place a function into the #Events to have a global double to string converter function and that function could do the string conversion and could return the correctly formatted string number.
This way you could also any time modify the conversion function code and if you call the same from everywhere then you can modify it all doing a single modification. Ofcourse modification will be not required, but I thought to mention this advantage also of doing the code this way.

Something like:

#Events
string Fnum(double val)
{
return String.Format("{0:F6}", val);
}

And then in your macro code you could call that function like:

exec.Code("G0 X" + Fnum(DistString));
cncdrive
Site Admin
 
Posts: 4695
Joined: Tue Aug 12, 2014 11:17 pm

Re: 2017 Screenset - Probing Issue

Postby ger21 » Mon Jan 08, 2018 1:49 pm

Thanks for the help, as I'm not a programmer. :oops:
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: 2017 Screenset - Probing Issue

Postby spumco » Mon Jan 29, 2018 4:19 am

Gerry,

I've been using the updated probing routines without issue for a week or two now. Everything is spot-on - thanks again for sorting it all out.

-Ralph
spumco
 
Posts: 306
Joined: Mon Oct 03, 2016 10:10 pm

Re: 2017 Screenset - Probing Issue

Postby ger21 » Mon Jan 29, 2018 11:32 am

Good, then no further changes are necessary?
Gerry
UCCNC 2022 Screenset - http://www.thecncwoodworker.com/2022.html
ger21
 
Posts: 2663
Joined: Sat Sep 03, 2016 2:17 am

Re: 2017 Screenset - Probing Issue

Postby spumco » Mon Jan 29, 2018 10:27 pm

Nope.

What you've got is sorted out. I've run all of them multiple times at different settings and it's good-to-go.

If I could submit a wishlist for future updates:

1. Adjustable retract feed rates. Right now all retracts are at G0. Until UCCNC sets up the S-curve axis acceleration feature, it's a little jerky when I have my rapids cranked up. I've noticed a difference (few tenths to a 'thou) when probing a known distance (1-2-3 blocks) when I have the max axis speed set artificially low vs. normal. Maybe have a single retract feedrate field for all the probing cycles.

2. X only outside boss (to measure stock width), with a Z retract like the X/Y that's already there. Optional to set X0 at left or right edge or center. So probe left edge, set DRO X0, move up to clear, move over specified distance, probe right edge, move up and move back at Z-clearance to right edge. DRO will now read the part width.

3. Y only outside boss (same as above)

4. X/Y outside boss - include the option for setting X and/or Y0 to one of the touches or center. Currently it moves to the center if you have "Auto Zero" enabled, but doesn't if it's unchecked (stays at X right edge).

5. Z height probe cycle in the flyout (similar to the tool length macro, with with optional DRO zeroing. Maybe with the probe tool # in a field so it automatically sets the probe tool length offset before updating the DRO. See my cry for help in the /Macros subfolder.)

Thanks again!

-Ralph
spumco
 
Posts: 306
Joined: Mon Oct 03, 2016 10:10 pm

Previous

Return to Custom Screensets

Who is online

Users browsing this forum: No registered users and 1 guest