Probably bug in dimension calculation

More
05 Jan 2016 16:25 - 05 Jan 2016 16:28 #67931 by Andreas.Schafferloh
Hi everybody,

today I found a curriosity which is probably a bug. At the beginning of the program linuxcnc calculates the dimensions of the job and if it is too large it gives a warning that some dimensions will be exceeded. There seems to be now a problem when you do automatic probing that the G38.2 will be always added at the worst.

Example:
  • My machine is in Z-dimension from -135 to 0 (-135 at the bottom and 0 at the top)
  • I do a lot of movements at Z0 (save position to go over any workpiece)
  • My workpiece is very flat and is only 7 mm high + some more milimeters for the workplate. => So I use almost the full 135 mms but still in rage
  • But I also do automatic probing and use the command "G38.2 Z-40 f[#<_TravelFeed>] in combination with some Z-Layer adjustments" => This adds 40 more milimeters to the dimensions and therefore gives me warnings about the job size. But I do this probing of course not below the machine but somewhere at -65 mms
  • . So in fact it is just a probing between -65 and -95 millimeters.

Concrete example:
LinuxCNC gives me for the attached test files the following dimensions Z = -142.9mm to 0mm. If I change the parameter in the O100 file it corresponds linear with the job size.
Note 1: Test.ngc is the main file. It just mills three lines and before each line it asks for a new tool. After inserting the tool the tool is measured and the z-layer adjusted.
Note 2: Theory and reality: I can ignore the warning that the job size is too large and really mill the test file with no problems.

PS: The past weeks I spent a lot of time with the beaglebone but gave up for now. The differences are just to big to quickly get into this. I'm now with the original B)

Cheers
Andreas
Attachments:
Last edit: 05 Jan 2016 16:28 by Andreas.Schafferloh.

Please Log in or Create an account to join the conversation.

More
06 Jan 2016 10:29 #67957 by andypugh
It isn't so much a bug as a problem with what Axis knows at the time that it runs the preview.

Note that not all GUIs even do the preview.

Axis does a dummy-run through the code, but can't possibly know what the result of a probe operation will be when doing the dummy-run.

You should be able to choose to run the code anyway.

You can stop the Axis preview with some "magic comments":
linuxcnc.org/docs/2.7/html/gui/axis.html#axis:preview-control

Alternatively you can wrap your probe command in an IF / ELSE based on the value of the #<_task> parameter to return a fixed value from the probe move in the preview run
linuxcnc.org/docs/2.7/html/gcode/overview.html#gcode:parameters
The following user(s) said Thank You: Andreas.Schafferloh

Please Log in or Create an account to join the conversation.

More
06 Jan 2016 18:53 #67979 by Andreas.Schafferloh
Well, after some hours of testing I got now some ideas what is going on:
  • - Let's say we start at position 0 (file 0100 => G53 G0 Z0)
  • - We go down -65 to position above the tool length sensor (file o100 => G53 G0 Z[#<_ProbeZ>])
  • - We go -max- down further -40 (o100 => G38.2 Z-40 f[#<_TravelFeed>])
  • - And we set then the z layer to probe hight of 40.8 (file o100 => G10 L20 P0 Z[#<_Probe_height>])
Until here it could be in theory that we are at 0 + -65 + -40 + -40.8 = -145.8

Checking now the main program we go not deeper than +2.9 (file test.ngc => N000750 G1 Z2.9000 F400.0)
And we get now the magic 142.9 (= -145.8 + 2.9).

Andy, thanks for the good hint with the "but can't possibly know what the result of a probe operation will be when doing the dummy-run." I took this one in account and implemented after the G38.2 (which is going downwards) also an "G38.4 Z0".
The Z0 will be of course not reached but is just an indicator in which direction the probing should be done but Axis takes this one as "real Z0" again. So basically it ignores the calucaltions for the probing.

Please Log in or Create an account to join the conversation.

More
06 Jan 2016 19:44 #67981 by andypugh
Yes, I think you have to either ignore the warning or explicitly say:

If [we are actually running the machine]
#<Probe> = #5450
Else
#<Probe> = 2.9.

Please Log in or Create an account to join the conversation.

Time to create page: 0.154 seconds
Powered by Kunena Forum