G29 S1 when no heightmap is present causes startup failure
-
If you try to load a heightmap at the end of config.g and there isn't one yet, the DCS thows the following error and the Duet3 fails to start.
err] Code G29 S1; Load and activate heightmap caused an exception: System.IO.FileNotFoundException: Could not find file '/opt/dsf/sd/sys/heightmap.csv'. ile name: '/opt/dsf/sd/sys/heightmap.csv' at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirectory, Func`2 errorRewriter) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String path, OpenFlags flags, Int32 mode) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) at DuetAPI.Utility.Heightmap.Load(String filename) in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetAPI/Utility/Heightmap.cs:line 72 at DuetControlServer.Codes.GCodes.Process(Code code) in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Codes/GCodes.cs:line 65 at DuetControlServer.Commands.Code.ProcessInternally() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 323 at DuetControlServer.Commands.Code.Process() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 269 at DuetControlServer.Commands.Code.Execute() in /usr/src/3d/dc42/workspace/DuetSoftwareFramework/src/DuetControlServer/Commands/Code.cs:line 204 ``
-
Hi,
You don't need to load the heightmap until you are ready to print.
That doesn't happy until you have homed and set the "Z=0 Datum".
After those are done then you can load the heightmap. Assuming you have created one.
So remove that command from your config.g file
Frederick
-
Yeah my point was that it used to be silently ignored and now throws an exception and prevents the Duet from starting.
-
@gtj0 said in G29 S1 when no heightmap is present causes startup failure:
Yeah my point was that it used to be silently ignored and now throws an exception and prevents the Duet from starting.
I see.
But if you don't have that G29 (which you shouldn't) all is good - correct?
Frederick
-
@fcwilt said in G29 S1 when no heightmap is present causes startup failure:
@gtj0 said in G29 S1 when no heightmap is present causes startup failure:
Yeah my point was that it used to be silently ignored and now throws an exception and prevents the Duet from starting.
I see.
But if you don't have that G29 (which you shouldn't) all is good - correct?
Frederick
Kinda... You get:
Height map loaded from file /opt/dsf/sd/sys/heightmap.csv Error: Command SimpleCode has reported an error: [FileNotFoundException] Could not find file '/opt/dsf/sd/sys/heightmap.csv'.
which should be handled better.
Again, I'm trying to flush out as many RRF3/DSF bugs as I can so that when the first production run of the Duet3 starts rolling out those users will have a better experience.
-
You said in the past the error was "silent".
Perhaps it is better if folks know something went wrong.
Frederick
-
@chrishamm I updated pull request https://github.com/chrishamm/DuetSoftwareFramework/pull/68 to catch IOException and print an error message instead of letting the exception bubble up. Done for
G29 S1
,G29 S3
,M374
andM375
.G29 S1 Error: Could not find file '/opt/dsf/sd/sys/heightmap.csv'.