I need Help in servo control

i’m trying to make a scanning mechanism using a set of two servo motors, but i want the pattern of the scan to be like this :
------------------->--------------------o
^------------------<---------------------
------------------->--------------------^
^------------------<---------------------
------------------->--------------------^
^------------------<---------------------
I------------------>--------------------^

starting from (I) till (O) but every line it shift to the upper line without returning to the start position again
i tried using (for) loop including an (if) condition with (break) and (goto) but it didn’ work.

I'd love to help but I haven't the slightest idea what you mean, sorry.

Post your code. Use [ code ] tags.

This looks like a 'raster' scan, like old TVs used to do. That should be easy.

Something like this pseudo code

move servo A to the opposite end
move servo B up a little
repeat as needed

...R

i'm trying to make a scanning mechanism using a set of two servo motors, but i want the pattern of the scan to be like this :

Look at the "sweep" servo example in the arduino IDE examples. At the end of each pan sweep, add an incremental movement to the tilt servo.