Esempio n. 1
0
 public virtual int GetVacuumErrorState()
 {
     return(Pump.GetVacuumErrorState());
 }
Esempio n. 2
0
        /// <summary>
        /// Check for leaks.
        /// </summary>
        /// <remarks>
        /// This is to check if the components in the closed gas delivery system work properly including
        /// tubing, 3 solenoid valves, manifolds, check valves, vacuum sensor, flow sensor and pump.
        /// The pump failure to operate could also cause this test to fail.
        /// If a leakage is found, flow check will be meaningless.
        /// </remarks>
        /// <param name="details">The details to fill in.</param>
        private void TestForLeak(DetailsBuilder details)
        {
            Pump.CloseAllValves( true );

            Thread.Sleep( 500 ); // Give the valves a chance to finish closing

            int pumpVoltage = 80; // initial voltage for leak test
            bool leakCheck1Failed = true;
            ushort vac1Raw;
            double vac1Inches;
            string vac1String;
            const int maxPumpVoltage = 120;
            const ushort rawInches40 = 360;
            const int inches40 = 40;
            const int pumpVoltageIncrement = 10;
            //const ushort rawInches55 = 466;
            //const int inches55 = 55;

            Pump.Start( pumpVoltage ); // start pump with initial voltage

            //Suresh 19-JUNE-2012 INS-3067
            do
            {
                // After changing pump voltage, always wait 1 second before reading  
                // vacuum sensor to give the sensor time to adjust to the change.
                Thread.Sleep( 1000 );

                // Take vacuum reading (vac1)
                vac1Raw = Pump.GetRawVacuum();
                vac1Inches = Pump.ConvertRawVacuumToInches( vac1Raw );
                vac1String = BuildCountAndUnitString( vac1Raw, vac1Inches, 1, "\"" );

                Log.Debug( string.Format( "Vacuum: {0}, Pump voltage: {1}", vac1String, pumpVoltage ) );

                // Check vacuum reading against target pressure.  Pass after we reach or exceed target.
                if ( vac1Raw >= rawInches40 )
                {
                    // Pass if vac1 >= 40 inches of water
                    leakCheck1Failed = false;
                    Log.Debug( string.Format( "Leak Check 1 PASSED. (vacuum exeeds {0}\")", inches40 ) );
                    break;
                }

                if ( pumpVoltage + pumpVoltageIncrement >= maxPumpVoltage )// if the pump voltage crests above 120 
                {
                    Log.Debug( string.Format( "Leak Check 1 FAILED (pump voltage exeeds {0} but vacuum under {1}\")", maxPumpVoltage, inches40 ) );
                    break;
                }

                pumpVoltage += pumpVoltageIncrement;

                Pump.SetNewPumpVoltage( (byte)pumpVoltage ); // set the new voltage to pump

            } while ( true );

            _gdpList.Add( new GeneralDiagnosticProperty( "DIAGNOSTIC_LEAK_CHECK_VAC1", vac1Raw.ToString() ) );
            _gdpList.Add( new GeneralDiagnosticProperty( "DIAGNOSTIC_LEAK_CHECK_VAC1_INCHES", vac1Inches.ToString() ) );
            _gdpList.Add( new GeneralDiagnosticProperty( "DIAGNOSTIC_LEAK_CHECK_VAC1_PASSED", (!leakCheck1Failed).ToString() ) );
            _gdpList.Add( new GeneralDiagnosticProperty( "DIAGNOSTIC_LEAK_CHECK_VAC1_PUMP_VOLTAGE", pumpVoltage.ToString() ) );
            ReportDiagnostic( details, DiagnosticResources.LEAK_CHECK_1, vac1String, leakCheck1Failed );

            int vacuumError = Pump.GetVacuumErrorState(); // Check status of Vacuum Error by calling GetVacuumErrState()

            _gdpList.Add( new GeneralDiagnosticProperty( "DIAGNOSTIC_LEAK_CHECK_VAC_ERROR", vacuumError.ToString() ) );
            //Pass no matter what the state is [Vacuum Error Status]. The purpose is to keep the data structure of the report same as previous version. 
            ReportDiagnostic( details, DiagnosticResources.VACUUM_ERROR_STATUS, vacuumError.ToString(), false );

            // Stop pump
            Pump.Stop();

            //Open Solenoid #1 for 1 second to relieve the pressure
            Pump.OpenValve( 1, false );
            Thread.Sleep( 1000 ); // 1 sec
            Pump.CloseValve( 1 ); 
        }