A switch is installed in the cab, and the safety pin can be installed by simply pressing the switch button in the cab. Therefore, the trouble of getting out of the cab is saved. The new technology of opening and closing the safety pin is achieved through the use of the electric drive system of the excavator, rather than the hydraulic system. Therefore, high-cost oil pressure is replaced by electricity, which saves costs in production. In the cab, the automatic sound of the horn can be used to determine whether it has been connected. In the case of a broken wire, the safety of manual conversion can be ensured.