the calculation results of the calculation processed by the cpu 42 next a routine for a bobbin thread remaining amount management control is described based on the flow chart in fig5 the bobbin thread remaining amount management control is executed as an interruption process to the main control whenever the sewing needle 6 reaches the needle raised position during the execution of the sewing process in fig5 codes si i 11 12 13 indicate each step this control is started when power is supplied by the power switch at this point a sewing extension flag to instruct the extension of sewing when the bobbin thread remaining amount becomes scarce has not been set s 11 no and the bobbin thread remaining amount detection process is executed s 12 the bobbin thread remaining amount detection process is executed in accordance with the flowchart shown in fig6 that is after the detection signals provided from the two light receiving elements 32 and 33 are read s 31 the bobbin thread remaining amount is calculated s 32 based on the bobbin thread remaining amount table as a result of the calculation of bobbin thread remaining amount if the scarcity of the bobbin thread remaining amount is denied s.