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. The middle of the cavity is a piston. On both sides are two electromagnets. Side, by controlling the movement of the valve body to open or close different drain holes, and the oil inlet is always open, hydraulic oil will enter different drain pipes, and then the pressure of the oil to push the piston of the cylinder Drive the piston rod, and the piston rod drives the mechanical device. In this way, the movement of the electromagnet is controlled to control the mechanical movement.