🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Status and Limit Switches on GRBL 13.2 M035 Model

    Scheduled Pinned Locked Moved Modules
    2 Posts 1 Posters 1.1k Views
    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.
    • I Offline
      ispybadguys
      last edited by

      I am trying to read the limit switches and other configuration data from the module using the Module_GRBL_13.2.h library. I wrote a simple script to read commands from Serial and write them to the module with driver.sendGcode(cmdBuffer); I then read the response with driver.readLine() return some info that looks like a mixture of corrupted plus valid data. If I use driver.readStatus() I only get "IDLE" or "BUSY" back. Here is a example of what I get after sending a command:
      Sending command: ?
      Raw response.length() 134 response=<Idle,MPos3�o�!�?��?:0.000,0.03�o�!�?��?00,0.000,W3�o�!�?��?Pos:0.000,3�o�!�?��?0.000,0.003�o�!�?��?0>

      Sending command: $$
      Raw response.length() 271 response=$0=80.000 3�o�!�?��?(x, step/m3�o�!�?��?m)
      $1=80.3�o�!�?��?000 (y, st3�o�!�?��?ep/mm)
      $23�o�!�?��?=80.000 (z3�o�!�?��?, step/mm)3�o�!�?��?
      $3=10 (s3�o�!�?��?tep pulse,3�o�!�?��? usec)
      $43�o�!�?��?=250.000 (3�o�!�?��?default fe3�o�!�?��?ed, mm/

      I happen to have two modules stacked in the Core2 AWS and both 70 and 71 do this.

      Any help appreciated.

      Kurt

      1 Reply Last reply Reply Quote 0
      • I Offline
        ispybadguys
        last edited by

        I have determined that this is a problem in the library. Probably a buffer overrun. It reads exactly 10 bytes at a time, always, and uses a fixed-length buffer (char data;). If more data is pending, it might clobber/lose lines. Almost all I2C read code in the library cannot cope with variable-length GRBL output. I am rewriting those parts of the library.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post