REB_Launch.sh - Start Rose Engine Butler
Rose Engine Butler’s Key Programs: Overview · REB_Launch.sh · REB_Settings.sh · REB_Backup.sh · REB_Update.sh · REB_Change_Network.sh · REB_Install_Debian_13_Trixie.sh
Purpose
REB_Launch.sh starts a Rose Engine Butler session. It first builds this machine's own LinuxCNC configuration from the shipped templates and this machine's settings file, then starts LinuxCNC on that generated configuration.
It exists so that the shipped files (REB.ini, REB.hal, REB_PostGUI_v1.hal) are never changed on the machine. An update can then replace them without wiping out this machine's own choices (axis assignments, jog speeds, measurement system, tuning, accessories).
See Launching Rose Engine Butler for the full start-up sequence.
How it is run
- The Rose Engine Butler desktop icon, and Applications > Rose Engine Butler.
- From a terminal, which also shows everything it prints:
|
/home/reuben/linuxcnc/configs/RoseEngineButler/REB_Launch.sh |
Parameters
None. Anything typed after the name is ignored.
What it does
- Runs python3 REB_Setup/REB_Generate_Local_Ini.py. Before building anything, it checks the gcode folder for reserved file names (see below).
- If that fails, it stops there (the script uses set -e), so LinuxCNC never starts on a half-built configuration.
- Otherwise it replaces itself with linuxcnc REB.local.ini.
Programs it calls
| Program | What for |
| REB_Setup/REB_Generate_Local_Ini.py | Builds the .local files below. Uses REB_Display/reb_settings_io.py to read the settings file, and runs ip -4 addr show dev eth0 to choose the base card's address (192.168.1.121 while the Raspberry Pi is still on 192.168.1.x, otherwise 10.10.10.10). |
| linuxcnc | Started on REB.local.ini. LinuxCNC in turn loads the HAL files, the AXIS screen with the REB side panel (REB_Display/REB_main.py), REB_Settings_Restore.py (puts the saved scale, PID and limits onto the HAL pins), and at shutdown REB_Shutdown.hal, which runs REB_Scale_Persist.py. |
Files it reads
All paths are under /home/reuben/linuxcnc/configs/RoseEngineButler unless shown in full.
- REB.ini - the configuration template
- REB.hal - the realtime HAL template
- REB_Display/REB_PostGUI_v1.hal - the side-panel HAL template
- REB_Display/REB_Splash.ngc - the empty start-up program (used when X and Z aren't both assigned)
- gcode/ - only the file names, for the reserved-name check
- /home/reuben/Documents/REBset_v1.ini - this machine's settings
Files it creates
These are rewritten at every launch. Never edit them - change the settings (REB Settings) or the templates instead.
| File | Contents |
| REB.local.ini | REB.ini with this machine's axis assignment, units, speed limits, jog speeds and backlash, pointing at the files below. This is the file LinuxCNC runs on. |
| REB.local.hal | REB.hal with the Mesa card line for one or both cards, each role on its assigned channel, and the limit jacks, E-stop button, signal tower and lost-card E-stop wired in. |
| REB_Display/REB_PostGUI_v1.local.hal | REB_PostGUI_v1.hal plus the sound and signal-tower lines. |
| REB_Display/REB_Splash.local.ngc | The "REB / ROSE ENGINE BUTLER" drawing shown in the preview at start-up. Preview only - pressing Run skips every move in it. |
LinuxCNC itself also writes sim.var (G-code parameters) while it runs, and at shutdown REB_Scale_Persist.py saves the live values back into REBset_v1.ini.
Notes for support
- "Reserved file name found - startup stopped": the gcode folder holds a file whose name starts with REB (any case) or is M100 - M199. LinuxCNC looks in that folder first, so such a file would run in place of Rose Engine Butler's own subroutines. Rename it (the Gcode folder shortcut opens the folder), then start again. A short sound plays when startup is stopped. REB Settings' Other tab has a Startup File Check setting: Abort startup - recommended (the default) or Warn, but let me continue.
- Nothing happens when the icon is clicked: run REB_Launch.sh from a terminal. The desktop icon hides the output; the terminal shows the generator's messages and any error.
- The generator explains itself. It prints which cards it loads and at which addresses, which role is on which channel, and which limit jacks, E-stop and signal tower are wired. If it finds a problem it prints REFUSING to write REB.local.hal with the reason, and LinuxCNC doesn't start.
- Changes need a restart. Everything REB.local.ini sets is read once when LinuxCNC starts, so a change made in REB Settings applies at the next launch.
- Card can't be found: check the Raspberry Pi's wired address with REB_Change_Network.sh check (see REB_Change_Network.sh). With the cable unplugged, the generator prints a note and uses 10.10.10.10.
- Expansion Box - Connected must match the hardware. Ticked with no expansion card answering, LinuxCNC stops with a card error.
- To compare what was generated with the template, open REB.local.hal and REB.hal side by side.
Related pages
|
eMail comments to |
