There is a closed cavity in the solenoid valve, and there are through holes in different positions. Each hole is connected to a different oil pipe. There is a piston in the middle of the cavity, and two electromagnets on both sides. On the other hand, different oil discharge holes are opened or closed by controlling the movement of the valve body, while the oil inlet hole is normally open, the hydraulic oil will enter different oil discharge pipes, and then the piston of the cylinder is pushed by the pressure of the oil, and the piston again Drive the piston rod, and the piston rod drives the mechanical device. In this way, the mechanical movement is controlled by controlling the electric current on and off of the electromagnet.