Exemple #1
0
 //@@ Close External Calibrated leak @@//
 public static void Close_Extleak(int slotNum)
 {
     try
     {
         DAS.WriteLine("ROUTE:OPEN (@11{0})", slotNum);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #2
0
 //@@ Open the external calibrated leak @@//
 public static void Open_Extleak(int slotNum)
 {
     try
     {
         DAS.WriteLine("ROUTE:CLOSE (@11{0})", slotNum);
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #3
0
 //@@ Power ON the UUT @@//
 public static void DAS_Power_ON(string slotNum)
 {
     try
     {
         // before power ON make sure that all 4 relays is open
         DAS_Power_OFF(slotNum);
         Thread.Sleep(2000);
         DAS.WriteLine("ROUTe:CLOSE " + Channel);
         slotNum = null;
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #4
0
        // @@ Measure the DC voltage drop between the black and red wire of the chasis fan connector. The acceptable range is 22.8V ~ 25.2V @@ //
        public static string Measure_DCV(string channel)
        {
            try
            {
                DAS.WriteLine("MEASure:VOLT:DC? (@ " + channel + ")");
                Thread.Sleep(2000);

                string retval = DAS.Read();

                return(retval);
            }

            catch (Exception)
            {
                throw;
            }
        }
Exemple #5
0
        //@@ Measure Resistance between ground blade and test port metal @@//
        public static string Measure_Resistance(int switching, string res_range)
        {
            try
            {
                DAS.WriteLine("MEASure:RES? " + res_range + ", (@" + (Res_channel + switching) + ")");
                Thread.Sleep(2000);

                string reading = DAS.Read();

                return(reading);
            }

            catch (Exception)
            {
                throw;
            }
        }
Exemple #6
0
        // Hairus added to get more accurate resistance measurement.
        /// <summary>
        /// To configure resistance measurement range and resolution for specific channel
        /// </summary>
        /// <param name="channel">Channel to be configured</param>
        /// <param name="range">Resistance range</param>
        /// <param name="resolution">Resolution</param>
        public static double Measure_Resistance(int channel, string range, string resolution)
        {
            try
            {
                int finalChannel = Res_channel + channel;
                //DAS.WriteLine("ROUTE:SCAN (@)");
                DAS.WriteLine("CONF:RES {0},{1},(@{2})", range, resolution, finalChannel);
                //DAS.WriteLine("ROUT:SCAN (@{0})", channel);
                //Thread.Sleep(3000);
                DAS.WriteLine("ROUT:CHAN:DELAY 5");
                DAS.WriteLine("INIT");
                DAS.WriteLine("FETCH?");
                var reading = DAS.ReadNumberAsDouble();

                return(reading);
            }
            catch (Exception)
            {
                throw;
            }
        }
Exemple #7
0
 //@@ Power OFF the UUT @@//
 public static void DAS_Power_OFF(string slotNum)
 {
     try
     {
         string channel = string.Empty;
         if (slotNum == "1")
         {
             channel = "(@101,102,103,104)";
             DAS.WriteLine("ROUTe:OPEN " + channel);
         }
         else
         {
             channel = "(@105,106,107,108)";
             DAS.WriteLine("ROUTe:OPEN " + channel);
         }
         //DAS.WriteLine("ROUTe:OPEN " + Channel);
         slotNum = null;
     }
     catch (Exception)
     {
         throw;
     }
 }
Exemple #8
0
        //@@ Measure resistance between line blade and neutral blade. The acceptable range is based on model number of the UUT. @@//
        public static Boolean Measure_Res_LB_NB_ON(string modelnumber, string res_range)
        {
            Boolean status = false;

            DAS.Timeout = 10000;
            try
            {
                //115V, PR02 and PD03
                if (modelnumber == "VSPR021" || modelnumber == "VSPD030")
                {
                    DAS.WriteLine("MEASure:RES? " + res_range + ", (@" + (Res_channel + 4) + ")");
                    Thread.Sleep(2000);

                    string reading = DAS.Read();

                    if (Convert.ToDouble(reading) >= 2.0 && Convert.ToDouble(reading) <= 15.0)
                    {
                        status = true;
                    }
                    else
                    {
                        throw new Exception("Measured value out of acceptable range.");
                    }
                }

                //230V, PR02 and PD03
                else if (modelnumber == "VSPR022" || modelnumber == "VSPD032")
                {
                    DAS.WriteLine("MEASure:RES? " + res_range + ", (@" + (Res_channel + 4) + ")");
                    Thread.Sleep(2000);

                    string reading = DAS.Read();

                    if (Convert.ToDouble(reading) >= 9.2 && Convert.ToDouble(reading) <= 60.0)
                    {
                        status = true;
                    }
                    else
                    {
                        throw new Exception("Measured value out of acceptable range.");
                    }
                }

                //115V, MR15 and BR15
                else if (modelnumber == "VSMR151" || modelnumber == "VSBR151")
                {
                    DAS.WriteLine("MEASure:RES? " + res_range + ", (@" + (Res_channel + 4) + ")");
                    Thread.Sleep(2000);

                    string reading = DAS.Read();

                    if (Convert.ToDouble(reading) >= 1.0 && Convert.ToDouble(reading) <= 5.0)
                    {
                        status = true;
                    }
                    else
                    {
                        throw new Exception("Measured value out of acceptable range.");
                    }
                }

                //230V, MR15 and BR15
                else if (modelnumber == "VSMR152" || modelnumber == "VSBR152")
                {
                    DAS.WriteLine("MEASure:RES? " + res_range + ", (@" + (Res_channel + 4) + ")");
                    Thread.Sleep(2000);

                    string reading = DAS.Read();

                    if (Convert.ToDouble(reading) >= 3.2 && Convert.ToDouble(reading) <= 15.0)
                    {
                        status = true;
                    }
                    else
                    {
                        throw new Exception("Measured value out of acceptable range.");
                    }
                }

                //115V, MD15, MD30, BD15 and BD30
                else if (modelnumber == "VSMD301" || modelnumber == "VSBD301" || modelnumber == "G8601-64004" || modelnumber == "G8602-64004")
                {
                    DAS.WriteLine("MEASure:RES? " + res_range + ", (@" + (Res_channel + 4) + ")");
                    Thread.Sleep(2000);

                    string reading = DAS.Read();

                    if (Convert.ToDouble(reading) >= 0.5 && Convert.ToDouble(reading) <= 1.2)
                    {
                        status = true;
                    }
                    else
                    {
                        throw new Exception("Measured value out of acceptable range.");
                    }
                }

                //230V, MD15, MD30, BD15 and BD30
                else if (modelnumber == "VSMD302" || modelnumber == "VSBD302" || modelnumber == "G8601-64005" || modelnumber == "G8602-64005")
                {
                    DAS.WriteLine("MEASure:RES? " + res_range + ", (@" + (Res_channel + 4) + ")");
                    Thread.Sleep(2000);

                    string reading = DAS.Read();

                    if (Convert.ToDouble(reading) >= 1.0 && Convert.ToDouble(reading) <= 10.0)
                    {
                        status = true;
                    }
                    else
                    {
                        throw new Exception("Measured value out of acceptable range.");
                    }
                }

                else
                {
                    throw new Exception("Unknown model number.");
                }
            }

            catch (Exception)
            {
                throw;
            }

            return(status);
        }