$10 GRBL Command

Here it is for the 0.9 version

Is the type and format of data it returns when you send a ? command.
Not something you will use much, if at all.

It may effect the software you use to send G-code to the controller? I am not sure.

And here are the grbl $10 settings for 1.0c.

I am currently running 1.1f. So if I follow the information on GitHub then I have three options for this setting; 0,1,2.

Is this correct are these the only settings available? I see many others with settings such as 19 or 115 etc etc. Are those just for previous versions of GRBL?

With 1.1f the only values are 0,1, or 2. The user interface changed significantly with 1.1f

If you run 1.1f you will have to have a G-code sender that has been upgraded to work with 1.1f

Assuming UGS does i am running the platform version

What are you trying to accomplish? The status may look strange because you’ll only see WPos or MPos and never both. The offset coordinates are not included in every report, you use the offset to convert between WPos and MPos.

All those $10 settings do is configure whether the machine coordinates or work coordinates are reported.

The doc for parsing a status report is here: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Interface#real-time-status-reports

The UGS implementation for parsing them is here: https://github.com/winder/Universal-G-Code-Sender/blob/master/ugs-core/src/com/willwinder/universalgcodesender/GrblUtils.java#L294

Thanks WillWinder, Still trying to wrap my mind around this to figure out exactly what it means and does. I understand the difference between Work Position and Machine Position, I just don’t fully understand what this parameter accomplishes.

How Exactly do you access the “Status”? By sending a “?”?
When I do this in UGS it just says OK

What do you mean by “Report”? and why would one need to see this report?

The UGS implementation for Parsing that you provided is over my head at the moment. I will look at it a little closer when I get a chance.

Thank you

You don’t really need to concern yourself with this if you are going to use UGCS.

Just set $10=1

Good to go.

Machine Zero is set when you home your machine.

Work Zero is set when you set the starting point for you carve/laser. Jog to X and Y, Reset X and Reset Y, probe for Z done.

1 Like

When exactly would I use this if I was using another program? would you mind giving me an example?

Two times you might use it.

  1. to debug a low level machine problem
  2. to write a G-code sender

Here is example output from version 1.0c It will be much different for 1.1f, but you can still get the same information if you know how.

<Idle,MPos:0.000,0.000,0.000,WPos:0.000,0.000,0.000,Pin:000|0|0000>

Gives you Machine Position, Work Position, state of the input pins.

1 Like

LIke when I check the Status box in Easel in the Machine Controller?

Is there a way to Decipher the Pin Status from those numbers?

@MichaelGrigg

version 1.1f really complicates things, but here you go.

Status Reporting

When a ? character is sent to Grbl (no additional line feed or carriage return character required), it will immediately respond with something like <Idle,MPos:0.000,0.000,0.000,WPos:0.000,0.000,0.000> to report its state and current position. The ? is always picked-off and removed from the serial receive buffer whenever Grbl detects one. So, these can be sent at any time. Also, to make it a little easier for GUIs to pick up on status reports, they are always encased by <> chevrons.

Developers can use this data to provide an on-screen position digital-read-out (DRO) for the user and/or to show the user a 3D position in a virtual workspace. We recommend querying Grbl for a ? real-time status report at no more than 5Hz. 10Hz may be possible, but at some point, there are diminishing returns and you are taxing Grbl’s CPU more by asking it to generate and send a lot of position data.

Grbl’s status report is fairly simply in organization. It always starts with a word describing the machine state like IDLE (descriptions of these are available elsewhere in the Wiki). The following data values are usually in the order listed below and separated by commas, but may not be in the exact order or printed at all. Report output depends on the user’s $10 status report mask setting.
• MPos:0.000,0.000,0.000 : Machine position listed as X,Y,Z coordinates. Units (mm or inch) depends on $13 Grbl unit reporting setting.
• WPos:0.000,0.000,0.000 : Work position listed as X,Y,Z coordinates. Units (mm or inch) depends on $13 Grbl unit reporting setting.
• Buf:0 : Number of motions queued in Grbl’s planner buffer.
• RX:0 : Number of characters queued in Grbl’s serial RX receive buffer

Input Pin State:

:black_medium_small_square: Pn:XYZPDHRS indicates which input pins Grbl has detected as ‘triggered’.

:black_medium_small_square:Pin state is evaluated every time a status report is generated. All input pin inversions are appropriately applied to determine ‘triggered’ states.

:black_medium_small_square:Each letter of XYZPDHRS denotes a particular ‘triggered’ input pin.
:black_medium_small_square: X Y Z XYZ limit pins, respectively
:black_medium_small_square: P the probe pin.
:black_medium_small_square: D H R S the door, hold, soft-reset, and cycle-start pins, respectively.
:black_medium_small_square:Example: Pn:PZ indicates the probe and z-limit pins are ‘triggered’.
:black_medium_small_square:Note: A may be added in later versions for an A-axis limit pin.

:black_medium_small_square:Assume input pin letters are presented in no particular order.

:black_medium_small_square:One or more ‘triggered’ pin letter(s) will always be present with a Pn: data field.

:black_medium_small_square:This data field will not appear if:
:black_medium_small_square:It is disabled in the config.h file. No $ mask setting available.
:black_medium_small_square:No input pins are detected as triggered.

◦Override Values:

:black_medium_small_square: Ov:100,100,100 indicates current override values in percent of programmed values for feed, rapids, and spindle speed, respectively.

:black_medium_small_square:Override maximum, minimum, and increment sizes are all configurable within config.h. Assume that a user or OEM will alter these based on customized use-cases. Recommend not hard-coding these values into a GUI, but rather just show the actual override values and generic increment buttons.

:black_medium_small_square:Override values don’t change often during a job once set and only requires intermittent refreshing. This data field appears:
:black_medium_small_square:After 10 or 20 (configurable 1-255) status reports, depending on is in a motion state or not.
:black_medium_small_square:If an override value has changed, this data field will appear immediately in the next report. However, if WCO: is present, this data field will be delayed one report.
:black_medium_small_square:In the second report after a reset/power-cycle.

:black_medium_small_square:This data field will not appear if:
:black_medium_small_square:It is disabled in the config.h file. No $ mask setting available.
:black_medium_small_square:The override refresh counter is in-between intermittent reports.
:black_medium_small_square: WCO: exists in current report during refresh. Automatically set to try again on next report.

◦Accessory State:

:black_medium_small_square: A:SFM indicates the current state of accessory machine components, such as the spindle and coolant.

:black_medium_small_square:Due to the new toggle overrides, these machine components may not be running according to the g-code program. This data is provided to ensure the user knows exactly what Grbl is doing at any given time.

:black_medium_small_square:Each letter after A: denotes a particular state. When it appears, the state is enabled. When it does not appear, the state is disabled.
:black_medium_small_square: S indicates spindle is enabled in the CW direction. This does not appear with C .
:black_medium_small_square: C indicates spindle is enabled in the CCW direction. This does not appear with S .
:black_medium_small_square: F indicates flood coolant is enabled.
:black_medium_small_square: M indicates mist coolant is enabled.

:black_medium_small_square:Assume accessory state letters are presented in no particular order.

:black_medium_small_square:This data field appears:

  • When any accessory state is enabled.
  • Only with the override values field in the same message. Any accessory state change will trigger the accessory state and override values fields to be shown on the next report.

:black_medium_small_square:This data field will not appear if:

  • No accessory state is active.
  • It is disabled in the config.h file. No $ mask setting available.
  • If override refresh counter is in-between intermittent reports.
  • WCO: exists in current report during refresh. Automatically set to try again
1 Like

Thank you,

Starting to make sense now.

I noticed that one of the Pins is for the DOOR. How does this input Relate to the Arduino? Does it connect similar to the Limit switches?

The safety door function is a redefinition of feed hold.

In addition to the feed hold command, the spindle/laser will be moved away from the work area and stopped. (The move away function may just be with parking enabled which I don’t know is default at this point.)

When the cycle start function is ivoked the reverse procedure is folowed.

2 Likes

So the Door Alarm sensor will replace the Feed Hold Button?

Think of it more as a shared function. All of the feed hold function is still there. The safety door function is an add on.

But yes, if the safety door option is selected at build time then any low signal on the feed hold input will activate both functions.

That’s where I was going next. You read my mind. :blush:

If I was planning to do so, I assume that I would use a Normally Open sensor on a door? That way when the door is opened, the sensor closes and sends the connections to GND/Low? (Please correct me if any of this is incorrect, I just want to verify that I am following this properly)

Here is how feed hold and cycle start work.

For the safety door (used NO), you would have the switch open when the door is closed. No connection to ground.

When the door opens the switch closes which takes feed hold to ground and the machine stops.

1 Like

Exactly how I thought.

Thank you for your assistance

1 Like