A method for controlling a ventilator includes the steps of providing an inhalation pressure limit, determining when a pressure in a connection to a patient circuit is greater than the inhalation pressure limit, and opening the valve when the pressure is greater than the inhalation pressure limit. An associated computer readable medium for controlling the method is also described.