Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login
    1. Home
    2. Otso
    • Profile
    • Following 0
    • Followers 0
    • Topics 7
    • Posts 47
    • Best 10
    • Controversial 1
    • Groups 0

    Otso

    @Otso

    10
    Reputation
    6
    Profile views
    47
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Otso Unfollow Follow

    Best posts made by Otso

    • Source for GCode documentation

      Is the GCode documentation at https://docs.duet3d.com/en/User_manual/Reference/Gcodes generated from some other file, for example a "cleaner" XML file?

      The reason I'm asking is that I would like to embed the documentation in a Duet control application I'm making. For example, the app has a command line and I want to show the relevant GCode command documentation when the users starts typing that GCode. I also want to filter out all GCodes that are not relevant for my use case (a CNC machine, so I don't for example need any documentation for GCodes that are strictly for 3D printing).

      Of course I can scrape the web page, but it would be easier if there was a less cluttered source file that I could use.

      Finally, some very subjective feedback on the web page: I find it annoying that the page scrolls to the location when clicking a GCode in the index on the left navigation bar instead of directly jumping to the location. This makes browsing the GCodes slower since you have to wait for the scrolling, and I also find it distracting. I don't see any benefit of the scrolling.

      posted in General Discussion
      Otsoundefined
      Otso
    • RE: Enable laser without moving

      @oliof said in Enable laser without moving:

      @chimaeragh you could even put macros called M3.g / M5.g into /sys ... add a parameter to M3 and you can control the PWM when calling M3. That said I see no reference to M3/M5 being disabled in RRF. Did you enable laser mode?

      https://docs.duet3d.com/User_manual/Reference/Gcodes#m452-select-laser-device-mode:
      "M3 and M5 no longer turn the laser on and off; use G1 Snn moves to control laser power."

      posted in Laser Cutters
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      Yes, this can be a pretty dangerous bug. I’m using firmware 3.4 and haven’t checked if it has been fixed.

      I just tested with my laser and M42 S1 (no fraction) sets it at full power and not at 1/255 as one would expect from the documentation.

      Either the code or the documentation needs to be fixed.

      Personally I think this should be fixed in the code, especially if it is for backwards compatibility, where one can assume that “S1” previously set it at 1/255 of the power and since the introduction of fractions that changed it to full power.

      With the firmware 3.4 implementation the documentation should say:

      The S field may be in the range 0..1 or 2..255.

      It should be noted that apparently values like 5.76 will probably also work, and be converted to 5.76/255. So the documentation could clarify that fractions are accepted, and the correct documentation would actually be:

      The S field may be in the range [0,1] or ]1,255].

      With further noting that the notation for the 1..255 range means any fractional value above, but not including, 1.

      posted in Documentation
      Otsoundefined
      Otso
    • No G-code command to return files like GET /rr_filelist ?

      I'm making a desktop app to control the Duet 2 WiFi for CNC use (WorkBee). I do all communication over telnet, except for listing files on the SD card for which I use HTTP. The reason is that GET /rr_filelist returns the information in a convenient format. I know there is M20 S2, but that is not as convenient, since it doesn't return files size or creation time, so I would have to make an additional call with M36 to get the details (all I care about is file size and date). On top of that, I can't find a way to get directory create time with any G-code, as M36 on a directory gives an error.

      My questions are:

      • Is there a way to get the same information as GET /rr_filelist over telnet/G-code, in case I have missed it?
      • If not, any plans to add it?
      • Is there any way to get directory create time over telnet/G-code?

      (Using a desktop app makes my workflow much easier, since no mouse clicking is needed, and I generally find usability to be better. This makes more of a difference for CNC use -- as opposed to 3D printing -- as you manually move the router around a lot more than with 3D printing, probing corners etc. My app is already usable, but still work in progress.)

      duetapp.jpg

      posted in General Discussion
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @fcwilt said in Unclear interval in M42:

      Question: where are you seeing this 0 to 254?

      https://docs.duet3d.com/User_manual/Reference/Gcodes G1 documentation says:

      RRF 3, G0/G1 S parameter AFTER M452 Laser Mode.
      S parameter sets laser power with range of 0 to 254.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Python script send Gcode to duet 3 failed

      @kaguya Hi, you must add a newline character before the command will be processed. Try command = "M106 S128\n".

      posted in General Discussion
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @fcwilt said in Unclear interval in M42:

      Yes, in practice it works. After all how many times are folks going to specify a PWM value of 1 out of the range 0 to 255.

      For example, if I use an application that converts a gray scale image to laser power, then some light pixels could map to 1 and cause the laser to blast out full power.

      Or if you manually enable the laser at a very low level to set the laser focus or to line up the zero point. (I've been using S0.0001, but I could just as well have started with 1 and expecting it to be low power). Of course, you would notice the problem immediately and shut it down, but still, I don't like this I think it should be fixed.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @gloomyandy said in Unclear interval in M42:

      @gloomyandy Going back to the problem with M42, remember it is used to control things other than laser output (it sets a general pwm level). I suppose a possible fix might be to add a parameter to the M950 used to create the pin and allow that to specify what the range is that will be used by M42. At least that's the best I can come up with that would probably still allow most things to work as they do today.

      I'd expect it to work like @fcwilt assumed it worked (and I did too), and that the code would check if it is "1" or "1.", and make the decision based on that. I think that wouldn't break anything, and would retain best backwards compatibility because that was how "1" was interpreted before fractions were introduced, and I'd assume those using fractions now will use 1.0 for full width pulse.

      The quick and simple fix would be to mention this is the manual, just as a caution if nothing else.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      And the G1 documentation should be updated to say that the max value for S is defined by M452, which defaults to 255.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @gloomyandy said in Unclear interval in M42:

      @Otso How do you propose fixing it without causing other problems with existing gcode/slicers/etc?

      Just clarifying the documentation would be sufficient for me.

      But like I said above, I think it already introduced potential problems when the meaning of value of "1" was changed with the introduction of fractions. But again, I'm not asking for a code change, just a documentation fix.

      posted in Documentation
      Otsoundefined
      Otso

    Latest posts made by Otso

    • RE: CrcAppender on ARM Mac

      This is not a problem for me personally anymore. I built an osx-arm64 CrcAppender for myself, and everything works now.

      posted in DSF Development
      Otsoundefined
      Otso
    • RE: CrcAppender on ARM Mac

      @droftarts said in CrcAppender on ARM Mac:

      I don't know if this was a bug in Eclipse, but this was the only way I could work around it, as outlined in steps 3 and 4 of the build instructions. Let me know if this solves your problem.

      It's not a bug. /usr/local/bin is not in the PATH:
      Screenshot 2023-10-31 at 20.22.05.png
      If you add /usr/local/bin to the PATH here, then you don't have to start Eclipse from the terminal (to get the shell's PATH environment variable), and it will find CrcAppender.

      But, above when I got the error, I did exactly as instructed in step 3 and 4.

      posted in DSF Development
      Otsoundefined
      Otso
    • RE: CrcAppender on ARM Mac

      @droftarts Thanks for your reply. I did step 3 and 4, and still get the same runtime error when building from Eclipse:

      19:52:46 **** Incremental Build of configuration Duet2 for project RepRapFirmware ****
      make -j9 all 
      Building target: Duet2CombinedFirmware.elf
      Invoking: Cross G++ Linker
      Finished building target: Duet2CombinedFirmware.elf
       
      Generating binary file
      arm-none-eabi-objcopy -O binary ".../RepRapFirmware/Duet2/Duet2CombinedFirmware.elf" ".../RepRapFirmware/Duet2/Duet2CombinedFirmware.bin" && CrcAppender ".../RepRapFirmware/Duet2/Duet2CombinedFirmware.bin"
      A fatal error occurred. The required library libhostfxr.dylib could not be found.
      If this is a self-contained application, that library should exist in [/usr/local/bin/].
      If this is a framework-dependent application, install the runtime in the global location [/usr/local/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet].
      
      The .NET runtime can be found at:
        - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=osx.14-x64&apphost_version=6.0.5
      make[1]: [post-build] Error 131 (ignored)
      

      Are you running on an Arm Mac? Are you sure you don't have the .NET framework installed (perhaps indirectly as a dependency from something else), or libhostfxr.dylib in your library path?

      Edit: The CrcAppender page says:

      In order to use the standalone files, the .NET Runtime must be installed.

      which seems to be true.

      posted in DSF Development
      Otsoundefined
      Otso
    • RE: CrcAppender on ARM Mac

      I should probably update the to the title to "Building on (Arm) Mac".

      Some additional minor documentation feedback https://github.com/Duet3D/RepRapFirmware/wiki/Building-RepRapFirmware for building on the Mac:

      • Step 5: When building newer firmwares one should also import CANlib and DuetWifiSocketServer to Eclipse
      • Step 6: To be fair, this step mentions with regards to the above:

      See the instructions for Windows (above), step 12, for the dependencies and configurations needed.

      but I believe the correct step is 11.

      posted in DSF Development
      Otsoundefined
      Otso
    • CrcAppender on ARM Mac

      I'm looking into building the firmware on an M2 Mac.

      https://github.com/Duet3D/RepRapFirmware/wiki/Building-RepRapFirmware says:

      Building RepRapFirmware lately requires a tool called crc32appender to be in the user's PATH as it will be called at the end of the compilating process. It can be found as Golang source code in Tools/crc32appender together with pre-compiled binaries for Windows, Linux and MacOS x86-64.

      Apparently this has been replaced with a dotnet version that is located here: https://github.com/Duet3D/CrcAppender so the documentation could be updated to indicate that newer firmwares use a different version and the location of the source code.

      I tried to run the Mac x86 version on my M2 Mac, and it executes using Rosetta, but I get the error:

      A fatal error occurred. The required library libhostfxr.dylib could not be found.
      If this is a self-contained application, that library should exist in [...RepRapFirmware/Tools/CrcAppender/macos-x86_64/].
      If this is a framework-dependent application, install the runtime in the global location [/usr/local/share/dotnet] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet].
      
      The .NET runtime can be found at:
        - https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=x64&rid=osx.14-x64&apphost_version=6.0.5
      

      Before I install dotnet, I just want to make sure, do I need to install it, or is the library libhostfxr.dylib available, or do I have some other problem?

      (A prebuilt native ARM binary would be nice, although Rosetta is fine, or then one can of course compile it oneself.)

      Edit: Reading https://github.com/Duet3D/CrcAppender, I see that it should be possible to make a standalone CrcAppender:

      dotnet publish -r osx-x64 -p:PublishSingleFile=true --self-contained false
      

      This will generate a standalone application without additional runtime files. See here for a full list of runtime identifiers.

      So is the binary in the 3.5-dev branch supposed to be standalone, but is not?

      Edit again:

      I know nothing about dotnet, but just reading about it I found this:

      Standalone Deployment:
      When you create a standalone deployment, your application relies on the presence of the .NET runtime on the target machine. It means the target machine must have the necessary version of the .NET runtime installed in order to run the application. This is similar to how traditional .NET Framework applications have functioned.

      Self-contained Deployment:
      In contrast, when you create a self-contained deployment, you package the .NET runtime and the libraries that your application needs along with your application. This allows your application to be deployed and run on machines that do not have the .NET runtime installed. Self-contained deployments are larger in size compared to standalone deployments, as they include the necessary components for the application to run independently.

      So apparently I need to install the .NET runtime. A self-contained binary would be really nice, but I'll go ahead install the x86 runtime for now. The requirement could be reflected in the building instructions.

      posted in DSF Development
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @droftarts Please update G1 documentation too to say that the max value for S is defined by M452, which defaults to 255.

      I may continue the M3 discussion elsewhere.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @droftarts said in Unclear interval in M42:

      Thanks for highlighting this. I’ll check with @dc42 whether it’s a documentation and/or firmware change.

      Ian

      If you are referring to my sarcastic complaint about M3 😉 , then I asked about it here quite some time ago:

      https://forum.duet3d.com/topic/27718/enable-laser-without-moving

      I.e, it was a deliberate firmware change for some reason and is documented in M543:

      M3 and M5 no longer turn the laser on and off; use G1 Snn moves to control laser power.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @gloomyandy said in Unclear interval in M42:

      @Otso How do you propose fixing it without causing other problems with existing gcode/slicers/etc?

      My snarky reply would be that you have the existing programs update accordingly, like I had to do in multiple places when M3 didn’t turn on the laser anymore. 😉 This affected both controlled moves and laser focusing/aligning. I still can’t understand why the support for that was removed as removing the support just removed it without adding anything that made it worthwhile, AFAIK. But’s that another topic, that doesn’t belong here.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      And the G1 documentation should be updated to say that the max value for S is defined by M452, which defaults to 255.

      posted in Documentation
      Otsoundefined
      Otso
    • RE: Unclear interval in M42

      @gloomyandy said in Unclear interval in M42:

      @Otso How do you propose fixing it without causing other problems with existing gcode/slicers/etc?

      Just clarifying the documentation would be sufficient for me.

      But like I said above, I think it already introduced potential problems when the meaning of value of "1" was changed with the introduction of fractions. But again, I'm not asking for a code change, just a documentation fix.

      posted in Documentation
      Otsoundefined
      Otso