A program for automatic and periodic determination of respiratory mechanics in artificially ventilated patients is described. Airway pressure and flow signals are obtained from the ventilator in the controlled ventilation mode with constant flow inflation and end-inspiratory pause. Periodically, the program records both signals for a given time and it delimits a ventilatory cycle and its components out of this record. Then, four mechanical parameters of the respiratory system are calculated: (1) Rinit, the resistance obtained with the end-inflation occlusion technique; (2) Ers, the elastance (inspiratory) calculated from the slope of the airway pressure profile during inflation; (3) tau, the expiratory time constant; (4) PEEP, the global positive end expiratory pressure. All parameter measurements have been evaluated in experimental conditions, and are in good agreement with reference values. The complete software includes the display of the signals and of the trends together with automatic disk file backups. An additional program allows one to display the trends again and to create table text files containing all the recorded data for further analysis. The system proved to work in ICU and anaesthesia patients with various ventilators.