A cap attachment-detachment device comprising: a rotation driver ; a plurality of attachment-detachment portions corresponding to a plurality of containers ; and a transmitter that transmits rotation of the rotation driver to the plurality of attachment-detachment portions , wherein each of the plurality of attachment-detachment portions includes an operation portion (OP) that moves in a first direction or a second direction that is opposite to the first direction in response to rotation of the rotation driver and rotates a cap to attach the cap to or detach the cap from a corresponding container , and a restricting portion that restricts a torque to be applied to the cap by the operation portion (OP) when the cap is attached to the container , and characterized in that the cap attachment-detachment device further comprises: a rotation detector that detects rotation of the operation portion (OP); and a determiner that determines whether the cap is properly fastened to the container based on a result of detection by the rotation detector , wherein the rotation driver includes a drive pulse generator that generates a drive pulse, and an electric motor that is rotated based on a drive pulse generated by the drive pulse generator , and the determiner determines whether the cap is properly fastened to the container based on a count of drive pulses generated by the drive pulse generator and a result of detection by the rotation detector . a rotation driver ; a plurality of attachment-detachment portions corresponding to a plurality of containers ; and a transmitter that transmits rotation of the rotation driver to the plurality of attachment-detachment portions , wherein each of the plurality of attachment-detachment portions includes an operation portion (OP) that moves in a first direction or a second direction that is opposite to the first direction in response to rotation of the rotation driver and rotates a cap to attach the cap to or detach the cap from a corresponding container , and a restricting portion that restricts a torque to be applied to the cap by the operation portion (OP) when the cap is attached to the container , and characterized in that the cap attachment-detachment device further comprises: a rotation detector that detects rotation of the operation portion (OP); and a determiner that determines whether the cap is properly fastened to the container based on a result of detection by the rotation detector , wherein the rotation driver includes a drive pulse generator that generates a drive pulse, and an electric motor that is rotated based on a drive pulse generated by the drive pulse generator , and the determiner determines whether the cap is properly fastened to the container based on a count of drive pulses generated by the drive pulse generator and a result of detection by the rotation detector . a rotation detector that detects rotation of the operation portion (OP); and a determiner that determines whether the cap is properly fastened to the container based on a result of detection by the rotation detector , wherein the rotation driver includes a drive pulse generator that generates a drive pulse, and an electric motor that is rotated based on a drive pulse generated by the drive pulse generator , and the determiner determines whether the cap is properly fastened to the container based on a count of drive pulses generated by the drive pulse generator and a result of detection by the rotation detector . a drive pulse generator that generates a drive pulse, and an electric motor that is rotated based on a drive pulse generated by the drive pulse generator , and the determiner determines whether the cap is properly fastened to the container based on a count of drive pulses generated by the drive pulse generator and a result of detection by the rotation detector . <EOS>