The PGM file format
A Morbidelli .pgm file is a compiled binary CNC program loaded by older SCM and Morbidelli controllers. It is not an image file.
- Extension
- .pgm
- Type
- Binary
- Media type
- application/octet-stream
- Vendor
- SCM Group / Morbidelli
- Usually produced by
- WinXISO, netool XXL to PGM converter
What a .pgm file is
This PGM is a machine program, not the netpbm greyscale image that shares the extension. It is the compiled form of a Xilog text program, produced by SCM's own tooling. Older Morbidelli controllers, typically Author-series machines with early Xilog or Tria control software, load this binary directly and cannot read the text version.
Inside the file
The file is a flat stream of records, one per command, with nothing in front of them. Each record states its command number, how many bytes of fields follow, and a mask saying which of that command's fields are actually present. A field the mask marks absent still occupies its bytes, which is why two files can look different and mean the same thing.
Which commands exist
The panel header, face selection, boring with a set of spindles, rapid and cutting moves, both arc directions, origins, mirrors, subprogram calls and comments. Straight cuts and counter-clockwise arcs are ordinary commands of their own, not variations on another, which is something you cannot tell from a single file.
How coordinates are stored
Every distance is a 32-bit integer in hundredths of a millimetre, so 492.923 mm is stored as 49292. The original compiler parsed each decimal as a single-precision float before scaling and rounding, which lands a handful of half-unit values on a different integer than plain decimal rounding would. A converter has to reproduce that to match the original.
Why you cannot edit it as text
Opening a .pgm in an editor shows binary noise, and saving from a text editor will corrupt it. You can read one here, edit the listing, and compile a fresh file; keeping the text program as the source is still the calmer way to work.
Reading and writing one
The converters on this site write PGM files from Xilog text and read them back. What we know about the format was measured by decoding 116 programs that ran on a Tria 4000 controller, so the record table is evidence rather than inference.
Converters that read it
Converters that produce it
XXL to PGM converter
Convert Xilog Plus .xxl programs to the binary .pgm format read by older Morbidelli CNC controllers.
Open toolFrequently asked questions
Is this the same PGM as the image format?
No. The netpbm PGM is a greyscale image that begins with the text P2 or P5. A Morbidelli PGM is a binary CNC program with an 86-byte header and no such marker.
How do I open a Morbidelli PGM file?
On the machine, load it through the controller as you would any program. On a PC there is no general viewer; the converter here decodes a PGM and draws its toolpath so you can check what the file actually contains.
Can a PGM be converted back to XXL?
Not by this site today. The binary can be decoded well enough to draw the toolpath, but feed rates, tool changes and macros are not recoverable, so a round trip would lose information.
How large is a PGM file?
Small. The header is 86 bytes and each motion adds 28, so a contour with fifty arcs is well under two kilobytes.