Laser Cutter/HackingRDWorks

From Noisebridge
Revision as of 02:27, 31 August 2018 by Rando (talk | contribs) (Created page with "== Hacking RDWorks == RDWorks is a proprietary program which uses a proprietary format to save projects as .rld files. These files themselves are not sent to the laser contr...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hacking RDWorks

RDWorks is a proprietary program which uses a proprietary format to save projects as .rld files. These files themselves are not sent to the laser controller as-is, they are first converted to a .rd file, which is an RDCAM format, also proprietary. The RDCAM file is read by the laser controller, which is the case of Noisebridge's KaiTan CM-1309 is the RDC6442G controller.

While it would be great to hack the .rld format, so far I have only found a decoder for the .rd format. The .rd files are scrambled, but here is a tool which unscrambles them:

ruida

Note from here:

"You are confusing file types. .rld is the file type RDWorks saves when saving a file to your hard drive. .rd is the type of file RDWorks creates and then sends to the machine itself. The laser machine controller can only read .rd files. If you send the file via USB cable from your PC, you don't really see this process. If you tell RDWorks to save to a Udisk (USB stick) it will send and save the file to the USB stick. You then plug that into the machine and let the machine read it. If you have .rd files on a stick that you want to save to a PC, you have to download that from the stick within RDWorks to RDWorks and then save that to an .rld file from within RDWorks."


How to dump '.rd' file

To dump a .rd file, use the 'SaveToUFile" button. Note this screenshot shows the model selection, which is only useful if you are using a locally installed copy of RDWorks. The laser machine is already set up.

Rdworks-screen.png

How to decode a '.rd.' file

Use the 'decode' command from the ruida project above '/bin/decode <filename>':

Ruida-decode.png

This outputs a human readable command on the left and the actual commands sent to the laser controller on the right.

The ruida project linked above gives a key for the commands.

Opening a '.rd' file

An '.rd' file cannot be opened in RDWorks directly, but can be viewed in the 'Preview' screen.

Rdworks-screen-preview.png

In the preview screen, double click on the preview area, the black background.

Rdworks-preview.png

This will pop-up a dialog to select a file.

Rdworks-preview-dialog.png

Loading '.rd' files onto the laser

The easiest way is to use a USB key, plug it into the laser, and load from the controller.

Automation

The codes for the laser controller are not generic, the controller do not understand G-code for example. In order to interface with the controller, the controller specific commands must be used.

One approach would be to attempt to use a different controller which can use G-code or equivalent. This of course could damage the laser.

A second is to map the commands 1:1 from G-code to RDCAM. The ruida project above provides a partial mapping, and if completed may be sufficient to fully map the two formats. Fundamentally each command does not depend on the state of the machine: turn the laser off will always turn it off, even if the laser is already off. move to (X, Y) will always move the laser to the point (X, Y), regardless of where it was previously.


Application

The only useful application I can think of so far is to automating the creation of test patterns where we want many different cut speeds and power. Currently the laser is limited to 8 in any one design. By automatically generating files that change these settings, a much better example tiling can be created without a lot of work from the designer.