LabVIEW is one of the popular simulation program in the academic and industrial applications. In this paper, online simulator for the depth control of a submarine has presented. In order to keep the submarine at a certain level below the sea surface, a fuzzy logic controller (FLC) as a major control unit was designed and employed with LabVIEW Control Design and Simulation Toolkit. Also comparison between fuzzy logic (FL) and PID controlled system was presented. Simulation results show that system has better settling time and no overshoots with FLC.