PROCESS(MDR,MDL) BEGIN --底部滑块超左极限位置的监测及处理和移动速度的设置 IF(rising_edge(MDL))THEN IF(0<X1 and X2<640)THEN X1<=X1-30; X2<=X2-30; X3<=X3-30; X4<=X4-30; ELSIF(X1<0 )THEN X1<=0;Y1<=400;X2<=0;Y2<=460; X3<=30;Y3<=480;X4<=30;Y4<=480; END IF ; END IF; --底部滑块超右极限位置的监测及处理和移动速度的设置 IF(rising_edge(MDR))THEN IF(0<X1 and X2<640)THEN X1<=X1+30; X2<=X2+30; X3<=X3+30; X4<=X4+30; ELSIF(X3>640)THEN X1<=610;Y1<=400;X2<=610;Y2<=460; X3<=640;Y3<=480;X4<=640;Y4<=480; END IF ; END IF ; END PROCESS;