Select program or execute command, control instructions as function of axis position