reset to 34 0 34 in step 31 in step 32 an increment of 1 is added to the register p in step 33 the frame 4 is moved for a set distance in the x direction by the x motor 15 and the work 6 is scanned in the x direction for same distance with the frame 4 if the sensor 13 detects no pattern 6a in step 34 the step 35 is performed and it is judged whether or not the count of the register p has attained a set point n if the count of the register p has attained the set point n step 36 is performed and the frame 4 is moved in the y direction by the y motor 16 and the control is returned to step 31 if the count in the register p hasn 39 t attained the set point n the control is returned to step 33 without motion in the y direction the count n means the full movement of the work 6 from one end to the other end in the x direction if the sensor 13 detects a pattern 6a in step 34 step 40 is performed and it is checked whether or not a pattern 6a is detected in the section z fig5 in the case of 34 yes 34 the control goes to step 40 if step 60 shows a negative conclusion the control goes to step 50 which is shown in fig8 in detail in step 50 the portion where the pattern 6a exists is searched from the section a to the section h in turn and the x motor 15 and or the y motor 16 are operated thus the pattern 6a is moved.