switch 33 is closed the controller 32 is reset to start an initial state setting program shown in fig5 first the controller 32 receives the output signal of the photoelectric interrupter 31 of the needle position detector 29 hereinafter referred to as output signal s1 in step a when the decision made in step b is affirmative namely when the output signal s1 of the photoelectric interrupter 31 is 0 the controller 32 drives the arm shaft driving motor 23 repeatedly for rotation through a minute angle u03b4 u03b8 in the normal direction until the output signal s1 of the photoelectric interrupter 31 goes 1 steps c d and e when the decision made in step b is negative namely when the output signal s1 of the photoelectric interrupter 31 is 1 the controller 32 drives the arm shaft driving motor 23 repeatedly for rotation through the minute angle u03b4 u03b8 in the reverse direction until the output signal s1 of the photoelectric interrupter 31 goes 0 steps f g and h upon the change of the output signal s1 of the photoelectric interrupter 21 from 0 to 1 while the arm shaft driving motor 23 is being driven for rotation in.