depressed the speed control circuit sp is adjust by cpu to rotate the machine motor at a predetermined low speed at this time the controller 6 controls the stitches that is when the wiper c1 is displaced along the variable resistor vr1 it acts on the stitch width control circuit mr for controlling the stitch width fig4 shows another embodiment of the invention in fig2 if the group of contact elements l are located at the lower position the variable resistor vr2 is cut off on the other hand if the group of contact elements l in the second embodiment moved to their lower position the variable resistor vr2 is connected to the speed control circuit sp so that the rotation speed of the sewing machine may be determined by the resistance value of the variable resistor vr2 when the group of contact elements l are located at the upper position the effect is the same as in the first embodiment in fig2 operation of the circuit structure shown in fig4 will be explained with reference to the flow chart in fig5 when the program control is started by closing the source switch 4 the effect is the same with the first embodiment in fig2 as to the detection of the upper and lower positions of the contact elements l by the cpu and the operation modes switch in dependence upon the positions of the contact elements l however in this embodiment the speed control circuit sp is connected to the variable resistor vr2 which is operated by the dial 2 when the contact elements l are located at the lower position therefore the resistance value of the variable resistor vr2 determines the rotation speed of the sewing machine when the controller 6 is switched to controlling.