In this paper, a wireless tracking control problem with varying time delay longer than one sampling interval is discussed, and a preview controller is employed for precise motion control. A delay-dependent system model is first introduced and a reference generator is then employed to model the previewed future reference. The system model is augmented with the reference generator and an optimal controller is synthesized to minimize a quadratic cost function of tracking errors and control inputs. A time-varying Kalman filter is designed for state estimation and feedback control. To make the Kalman filter feasible under long time delay, a linear regression model is proposed for delay estimation based on past measurements. A new wireless protocol called RT-WiFi is developed for high-speed and real-time control applications. Using the delay measurement from the RT-WiFi network, simulation studies is conducted to verify the effectiveness of the proposed algorithm.