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

    Switch JSON data by existing G/M code

    Scheduled Pinned Locked Moved
    Gcode meta commands
    2
    4
    264
    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.
    • jimmychiuundefined
      jimmychiu
      last edited by

      Hi,
      My struct
      arduino <--------> RepRapFirmware <-------->DWC
                        [uart]                                [ethernet]
      If I want to send json command from arduino to DWC, is any RRF's parameter can be stored data by existing G/M code? And DWC get json data by G/M code.

      1 Reply Last reply Reply Quote 0
      • T3P3Tonyundefined
        T3P3Tony administrators
        last edited by

        what is in the JSON object, and what do you want DWC to do with it when it gets it?

        As RepRapFirmware is running on a controller that (probably) has a mass storage device (i.e. SD card). the JSON object could be put there?

        www.duet3d.com

        1 Reply Last reply Reply Quote 0
        • jimmychiuundefined
          jimmychiu
          last edited by jimmychiu

          @T3P3Tony said in Switch JSON data by existing G/M code:

          I have a BLDC Driver which I want to get status and error code to show message by DWC.
          JSON object like { "Current": 1000, "Velocity": 90,"status":"IDLE"}.
          CUZ SD card has write cycles doubts, I will take it as a second consideration.

          1 Reply Last reply Reply Quote 0
          • T3P3Tonyundefined
            T3P3Tony administrators
            last edited by

            When variables are added to the gcode meta commands you will be able to use the arduino to set user variables for those fields and then write a DWC plugin to display them.

            If you wanted to do that before variables are implemented you could either:

            1. hack a work around by using fields that exist in the object model (things like settings for an axis that you did not use and was hidden).
            2. write the file to the SD and and then have your display plugin read the file

            www.duet3d.com

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