AI - Artificial Intelligence

Anthropic’s Claude Code is installed on the Raspberry Pi in your Rose Engine Butler.

Claude is an AI assistant: you describe what you want in plain English, and it helps you get there - writing and checking G-code, explaining what a program does, and working out what went wrong when the machine stops with an error.

To use Claude you need your own Claude account with a Claude Pro (or higher) subscription from claude.com. The subscription covers both Claude on the web and Claude Code on the Raspberry Pi; a license for Claude is not included with the Rose Engine Butler.


What Claude can do for you

Write G-code

Describe the pattern you want and Claude drafts the program. For example:

Write G-code to cut a 24-lobe rosette pattern on the face of a 3 inch blank, 0.020 inch deep, with the X axis moving in and out as C turns.

It can lay the program out with named parameters (#<_Depth>, #<_Lobes>, ...) at the top, so you can change the design without rewriting the moves, and it adds comments explaining each section.

Make G-code run faster

Claude can review a program and explain where the time goes. A real example: one rosette program took about 4 hours to run. Reviewing it with Claude showed that it was made of about 80,000 very short moves of the C axis, so its speed was limited by C's acceleration, not its top speed - and that each pass ended with a full 360° rapid back to the start. Raising C's acceleration and speed in the Axis and Stepper Motor Tuning tab brought the estimate down to about 45 minutes, and Claude also suggested a change to the program itself to remove the rewinds.

Other things Claude looks for: needless rapid moves, many tiny moves where fewer, longer ones would do, feed rates set lower than they need to be, and repeated sections that could be a subroutine.

Explain and check G-code

Paste in (or point Claude Code at) a program you were given and ask what it does, line by line. Claude can also check a program before you run it - for moves that go further than your machine can travel, a missing feed rate, units (G20/G21) that don't match your machine, or an axis letter your machine isn't set up to use.

Troubleshoot errors and tune the machine

When LinuxCNC stops with a message such as "Joint 5 following error", tell Claude what you were doing and what the message said. It can explain the likely causes in plain terms - for example, that a following error right at the start of a program often just means that axis wasn't enabled - and walk you through the fix. It can also help you work out settings such as an axis's Scale from your motor, drive and leadscrew or gearing, and suggest sensible Max Speed and Max Acceleration values to try in the Axis and Stepper Motor Tuning tab.

Learn

Ask about anything: what G93 inverse-time mode is for, how the Indexing tab's Div setting works, or how a rose engine pumping pattern is built up. Claude answers at whatever level you ask for.


Two ways to use Claude

  Claude on the web Claude Code on the Raspberry Pi
Where In a web browser at claude.ai, on the Raspberry Pi which is inside the Rose Engine Butler box, or on any computer, tablet, or phone. In a Terminal Emulator window on the Rose Engine Butler’s Raspberry Pi.
What it can see Only what you paste in or attach (a G-code file, a screenshot, an error message). The files on the Raspberry Pi - your G-code, the Rose Engine Butler’s own files and its manual notes - so it already knows how your machine is set up.
What it can do Answer questions and write or rewrite text and G-code for you to copy back. Everything the web version can, plus read and save files and run commands on the Raspberry Pi - always asking you first.
Best for Questions and planning, especially away from the shop. Working on your actual programs and your actual machine.

Both use the same Claude account and subscription.


Using Claude Code on the Raspberry Pi

  1. Open a Terminal Emulator.
  2. Move to the Rose Engine Butler's folder - or to its gcode folder if you are working on programs:
cd ~/linuxcnc/configs/RoseEngineButler/gcode
Starting Claude here matters: in this folder Claude reads the Rose Engine Butler’s own notes, so it knows how the machine works.
  1. Start Claude by entering on the command line:
claude
  1. The first time, Claude asks you to log in: choose your Claude account and follow the steps in the browser window it opens.
  2. Type what you want in plain English and press Enter. When Claude wants to save a file or run a command, it shows you exactly what it will do and waits for you to say yes or no.

To exit Claude, enter within Claude:

/exit

For help with Claude Code itself, enter /help.

Things to try

  • "Explain what Pumping5Sides.ngc does, section by section."
  • "This program takes 4 hours. Why, and how could it run faster without changing the pattern?"
  • "Write a program that indexes the spindle 24 times, cutting a 0.010 inch flute on each division."
  • "LinuxCNC stopped with 'Joint 2 following error' while jogging B. What should I check?"
  • "My X axis moves 0.098 inch when I ask for 0.100. What should its Scale be?"

Using Claude safely

  • Check every new or changed program before cutting. Look at it in the preview, then run it with the cutter clear of the work (an "air cut"). Claude is very good, but it can make mistakes, and it can't see your machine.
  • Don't change the machine while it is running a job. Ask Claude to look at files and logs freely, but only let it change settings or files when the machine is stopped.
  • Use the Rose Engine Butler Settings program for settings - not Claude editing the settings file (REBset_v1.ini) by hand.
  • Keep your own work in the gcode folder. Changes Claude makes to the Rose Engine Butler’s own program files can be set aside by the next update. Your G-code, your tool table and your HAL additions (REB_Custom/REB_Custom.hal) are kept.
  • Don't share passwords or private information with Claude.
########## Standard Footer for all pages ##########
spacer line

About the Rose Engine Butler System
Terms of Use

eMail comments to
ColvinTools @ Gmail [period] com -> mailto:ColvinTools [snail] Gmail [period] com