Page 3 of 4

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 4:18 pm
by ger21
Does it need to be converted to a string?
Can I just use:

Code: Select all
double mynumber = Format("{0:F6}", originalnumber);
exec.Code("G0 X" + mynumber);


Or does it need to be:

Code: Select all
string mynumber = String.Format("{0:F6}", originalnumber);
exec.Code("G0 X" + mynumber);

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 4:33 pm
by cncdrive
The first example you wrote will not even work, because the String.Format function always returns a string. All function overloads' return type is string.
And it would not even make sense to return a double, because a double is represented with a fixed format, you can't format how a double number is represented in a double type. How it's formatted is fixed and is defined in the "IEEE Standard for Binary Floating-Point Arithmetic" which standard is available on the IEEE website somewhere.
What you can format is how the double number is printed into a string. What you format is the string which contains the number.

So, you have to do the second code which you wrote.

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 4:35 pm
by spumco
Had to finally get some sleep - I'm up now and am happy to try anything you all come up with.

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 4:37 pm
by ger21
Thanks.

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 4:43 pm
by ger21
Try this and see if it works.
(Note that I haven't tested it. Way too cold outside :shock: )

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 5:05 pm
by spumco
Crashed on second test.

X+ was fine, X- was fine. Return to center before the Y+ resulted in an X+ crash in to the right pocket wall.

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 5:11 pm
by ger21
I had a feeling the return to center would cause the crash as well.
It appears that Balazs found the problem.

Give me a few more minutes and I'll fix the move to center issue.

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 5:18 pm
by ger21
OK, Try this one.

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 6:16 pm
by spumco
That last one is the ticket. 10x internal pocket cycles and no crashes. Even bumped the rapids to 200IPM and probing speed up to 40/2IPM and good to go.

I'm guessing the same fixes need to happen on the other probing macros?

Re: 2017 Screenset - Probing Issue

PostPosted: Sun Jan 07, 2018 6:20 pm
by ger21
Yes, I need to go through them all.
I'll get started later this evening. Might be a day or three.