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

    global variables fail if they contain '_'

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    2
    168
    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.
    • achrnundefined
      achrn
      last edited by

      Global variables don't seem to work on my machine if the variable name is defined containing a '_' (but work otherwise).
      Board: Duet 3 MB6HC (MB6HC)
      DSF Version: 3.3.0
      Firmware: RepRapFirmware for Duet 3 MB6HC 3.3 (2021-06-15)

      This (in the end of my config.g) fails:

      ; test variables
      global noz_t = -1
      set global.noz_t = 99
      echo global.noz_t
      

      Gives me "Error: expected '=' in line 121 of config.g", line 121 being the 'global noz_t = -1'

      However, this instead works fine:

      ; test variables
      global nozt = -1
      set global.nozt = 99
      echo global.nozt
      

      910f74f1-1c2e-43ca-a62f-97953939e764-image.png

      https://duet3d.dozuki.com/Wiki/GCode_Meta_Commands#Section_Variable_naming says that "The remaining characters must be letters, digits or the underscore character", but that doesn't seem to be the case.

      fcwiltundefined 1 Reply Last reply Reply Quote 0
      • fcwiltundefined
        fcwilt @achrn
        last edited by

        @achrn

        Currently there is a problem with using the underscore character when running in "SBC" mode.

        The developers are aware of the problem and it should be fixed when 3.4 is released.

        Frederick

        Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

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