A motor control device comprising: a first communication unit that is configured to transmits or receive data to or from a motor including a position detector; a position feedback controller that is configured to control an output to the motor based on position information obtained from the motor via the first communication unit, the position feedback controller being set a control parameter in accordance with characteristic information unique to the motor; a communication disconnection determination unit that is configured to determine that the motor and the motor control device are in a disconnection state based on a fact that there is no reply from the motor within a prescribed period, and to determine that the motor and the motor control device have been restored to a connection state based on a fact that a reply from the motor to the motor control device has been restarted; and a replacement determination unit that is configured to obtain identification information from an identification information storage of the motor via the first communication unit, to determine that the motor has been replaced, and to generate motor replace information, when it is determined that the motor and the motor control device have been restored to the connection state based on motor connection state information transferred from the communication disconnection determination unit, characterized in that: the motor control device is configured to initialize the control parameter in the position feedback controller, when the replacement of the motor is detected based on the motor replacement information obtained from the replacement determination unit; and to initialize the position information in the position feedback controller so that position coordinates of the motor that are included in the position information in the position feedback controller is reset based on a position of the motor after replacement. a first communication unit that is configured to transmits or receive data to or from a motor including a position detector; a position feedback controller that is configured to control an output to the motor based on position information obtained from the motor via the first communication unit, the position feedback controller being set a control parameter in accordance with characteristic information unique to the motor; a communication disconnection determination unit that is configured to determine that the motor and the motor control device are in a disconnection state based on a fact that there is no reply from the motor within a prescribed period, and to determine that the motor and the motor control device have been restored to a connection state based on a fact that a reply from the motor to the motor control device has been restarted; and a replacement determination unit that is configured to obtain identification information from an identification information storage of the motor via the first communication unit, to determine that the motor has been replaced, and to generate motor replace information, when it is determined that the motor and the motor control device have been restored to the connection state based on motor connection state information transferred from the communication disconnection determination unit, characterized in that: the motor control device is configured to initialize the control parameter in the position feedback controller, when the replacement of the motor is detected based on the motor replacement information obtained from the replacement determination unit; and to initialize the position information in the position feedback controller so that position coordinates of the motor that are included in the position information in the position feedback controller is reset based on a position of the motor after replacement. the motor control device is configured to initialize the control parameter in the position feedback controller, when the replacement of the motor is detected based on the motor replacement information obtained from the replacement determination unit; and to initialize the position information in the position feedback controller so that position coordinates of the motor that are included in the position information in the position feedback controller is reset based on a position of the motor after replacement.