A sewing machine includes an embroidery frame moving device detachably
attachable to a sewing machine body and a control device. An embroidery
sewing operation is executable when the embroidery frame moving device is
attached to the body, and a normal sewing operation is executable when
the moving device is detached from the body. The control device controls
the sewing machine in a first stage under only a normal sewing mode in
which the normal sewing operation is executed. The first stage ends when
a detector detects the embroidery frame moving device initially attached
to the body. The control device further controls the sewing machine in a
second stage under either the normal sewing mode or an embroidery sewing
mode in which the embroidery sewing operation is executed. The second
stage starts after the detector has detected the embroidery frame moving
device attached to the body.