If you just want to write something to #500 like an R-plane or clearance plane thats what I use #500 for. I set #500 at the start of my program.
O0001(Main program)
#500=3.--------------(THIS WRITES TO #500)
.....
.....
G0G90G55Z#500------(THIS READS FROM #500)
.....
M30
Once #500 is set it will not change until you change it even you power the machine down it stays.
#1-#33 are your Local variables and usually cleared when you hit rest or program end code.
#100-#199 are you common variables and will clear when machine is powered down.
#500-#999 are your permanent common variables and will not change until you change them.
Stevo