the counter ct2 produces the outputs 1 0 0 with counting up when the sewing machine is driven to provide the counting 7 of the counter ct1 the motor m is stopped and the counter ct2 is counted up to be 0 0 0 and the flipflop circuit ff2 is set via and circuits and12 and13 the true side output auto thereof is 1 and switches the indicating lamp 3 to continuous lighting via nor circuit nor2 a further explanation will be given with respect to automatic formation of buttonholes of the same size as that of the above mentioned buttonhole when the operating button 5 is pushed the switch sw1 is closed and the signals a b are produced 0 1 the counter ct1 is reset and the motor m is started and the output of the counter ct2 is produced 0 0 1 the indicating lamp 8 is continuously lighted by the signal from and circuit and15 and other the latch circuit bh1 is opened at its gate by the signal from and circuit and7 and others and gives to the comparator comp the number of stitches of the above mentioned right line tack when the sewing machine is driven to form stitches.