I’m having a hard time parsing your last post in terms of what is a question and what is a statement. I’ll try to provide some context as best I can but let me know otherwise.
Something to understand about the Gcode tab in Device Settings. The Start GCode section and End Gcode section will run once at the start and end of each job. As far as I know, the code you enter there cannot have variables or anything dynamic. You put in code there and it will slavishly run those commands once at the start and once at the end of the entire job.
As @jkwilborn points out this is potentially problematic since with plasma torches you need a touchoff operation for every single cut, not just once at the start and end of a job.
You can define macro operations in the Console tab. A macro is a snippet of g-code that you define. Again, as far as I know there are no variables available. It’s just a static piece of code. They will run once every time you push the button.
Not sure if I understand the question. $$
itself is a grbl command to retrieve all GRBL settings. Configurations in GRBL are referenced by their $ name. For example $20 is the configuration used to store whether or not soft limits are to be used ($20=1 enables, $20=0 disables).