Machine Space and Homing - Longus/FluidNC GitHub Wiki

Machine Space and Homing

Machine space and machine coordinates are terms used for the range of motion on an axis that FluidNC uses internally. These coordinates do not change when you zero an axis or change work coordinate systems (G54-G59). Work coordinates are just offset from the machine coordinates. The only thing that resets machine coordinates is homing to limit switches.

If machine space is confusing you while using the machine, just ignore it. It is primarily used by the machine and not the user. Virtually all gcode operates in work coordinate systems. These are the coordinate systems you can zero on your work and are saved in non volatile memory.

With FluidNC you are free to setup the machine range any way you like. It can be any size and you can place that size anywhere you want in space. You can have it in all positive space, all negative space or partially in both.

Here is a good video explaining work coordinate systems (Uses Grbl, but is still valid for FluidNC)

Config file values

All things that affect the machine space and homing are in the config file and are listed below.

  • axes/x/max_travel_mm The usable length of the axis
  • axes/x/homing/mpos_mm This is the position of the switch in machine space. When the switch is touched, the machine will set the machine position to this value.
  • axes/x/homing/positive_direction The direction the axis travel to find the home switch

This item also comes into play.

  • axes/x/homing/pulloff_mm How far to pull off the switch after homing. This is done to clear the switch.

Examples

  • axes/x/max_travel_mm: 300.0
  • axes/x/homing/mpos_mm: 0.0
  • axes/x/homing/positive_direction: false
  • axes/x/homing/pulloff_mm: 2.0

This will home in the negative direction. It will create a range of (0, 300). After homing the machine position will be at 2.00 (due to the pulloff)

You should see this in the boot messages.

[MSG:INFO: Axis X (0.000,300.000)]

  • axes/x/max_travel_mm: 300.0
  • axes/x/homing/mpos_mm: 300.0
  • axes/x/homing/positive_direction: true
  • axes/x/homing/pulloff_mm: 2.0

This creates the same machine space as the previous example except IT homes in the positive direction. After homing the machine position will be at 298.00 (due to the pulloff)

You should see this in the boot messages.

[MSG:INFO: Axis X (0.000,300.000)]

  • axes/x/max_travel_mm: 300.0
  • axes/x/homing/mpos_mm: 150.0
  • axes/x/homing/positive_direction: false
  • axes/x/homing/pulloff_mm: 2.0

The machine will home in the negative direction. It will set the negative end to 150. The actual machine position after homing will be 152, due to the pulloff.

[MSG:INFO: Axis X (150.000,450.000)]

  • axes/x/max_travel_mm: 300.0
  • axes/x/homing/mpos_mm: 10.0
  • axes/x/homing/positive_direction: true
  • axes/x/homing/pulloff_mm: 2.0

The machine will home in the positive direction. It will set positive end to 10. The actual machine position after homing will be 8. You should see this in the boot messages.

[MSG:INFO: Axis X (-290,10.000)]

Not Using Switches or Homing

If you do not use homing, machine space is mute. The machine does not know where it is at any time. Soft limits should not be used. Hard limits could be used, but if you have switches, you are likely to home. You can still zero a work space anywhere you want without switches. The machine space you created with MaxTravel and Home/Mpos will be ignored and you can freely travel past the ends. Any zero you set is meaningless the next time you start FluidNC.

Tips for newbies.

If all of this is confusing, just try to ignore machine space for a while. Most users will never need to think in machine coordinates. After you use your machine for a while and see that you can ignore them, you will be in a right state of mind to dig deeper into what it all means. We have spent hours trying to the concepts to people, who just are quite ready to understand them.

You are probably looking at a screen right now. That screen is located at some exact latitude, longitude, altitude and rotational position, but who cares?. move it to the position that is meaningful to you and not the planet.