Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    conditional gcode with DSF (3.2) error (works standalone)

    Scheduled Pinned Locked Moved Unsolved
    Beta Firmware
    2
    4
    249
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • garyd9undefined
      garyd9
      last edited by

      The following code in my bed.g that I copied from my working standalone configuration is giving me an error with my duet3+SBC running "3.2" on everything:

      if {abs(move.calibration.final.deviation - move.calibration.initial.deviation)} < 0.005
      		break;
      

      The error message is:

      Error: Failed to read code from macro bed.g: Failed to evaluate "{abs(move.calibration.final.deviation - move.calibration.initial.deviation)} < 0.005": unknown value 'abs'
      

      As mentioned, this works perfectly with RRF 3.2 (standalone) on the same duet3 (and worked perfectly with RRF 3.1.1 (standalone.)

      Bug? Oversight? Is there a new/different syntax I should be using?

      Thanks
      Gary

      "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

      1 Reply Last reply Reply Quote 0
      • garyd9undefined
        garyd9
        last edited by

        @Phaedrux, thank you for moving this to the proper place, but I thought that DSF 3.2 was out of beta. It's coming down from apt on the normal channel...

        "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

        Phaedruxundefined 1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator @garyd9
          last edited by

          @garyd9 Just gathering potential issues for 3.3

          Z-Bot CoreXY Build | Thingiverse Profile

          1 Reply Last reply Reply Quote 0
          • garyd9undefined
            garyd9
            last edited by

            I think the problem is that it seems that no conditional gcode functions are implemented at all in DSF 3.2. Sadly, that isn't documented in release notes.

            All of the following fail with a similar message (failed to evaluate 'function_name')

            echo "debug " ^ abs(3)
            echo "debug " ^ max(1,3)
            echo "debug " ^ min(1,3)

            Making the assumption that conditional gcode is evaluated on the SBC (and not sent to the duet3 for evaluation,) I searched in github (https://github.com/Duet3D/DuetSoftwareFramework) for the strings of the function names "atan2", "acos" and "radians" and came up with no search results. (The idea was that if the functions were implemented, there'd be at least one matching string literal in the code.

            "I'm not saying that you are wrong - I'm just trying to fit it into my real world simulated experience."

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA