VAR string string1;PROC Routine1()
string1:=ArgName(p10);
ENDPROC
To have this working, robtargets (p10,...) would need to be arguments of routine 'Routine1', which they are not. These are robtargets declared as global variable/constant, but not constants.