cmds

gerbil. cmds

Source:

Methods

(static) machineStatus() → {promise(object)}

Retrieve the current machine status using ?. Not all values are guaranteed to be present.

Source:
Returns:
Type:
promise(object)

current machine status as object

{
  Status: 'Idle',
  MPos: { x: 0, y: 0, z: 0 },
  Buffer: { planner: 15, rx: 128 },
  Speeds: { feed: 0, spindle: 0 }
}

(static) settings(settingsopt) → {promise(object)}

Wraps Grbl's $$ and $x=val commands, used to retrieve and configure machine settings. Call without any arguments to retrieve current settings as an object. Call with an object in the same format to set settings. See example for more details.

Source:
Parameters:
Name Type Attributes Description
settings object <optional>
Returns:
Type:
promise(object)
Example
//set pulse width to 10μs
gerbil.cmds.settings({'$0': '10'})

//retrieve settings
gerbil.cmds.settings().then(console.log)

> {
  '$0': '10',
  '$1': '25',
  '$2': '0',
  '$3': '4',
  '$4': '0',
  ...
}