I have used some defined positions in my program
And now some other tray has slightly different (+5mm in one direction) coordinates ( and need to make the program work with both depending if some input "TrayType2" for example is true or not.
What is the most elegant way to solve this.
I could create completely new points for the new tray and use a CASE statement for the different cases - one using the old group of points, and the other using the new ones. But that seems messy.
I could change the base before these points with an IF statement... and then change the base right back after these points.
IF $IN==TRUE THEN BAS(#BASE,2) ENDIF PTP TrayLeftUp PTP TrayLeftDown GripperClose() PTP TrayLeftDown2 PTP TrayUp IF $IN==TRUE THEN BAS(#BASE,1) ENDIF
But how would the pro-s do it?