variable (height) to calculate average trigger height
-
I would like to have a variable (height) that would be incremented by the Z probe value, move.axes[2].userPosition, 10 times and then I would need to calculate the average, (height/10) but limit this result to 3 decimal places and then update G31 in the config file.
How is a variable defined?
Is this possible? If so could you show an example please.Thanks for any help
-
@appjaws said in variable (height) to calculate average trigger height:
I would like to have a variable (height) that would be incremented by the Z probe value, move.axes[2].userPosition, 10 times and then I would need to calculate the average, (height/10) but limit this result to 3 decimal places and then update G31 in the config file.
How is a variable defined?
Is this possible? If so could you show an example please.Thanks for any help
Hi,
Currently variables are not implemented.
You can use existing properties of "dummy" objects that you create.
You cannot set a property value directly, you have to use a command that will achieve the desired result.
So if you created, as an example, a dummy axis, A you could use the following to set its userPosition property.
-
Reset to zero: G90 G1 A0
-
Increment by current Z position: G91 G1 A{ move.axes[2].userPosition}
But I don't know how you would update the trigger height in the G31 command in the config file.
Frederick
-