1. I attempt to tally the pick and place cycles up to a specific count, as the arm may reach singularity after a certain number of picks. To prevent this, I must reconfigure the arm after a set number of cycles, as shown in picture 2. I have been attempting to utilize a counter for this purpose, but I am unsure of where to insert the code. Could someone guide this matter? Thank you.
2. I have included a pseudo code for reference.
R[counter] = 0
initial position
ini data
R[7, x]=0
R[7, y]=0
y loop (from top origin to Bottom)
FOR R[2]= 1 to 4
x loop (from left origin to Right)
FOR R[2]= 1 to 5
pick
grind
place
x Offset (X parts in apart from 110 distance)
PR[7,1] = (PR[7,1]+110)
END FOR
reset x to 0
PR[7,1] = 0
y Offset (y parts in apart from 13 distance)
PR[7,2]=PR[7,2]+130
END FOR
where to put
R[Counter] = (R[Counter]+1)
If R[Counter]<11, JMP LBL [1]
Call second positioning
Continue the pick and place