Page 10 of 10

Re: Basic XY Screw Mapping - Geo Table

Posted: Sat Apr 09, 2022 3:01 pm
by TomKerekes
Again that is a classic problem with floating point math you must always assume things wont be exact. 48.8/0.1 may result in something like 487.9999999999999 if you simply convert this to integer the result will be 487. If you add 0.5 to round off or even add 0.000000001 the result will then be 488.

Re: Basic XY Screw Mapping - Geo Table

Posted: Mon Apr 11, 2022 12:06 am
by MadTooler
Thanks again, Tom.

I found you were hiding a nugget from me. Probably just getting a laugh out of my floundering ;) I cleaned up my int error rounding and used your RoundToReasonable() for comparisons of doubles. Now it is better.

I attached the affected c programs in case anyone ever wants them.

Re: Basic XY Screw Mapping - Geo Table

Posted: Tue May 24, 2022 9:08 pm
by MadTooler

The machine has been collecting dust for a handful of weeks waiting for me to finish my mapping process and some sweet spot temperate days.

I am finishing up installing upgraded limit switches and cleaning out a few more cobwebs then should be running all the of programs to capture the map this week.

While running my check program earlier (where it pulls measurements with the map applied), I had a very nasty jump. I happened to be standing at the machine while it was approaching 42.2 or 42.3 I think (see attached). The machine jumped and actually lost position at both the scale and encoder, but did not have a follow error. I want to say there was a very nasty power spike/noise as I was taking a picture at the same time and the jump occurred and what I thought was my flash on the camera may have been a quick surge or a strong flash from the overhead failing fluorescent ballast. I have not seen any other issues like this, but it does put the fear in me that I have some bad math hidden somewhere that will bite me hard when I am machining. Although, I did have another mapping sequence stop due to a follow error.

If you get a chance, could you take a gander at my last posted kinematic to see if there is anything that stands out to you that could possibly cause some extreme jumps?

Thank you.

Re: Basic XY Screw Mapping - Geo Table

Posted: Tue May 24, 2022 11:28 pm
by TomKerekes
I don't see anything obvious.

You might test it moving outside of the range of the table to verify that code works properly.

What is your max following error set at?

Re: Basic XY Screw Mapping - Geo Table

Posted: Wed May 25, 2022 2:33 am
by MadTooler
Thank you for taking a look.

Past tests worked well with before and beyond the map range. I tested it under its development with varying scenarios and it seemed good. I have not tested it lately since I am mapping the full length.

My MaxFollowingError=1000
30,000 encoder steps/inch
Max position error at max follow error would be 1000/30000=0.0333"
From what was recorded at 0.1" increments in my check file, looks like the instant error was within the max follow error, but I assume the control loop brings the position back constantly to the intended position so the maintained error seems weird to me.

The only reason my max follow error is as high as it is because of older mystery spikes in the encoder signals. I use to see rare but occasional 100 step instant spikes. Lots of grounding issues taken care of since, and a bad transformer at the pole by the electric company. Not sure if it has started up again, if so, time to change all the moving wires and e-carriers after almost 30 years of moderate use.

edit: why I initially posted X values and init values when my data was for Y is beyond dumb. Sometimes I unexpectedly broaden my abilities to be an idiot.

I fixed the values above and attached is my full init. Note Homing sets the values for soft limits.