Patent ID: 7878132

Claim:
A sewing machine comprising: a presser body supported on a lower end of a presser bar; a presser frame which is slidable with respect to the presser body, and is operable to press a workpiece and to move in accordance with a feeding of the workpiece during a sewing operation; a button holding device including a fixed portion, and a sliding portion facing the fixed portion and movable along a cloth feeding direction with respect to the presser frame, and wherein the button holding device is operable to hold a button between the fixed portion and the sliding portion; a position detecting device including a sliding base attached to the presser frame so as to extend along the cloth feeding direction, and a sliding member attached to the presser body and slidable with respect to the sliding base, wherein the position detecting device is operable to detect a shift amount of the presser frame from a sewing start position in accordance with a contact position of the sliding member and the sliding base in the cloth feeding direction; a button diameter detecting switch including a detecting portion attached to the presser frame and movable in the cloth feeding direction together with the presser frame, and an abutting portion which contacts with the detecting portion when the detecting portion is moved by a certain distance in accordance with a movement of the presser frame, wherein the button diameter detecting switch is operable to detect that the sewing operation is carried out by a length that corresponds to a diameter of the button held by the button holding device; and a control device which is operable to obtain, from the position detecting device, the shift amount of the presser body from the sewing start position when the button diameter detecting switch detects that the sewing operation is carried by the length that corresponds to the diameter of the button, and is operable to control a drive of a sewing needle and the feeding of the workpiece such that a buttonhole stitch corresponding to the diameter of the button is formed.