grblHAL core  20241107
system Struct Reference

Global system variables struct. More...

#include <system.h>

Data Fields

bool abort
 System abort flag. Forces exit back to main loop for reset. More...
 
bool cancel
 System cancel flag. More...
 
bool suspend
 System suspend state flag. More...
 
bool position_lost
 Set when mc_reset is called when machine is moving. More...
 
bool reset_pending
 Set when reset processing is underway. More...
 
bool blocking_event
 Set when a blocking event that requires reset to clear is active. More...
 
volatile bool steppers_deenergize
 Set to true to deenergize stepperes. More...
 
axes_signals_t tlo_reference_set
 Axes with tool length reference offset set. More...
 
int32_t tlo_reference [N_AXIS]
 Tool length reference offset. More...
 
alarm_code_t alarm_pending
 Delayed alarm, currently used for probe protection. More...
 
system_flags_t flags
 Assorted state flags. More...
 
step_control_t step_control
 Governs the step segment generator depending on system state. More...
 
axes_signals_t homing_axis_lock
 Locks axes when limits engage. Used as an axis motion mask in the stepper ISR. More...
 
axes_signals_t homing
 Axes with homing enabled. More...
 
overrides_t override
 Override values & states. More...
 
system_override_delay_t override_delay
 Flags for delayed overrides. More...
 
report_tracking_flags_t report
 Tracks when to add data to status reports. More...
 
parking_state_t parking_state
 Tracks parking state. More...
 
hold_state_t holding_state
 Tracks holding state. More...
 
coord_system_id_t probe_coordsys_id
 Coordinate system in which last probe took place. More...
 
int32_t probe_position [N_AXIS]
 Last probe position in machine coordinates and steps. More...
 
volatile probing_state_t probing_state
 Probing state value. Used to coordinate the probing cycle with stepper ISR. More...
 
volatile rt_exec_t rt_exec_state
 Realtime executor bitflag variable for state management. See EXEC bitmasks. More...
 
volatile uint_fast16_t rt_exec_alarm
 Realtime executor bitflag variable for setting various alarms. More...
 
int32_t var5399
 Last result from M66 - wait on input. More...
 
The following variables are only cleared upon soft reset if position is likely lost, do NOT move. homed must be first!
axes_signals_t homed
 Indicates which axes has been homed. More...
 
float home_position [N_AXIS]
 Home position for homed axes. More...
 
work_envelope_t work_envelope
 Work envelope, only valid for homed axes. More...
 
The following variables are not cleared upon soft reset, do NOT move. alarm must be first!
alarm_code_t alarm
 Current alarm, only valid if system state is STATE_ALARM. More...
 
bool cold_start
 Set to true on boot, is false on subsequent soft resets. More...
 
bool driver_started
 Set to true when driver initialization is completed. More...
 
bool mpg_mode
 To be moved to system_flags_t. More...
 
signal_event_t last_event
 Last signal events (control and limits signal). More...
 
int32_t position [N_AXIS]
 Real-time machine (aka home) position vector in steps. More...
 
axes_signals_t hard_limits
 temporary?, will be removed when available in settings. More...
 
axes_signals_t soft_limits
 temporary, will be removed when available in settings. More...
 

Detailed Description

Global system variables struct.

Field Documentation

◆ abort

bool abort

System abort flag. Forces exit back to main loop for reset.

◆ alarm

alarm_code_t alarm

Current alarm, only valid if system state is STATE_ALARM.

◆ alarm_pending

alarm_code_t alarm_pending

Delayed alarm, currently used for probe protection.

◆ blocking_event

bool blocking_event

Set when a blocking event that requires reset to clear is active.

◆ cancel

bool cancel

System cancel flag.

◆ cold_start

bool cold_start

Set to true on boot, is false on subsequent soft resets.

◆ driver_started

bool driver_started

Set to true when driver initialization is completed.

◆ flags

Assorted state flags.

◆ hard_limits

axes_signals_t hard_limits

temporary?, will be removed when available in settings.

◆ holding_state

hold_state_t holding_state

Tracks holding state.

◆ home_position

float home_position[N_AXIS]

Home position for homed axes.

◆ homed

Indicates which axes has been homed.

◆ homing

Axes with homing enabled.

◆ homing_axis_lock

axes_signals_t homing_axis_lock

Locks axes when limits engage. Used as an axis motion mask in the stepper ISR.

◆ last_event

signal_event_t last_event

Last signal events (control and limits signal).

◆ mpg_mode

bool mpg_mode

To be moved to system_flags_t.

◆ override

overrides_t override

Override values & states.

◆ override_delay

system_override_delay_t override_delay

Flags for delayed overrides.

◆ parking_state

parking_state_t parking_state

Tracks parking state.

◆ position

int32_t position[N_AXIS]

Real-time machine (aka home) position vector in steps.

◆ position_lost

bool position_lost

Set when mc_reset is called when machine is moving.

◆ probe_coordsys_id

coord_system_id_t probe_coordsys_id

Coordinate system in which last probe took place.

◆ probe_position

int32_t probe_position[N_AXIS]

Last probe position in machine coordinates and steps.

◆ probing_state

volatile probing_state_t probing_state

Probing state value. Used to coordinate the probing cycle with stepper ISR.

◆ report

Tracks when to add data to status reports.

◆ reset_pending

bool reset_pending

Set when reset processing is underway.

◆ rt_exec_alarm

volatile uint_fast16_t rt_exec_alarm

Realtime executor bitflag variable for setting various alarms.

◆ rt_exec_state

volatile rt_exec_t rt_exec_state

Realtime executor bitflag variable for state management. See EXEC bitmasks.

◆ soft_limits

axes_signals_t soft_limits

temporary, will be removed when available in settings.

◆ step_control

step_control_t step_control

Governs the step segment generator depending on system state.

◆ steppers_deenergize

volatile bool steppers_deenergize

Set to true to deenergize stepperes.

◆ suspend

bool suspend

System suspend state flag.

◆ tlo_reference

int32_t tlo_reference[N_AXIS]

Tool length reference offset.

◆ tlo_reference_set

axes_signals_t tlo_reference_set

Axes with tool length reference offset set.

◆ var5399

int32_t var5399

Last result from M66 - wait on input.

◆ work_envelope

work_envelope_t work_envelope

Work envelope, only valid for homed axes.


The documentation for this struct was generated from the following file: