/// <summary>
        /// 直接作用式单向阀泄漏量试验
        /// </summary>
        private void DirectLeakageTest()
        {
            CurvePanel panel = new CurvePanel();

            panel.Title  = TestType.直接作用式单向阀泄漏量试验.ToString() + "曲线";
            panel.XLabel = "压力(MPa)";
            panel.YLabel = "泄漏量(Ml/Min)";
            Curve curve_leak = new Curve();

            panel.AddCurve(curve_leak);
            curve_leak.Name = "泄漏量";

            float retnum;
            //float testret = 0;
            int   time         = 0;
            float max_pressure = (float)this.额定压力;
            bool  needtest     = true;

            //this.SetCircuitState(CircuitState.BTIn);
            this.SetCircuitState(CircuitState.T);

            while (needtest)
            {
                FormLeakHydcheck leakHydcheck_config = new FormLeakHydcheck(max_pressure);
                needtest = leakHydcheck_config.ShowDialog() == DialogResult.OK;
                if (!needtest)
                {
                    break;
                }
                this.SetThrottleValve(100f);//使阀13,14_1,14_2工作于右位,且开口最大
                this.SetSourcePre(leakHydcheck_config.实验压力);
                this.SetSourceFlow(20);
                //在试验报告记录用
                this.TestPressure = leakHydcheck_config.实验压力;
                this.TimeKeep     = leakHydcheck_config.testtimecount;

                this.WaitPressureTUntil(leakHydcheck_config.实验压力);
                FormLeakageReturn frm_return = new FormLeakageReturn(leakHydcheck_config.testtimecount, this);
                frm_return.ShowDialog();
                time    = leakHydcheck_config.testtimecount;
                testret = frm_return.retvol;
                //retnum = (frm_return.retvol / leakHydcheck_config.testtimecount) * 60f;
                //curve_leak.AddPoint(leakHydcheck_config.实验压力, retnum);
            }
            this.SetSourcePre(0);
            this.SetSourceFlow(0);
            this.dictCurvePanel.Remove(panel.Title);
            this.dictCurvePanel.Add(panel.Title, panel);
            MessageBox.Show("泄漏实验已完成");
        }
Beispiel #2
0
        /// <summary>
        /// 内部泄漏试验
        /// 本试验是为了测定方向阀处某一工作状态时,具有一定压力差又互不相通的阀口之间的油液世漏量
        /// 建立加压压力和泄漏量的关系,输出内泄漏曲线,横坐标为加压压力,纵坐标为泄漏量
        /// </summary>
        protected override void IntenalLeakage()
        {
            CurvePanel panelLeakage = new CurvePanel();
            Dictionary <string, Curve> dictCurve = new Dictionary <string, Curve>();
            float retvol  = 0;
            float testret = 0;
            int   time    = 0;

            panelLeakage.Title  = TestType.内部泄漏试验.ToString() + "曲线";
            panelLeakage.XLabel = "压力(MPa)";
            panelLeakage.YLabel = "泄漏量(ml/min)";
            this.SetCircuitState(CircuitState.PTOut);
            for (int i = 0; i < 10; i++)
            {
                this.SetTestValveState(TestValveState.右位);
                Pause(1000);
                this.SetTestValveState(TestValveState.左位);
                Pause(1000);
            }
            this.SetTestValveState(TestValveState.中位);
            this.SetSourceFlow(0);
            this.SetSourcePre(0);
            Pause(1000);
            this.SetCircuitState(CircuitState.P);
            bool   needtest = true;
            Curve  curve;
            string oil_loc;

            //获取参数
            while (needtest)
            {
                FormSetleak frmConfig = new FormSetleak();
                needtest = frmConfig.ShowDialog() == DialogResult.OK;
                if (!needtest)
                {
                    break;
                }

                //获取接油口位置
                oil_loc = frmConfig.location;
                string key = frmConfig.elestate.ToString() + frmConfig.location;
                if (!dictCurve.Keys.Contains(key))
                {
                    curve      = new Curve();
                    curve.Name = key + "口";
                    dictCurve.Add(key, curve);
                }
                else
                {
                    curve = dictCurve[key];
                }

                //设置压力流量
                this.SetSourcePre(frmConfig.试验压力);
                this.SetSourceFlow(20);
                this.WaitPressurePUntil(frmConfig.试验压力);
                this.SetTestValveState(frmConfig.elestate);
                System.Threading.Thread.Sleep(1000);

                //保压延时并获取结果
                FormLeakageReturn frm = new FormLeakageReturn(frmConfig.Timecount, this);
                frm.ShowDialog();
                time    = frmConfig.Timecount;
                testret = frm.retvol;
                retvol  = (frm.retvol / frmConfig.Timecount) * 60f;//获取泄漏量的值

                curve.AddPoint(frmConfig.试验压力, retvol);
                this.SetTestValveState(TestValveState.中位);
            }

            foreach (string key in dictCurve.Keys)
            {
                panelLeakage.AddCurve(dictCurve[key]);
            }
            this.dictCurvePanel.Remove(panelLeakage.Title);
            this.dictCurvePanel.Add(panelLeakage.Title, panelLeakage);
            this.SetSourcePre(0);
            this.SetSourceFlow(0);
            this.SetCircuitState(CircuitState.ALLOn);
            this.log.Debug("内部泄漏实验完成");
        }