i am not totaly into this (planes and converting list) but maybe this will help you short term.
at second picture
instead of:
movel(pose_trans(planescript,p[0,0,0,0,0,0]))
use
P_planescript=p[Planescript[0],Planescript[1],Planescript[2],Planescript[3],Planescript[4],Planescript[5]]
movel(pose_trans(P_planescript,p[0,0,0,0,0,0]))
it is not pretty but i hope this will work.
Corné

