Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Exclusion Zones — grblHAL Plugin

A multi-zone 3D exclusion/inclusion plugin for grblHAL. Define axis-aligned 3D boxes that restrict G-code moves, jogs, and tool-change macros from entering protected areas of your machine's work envelope.

Compatible with the Sienci ATCi keepout plugin hook architecture and designed for integration with FlexiSender.

How It Works

Zones are axis-aligned 3D boxes defined by X/Y/Z min and max coordinates. Each zone carries per-operation permission flags:

Bit Flag Description
0 allow_gcode G-code moves may enter the zone
1 allow_jog Jog moves may enter the zone
2 allow_toolchange Tool-change macros may enter the zone
3 enabled Zone is active
  • G-code moves that would enter a forbidden zone are rejected.
  • Jog moves are clipped at the zone boundary instead of rejected outright.
  • If the spindle is already inside a zone, jogs are frozen until the zone is disabled.

Commands

Command Description
$EXCLUSION=1 Enable exclusion zone enforcement
$EXCLUSION=0 Disable exclusion zone enforcement
$ZONE List all defined zones
$ZONE=n,xmin,ymin,zmin,xmax,ymax,zmax[,flags] Set or update zone n
$ZONE-n Delete zone n

If the flags byte is omitted or the enabled bit (bit 3) isn't set, the zone is automatically enabled.

Example

$ZONE=0,-100,-100,-50,100,100,0,8

Creates zone 0 spanning X[-100,100] Y[-100,100] Z[-50,0] with only the enabled flag set (no operations allowed inside).

$ZONE=0,-100,-100,-50,100,100,0,9

Same zone but G-code moves are permitted inside (flags = enabled + allow_gcode).

Build

Add EXCLUSION_ZONES_ENABLE to your build defines and include the plugin source in your grblHAL driver build:

// In my_machine.h or your board map
#define EXCLUSION_ZONES_ENABLE 1

Call exclusion_zones_init() from your driver's plugin initialization.

Realtime Report

When enabled, the plugin appends |EZ:EZ to the status report:

  • E — exclusion zones are globally enabled
  • Z — the machine is currently inside an active zone

Configuration

Define Default Description
EZ_MAX_ZONES 16 Maximum number of zones
EZ_TOLERANCE 0.5 Boundary tolerance in mm to avoid false positives on grazing moves

Both can be overridden at compile time.

Files

File Description
exclusion_zones.h Public header — types, defines, and API
exclusion_zones.c Plugin implementation

License

Same license as the grblHAL project this plugin is built for.

About

Exclusion Zones plugin for GRBLHAL built from the sience ATCI plugin.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages