EN
  • Čeština
  • Español
  • Italiano
  • Deutsch
  • Polski
  • Français
  • 日本語
Login

Binary G-code

Relevant for:
Last updated 4 months ago
This article is also available in following languages: 
CSPLDEESITFRJA

Binary G-code is a new standard for encoding and compressing ASCII G-code files. G-code files are easy to read and interpret, but their downside is that the data is not saved efficiently, and the file size is often very large. Compression of the file is problematic because the printers usually run on limited hardware and they may not have enough memory and/or CPU power to decompress it.

Binary G-code

The binary G-code format is flexible and the encoding and compression of individual blocks is variable. We also provide libbgcode library which contains the routines to convert ASCII G-codes to binary and vice versa. The library is written in C++ and the repository includes bindings for Python.

Our testing shows that using binary G-code reduces the average size by about 70%.

Slicer requirements

The support for the .bgcode file format is implemented in PrusaSlicer, including its export, loading configs, and previewing G-code or file associations. Exporting binary G-code can be enabled in Printer Settings->General->Support binary G-code. This option is enabled by default starting from PrusaSlicer version 2.7.0. An option to convert ASCII G-code to binary (or the opposite) has been added to the File menu.

Disabling binary G-code export for all profiles

You can disable the use of binary G-code even globally for all profiles in the Preferences - Other - Use binary G-code when the printer supports it.

Firmware requirements

To print a binary G-code, it has to be supported by the firmware of the printer. For Original Prusa MINI, MK4, and XL printers, it is supported starting from firmware 5.1.0. It is necessary to update the printer firmware before using the binary G-code format.

Compatibility issues

Some external printer control programs like Octoprint might have an issue with the binary G-code. In this case, disable the binary G-code feature in PrusaSlicer.

Was this article helpful?

Comments

Still have questions?

Still have questions?

If you have a question about something that isn't covered here, check out our additional resources.
And if that doesn't do the trick, you can send an inquiry to [email protected] or through the button below.

Contact us