Welcome to Our Community

Some features disabled for guests. Register Today.

How to check status of grbl command?

Discussion in 'Control Software' started by ZCNC, Oct 3, 2021.

  1. ZCNC

    ZCNC New
    Builder

    Joined:
    Sep 24, 2021
    Messages:
    11
    Likes Received:
    3
    Hello everyone,

    I run a few commands and then close the serial using pySerial after receiving "ok".
    I noticed that if the last command takes too long to complete (e.g from X100 Y100 send G1 F1000 X0 Y0) when the serial closes, it will not finish the travel, will stop in the middle of the path.
    So I realize that "ok" doesn't mean "done" but just queued, I'm thinking of putting a delay before closing but it's not very nice.
    Do you know a way to check if the last command is finished?
    Maybe related to $10... I have $10=1.
    Grbl v1.1

    Thanks
     
    #1 ZCNC, Oct 3, 2021
    Last edited: Oct 3, 2021
  2. ZCNC

    ZCNC New
    Builder

    Joined:
    Sep 24, 2021
    Messages:
    11
    Likes Received:
    3
    I think what i'm looking for is the command "?" (will provide the current position).
    <Idle|MPos:83.276,-57.876,0.000|FS:0,20|Pn:Z|WCO:0.000,-65.000,0.000>okok
    <Run|MPos:83.272,-57.872,0.000|FS:100,0|Pn:Z|Ov:100,100,100>ok
    <Run|MPos:83.260,-57.864,0.000|FS:100,0|Pn:Z>ok
    <Run|MPos:83.244,-57.852,0.000|FS:100,0|Pn:Z>ok
    <Run|MPos:83.232,-57.844,0.000|FS:100,0|Pn:Z>ok
     
    #2 ZCNC, Oct 3, 2021
    Last edited: Oct 3, 2021
  3. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    14,021
    Likes Received:
    4,118
    Watching the status field: wait for IDLE :)
     
  4. David the swarfer

    David the swarfer OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Aug 6, 2013
    Messages:
    3,276
    Likes Received:
    1,833
  5. ZCNC

    ZCNC New
    Builder

    Joined:
    Sep 24, 2021
    Messages:
    11
    Likes Received:
    3
    Yeah it's what i did but not too easy to find quickly what you are looking for, even with the search bar which i just recently notice, probably used a bad key word...
    @Peter Van Der Walt i did not make difference between Run and Idle, i was watching only MPos:0.000,0.000,0.000 or FS:0,0. I'll add that condition.
    Thanks
     
    Peter Van Der Walt likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice