A control device configured to control an input-output interface unit including an input-output circuit which is one of an input circuit and an output circuit for an electrical device , the control device comprising: a first power supply line (L11, L12) to which electric power is supplied; a first communication line (L13) through which a signal is transmitted; a first connection unit configured to connect a second power supply line (L21, L22) of the input-output interface unit and a second communication line (L23) of the input-output interface unit to the first power supply line (L11, L12) and the first communication line (L13); a control unit configured to control the input-output interface unit ; and a first changeover unit configured to switch a connection destination of the first communication line (L13) between a first terminal (T1) configured to receive a code pulse and a second terminal (T2) configured to receive or output a communication signal, wherein the control unit is configured to: switch the first changeover unit to the first terminal (T1) for a certain period of time when the power supply is started, determine whether a code indicated by the code pulse received from the first terminal (T1) is a regular code, cut off the electric power supplied from the first power supply line (L11, L12) to the second power supply line (L21, L22) when the code is not the regular code, and switch the first changeover switch to the second terminal (T2) when the code matches the regular code. a first power supply line (L11, L12) to which electric power is supplied; a first communication line (L13) through which a signal is transmitted; a first connection unit configured to connect a second power supply line (L21, L22) of the input-output interface unit and a second communication line (L23) of the input-output interface unit to the first power supply line (L11, L12) and the first communication line (L13); a control unit configured to control the input-output interface unit ; and a first changeover unit configured to switch a connection destination of the first communication line (L13) between a first terminal (T1) configured to receive a code pulse and a second terminal (T2) configured to receive or output a communication signal, wherein the control unit is configured to: switch the first changeover unit to the first terminal (T1) for a certain period of time when the power supply is started, determine whether a code indicated by the code pulse received from the first terminal (T1) is a regular code, cut off the electric power supplied from the first power supply line (L11, L12) to the second power supply line (L21, L22) when the code is not the regular code, and switch the first changeover switch to the second terminal (T2) when the code matches the regular code. switch the first changeover unit to the first terminal (T1) for a certain period of time when the power supply is started, determine whether a code indicated by the code pulse received from the first terminal (T1) is a regular code, cut off the electric power supplied from the first power supply line (L11, L12) to the second power supply line (L21, L22) when the code is not the regular code, and switch the first changeover switch to the second terminal (T2) when the code matches the regular code. <EOS>