Incompletion of cycle

Hi

I’m attaching a file to show an example of what I’m doing. The purple block is supposed to move right, drop one line, move left, drop one line, move right again, etc.

I don’t know what I’m doing wrong, because the block is doing the first couple of lines correct, then suddenly it doesn’t complete its cycle.

Any help will be appreaciated.