It might be because of your declaration. No spaces between declarations naming’s. Controller doesn’t like it.
Also remove the “.” after the declarations.
Should be:
LOCAL PERS pose_a:=[[0,0,0],[1,0,0,0]];
LOCAL PERS pose_b:=[[0,0,0],[1,0,0,0]];
The first post has a valid declaration of the pose, it is merely A and B, pose indicates data type. You do not have to break it down to the atomic level with x, y and z to assign the values, see below:
VAR pos myPos:=[0,0,0];
myPos:=A.trans;
MoveL RelTool(myPick,myPos.x,myPos.y,myPos.z), speed, tool, blah, blah;
To use those values in the RelTool, however, you must break it down as seen above.
So, I cut declaration part (p_0_x:=pePAT_OK_0.trans.x;) from search_routine and moved it into welding_routine before Arc commands. And now everything worked.
Thank you very much for your help!