This paper proposes an automatic voltage control (AVC) system for power systems with limited continuous voltage control capability. The objective is to minimize the operational cost over a period, which consists of the power loss in the grid, the shunt switching cost, the transformer tap change cost and the generator reactive power output cost. The problem is formulated in a multi-stage optimal reactive power flow (MORPF) framework, solved by the nonlinear programming techniques via a rolling process. The voltage uncertainty caused by wind power forecasting errors is considered in the optimal voltage/var dispatch by including a security margin in the voltage magnitude constraints. The robustness of the MORPF solution considering the voltage security margin is therefore improved. A platform is built for the offline investigations, employing the measurement data from the Danish national electricity control center, where study cases based on the western Danish power system demonstrate the superiority of the proposed AVC system in term of the cost minimization. Monte Carlo simulations are carried out to verify the proposed method on the robustness improvements.