Stating your last clarifications, I succeeded to successfully use some variables inside #scpiCmd commands so I wrote a working code to manage the scale changes.
I would like to ask you some more questions:
1) Any chance to call an #scpiCmd inside another #scpiCmd?
2) Time ago I wrote a working function using #pgm# that accepted some input parameters and it was called inside a #cmdSetup. Unfortunately it worked only if I pass immediate values, I didn't succeed to pass it the content of a variable, the function got the variable name (as a string), instead of its content. The use of parenthesis around the variable name did not change the result. Is this the expected behavior?