Reporting variables
-
Having calibrated my four tool corexy I would like to report the offsets it has found.
I currently echo the variables by calling a macroecho "Camera X",global.CameraX, " Y", global.CameraY, " Z",global.CameraZ
echo "T0Offset X",global.T0OffsetX," Y", global.T0OffsetY," Z",global.T0OffsetZ
echo "T1Offset X",global.T1OffsetX," Y", global.T1OffsetY," Z",global.T1OffsetZ
echo "T2Offset X",global.T2OffsetX," Y", global.T2OffsetY," Z",global.T2OffsetZ
echo "T3Offset X",global.T3OffsetX," Y", global.T3OffsetY," Z",global.T3OffsetZThis results in the console
03/01/2024, 10:13:40 M98 P"0:/macros/Calibration/Report Offsets.g"
Camera X 6.577 Y 96.720 Z 0
T0Offset X 0 Y 0 Z 0
T1Offset X 0.060 Y 2.200 Z 0
T2Offset X 0.220 Y 3.620 Z 0
T3Offset X -0.043 Y 0.120 Z 0However not all the lines are always reported. Sometimes T2 and T3 lines are missing. Why could this be?
What I would really like to do is report the variables with a Message dialog and require the user to Ok the message to continue. Like using a M291. However I have not found a way of reporting variables and putting them on multiple lines using M291.
Any suggestions?
-
@St-Taw I suggest you create a feature request on github, to allow M291 to create multi-line messages, perhaps by including \n or similar in the message string.
-
@dc42
Thank you for reply.I will make the suggestion. However before I do, I have been unable to get a single line message reporting variables. Have tried
M291 P "Camera X"^global.CameraX S2
The documentation does not describe anything other than P"message" with no example of variables.
Also I have an associated question.
I would like to find out what the current offsets I have applied via the G10 command are during the calibration.
As a test via the console I did
G10 P0 X-22
Then I move tool 0
G1 X40Looking in the object model I find
move|axes|0|machine position 62
move|axes|0|userPosition 40
So I can deduce it believes offset is 40-62 = -22Are the offets for all the tools visble in the object model specifically and without selecting the tool?
-
@St-Taw whenever a parameter to a GCode command is an expression, the whole parameter expression must be enclosed in { }. So try this:
M291 P{"Camera X"^global.CameraX} S2
-
Yes that works. So I'll make the request for multi-line.
Any views on the object model enquiry?