Skip to content
Tomas Mudrunka edited this page Jan 3, 2019 · 14 revisions

bCNC allow to use python inside gCode. Proceed a line with the % symbol and the line will be evaluated by the sender.

There are some special directives:

  • %wait : empty and wait the grbl buffer. It will pauses the internal sender until all commands up to this point are completed, grbl return "ok" and the Rx grbl buffer is empty.
  • %if running : executed only when code is streamed to grbl. Not during editing.
  • %msg :
  • %update :
  • %import os; os.system("xterm")
  • %print("hello world")
  • #nnn : access to internal variables
  • SENDHEX 42 : send 0x42 char
Clone this wiki locally