This is a Fanuc compatible function. Mach 4 pretty much emulates a Fanuc 21i. So reading a Fanuc 21i manual will get you must of the stuff on Macro B and the more advanced stuff related to it. However, Mach 4 is not a perfect emulation of a Fanuc 21i and will probably never be, so some things won't work. MOST things do. An example of the major difference between Mach 4 and a Fanuc 21i would be some system variable and parameter settings.
Basically:
SETVN ********* [name1, ...]
Where ********* is the starting #var. #500 to #549 are assignable by default. However, G code lines can only be a max of 80 characters long. Hence the reason for the starting variable number.
SETVN 500 [MYVAR1, MYVAR2, MYVAR3]
names #500 to MYVAR1, #501 to MYVAR2, and #502 to MAYVAR3
SETVN 503 [MYVAR4]
continues the variable naming.
Variables can now be accessed and set via their names. The names are not case sensitive.
#myvar1 = 1024
#myvar3 = #myvar1
Etc...
It is important to note that these variable names are saved. If you shutdown Mach, they will be preserved. So be careful!!!! It is common practice that SETVN is used at the beginning of a G code program to explicitly set the variable names. Similar to the common practice of inserting a safety line at the beginning of a G code program.
Steve