Variables are a very useful feature to be able to access on a cnc machine.
Per linux cnc/faunic formatting, variables are denoted with a preceding # character.
They come in three major variations:
101-#120 user variables that are not stored on machine reset
501-#520 - user variables that persist on machine reset
system variables- access information about the machine's current status like current TLO, WCS offset, etc inside gcode directly.
There are currently 20 local variables that are transient (are lost when the machine turns off), they are useful for any variables needed inside a gcode file
there are 20 variables that persist through reset. They should be used for long term values that you want to store
there are currently 12 system variables implemented such as being able to load the current x position into a gcode file. As a result you can write a probe program that probes in the positive x direction, zeros at the new position, probes in the negative X direction, on contact grab the current x position and divide by 2. There are a more variables to implement eventually.
Variables are a very useful feature to be able to access on a cnc machine. Per linux cnc/faunic formatting, variables are denoted with a preceding # character. They come in three major variations:
101-#120 user variables that are not stored on machine reset
501-#520 - user variables that persist on machine reset
system variables- access information about the machine's current status like current TLO, WCS offset, etc inside gcode directly.
There are currently 20 local variables that are transient (are lost when the machine turns off), they are useful for any variables needed inside a gcode file
there are 20 variables that persist through reset. They should be used for long term values that you want to store
there are currently 12 system variables implemented such as being able to load the current x position into a gcode file. As a result you can write a probe program that probes in the positive x direction, zeros at the new position, probes in the negative X direction, on contact grab the current x position and divide by 2. There are a more variables to implement eventually.
Which system variables are implemented I have a spreadsheet here:https://docs.google.com/spreadsheets/d/1QXAimN-S1dCBaja-8on7d3joM2v30wR_76DH1bB0lyI/edit?usp=sharing