Adjusting robot code

Hello, I’m trying to adjust my code to perform a task where it places six and then lifts one and repleces with a new product however, upon adjusting the code I am now getting the error code below and the conveyor now more the pattern before it can finish being placed can anyone assist?


Adjusted the code to how i thought it may have work however, code doesn’t do as i thought it only picks and places from conveyor 1 to index table can anyone advise. Code will be below