if get_exec_pars().args: # args is set by callin process (Qt panel) und = args[0] scan = args[1] if scan == "AR_K": set_channel = und + "-UIND030:K_SET" elif scan == "AR_PHI": set_channel = und + "-UPHS060:PHI_SET" elif scan == "AT_K": set_channel = und + "-UIND030:K_SET" elif scan == "AT_PHI": set_channel = und + "-UDLY060:PH-SHIFT-OP" set_value = caget(und + ":SCAN-CREST") caput(set_channel, set_value) set_return([set_channel, set_value])