Outputting a string with an object model variable to a log file
-
Hello,
I am wanting to output a message to a log file (M118) or to the user (M117) that has a string and then data from the object model in one command. Normally I would concatenate a string with a typecasted variable but I am having issues doing this.
I tried this: echo "Hello World", move.axes[2].userPosition
and it had the desired behavior.When I try: M118 S{"Hello World", move.axes[2].userPosition} L1
it throws an error.When I try: M117 "Hello World", move.axes[2].userPosition
it throws an error, too.Here is a screenshot of the console:
Could someone tell me what is wrong with my syntax? Much appreciated. -
@garth_42
Hi all, I posted justa bit too quickly. I figured out the syntax. For anyone in the future, this is the syntax I used:
M117 {"Z-Axis Position: " ^ move.axes[2].userPosition ^ " "}