Ejemplo n.º 1
0
        /// <summary>
        ///  Y轴  F1019, F2019主汽流量       X轴 F1324, F2324低压缸排汽流量
        /// </summary>
        private void Chart1Bind()
        {
            double pointX = 0;
            double pointY = 0;

            if (this.UnitNO == 5)
            {
                try
                {
                    pointX = TagValue.GetFinishedTagValueFive("F1324");
                    if (pointX == GlobalVariables.BadValue)
                    {
                        pointX = TagValue.GetSetValueFive("1324", "SetValue");
                    }
                    pointY = TagValue.GetFinishedTagValueFive("F1019");
                    if (pointY == GlobalVariables.BadValue)
                    {
                        pointY = TagValue.GetSetValueFive("1019", "SetValue");
                    }
                }
                catch { }
            }
            else if (this.UnitNO == 6)
            {
                try
                {
                    pointX = TagValue.GetFinishedTagValueSix("F2324");
                    if (pointX == GlobalVariables.BadValue)
                    {
                        pointX = TagValue.GetSetValueSix("2324", "SetValue");
                    }
                    pointY = TagValue.GetFinishedTagValueSix("F2019");
                    if (pointY == GlobalVariables.BadValue)
                    {
                        pointY = TagValue.GetSetValueSix("2019", "SetValue");
                    }
                }
                catch { }
            }

            //闪点绑定
            this.chart1.Series["chart3Series"].Points.Clear();
            this.chart1.Series["chart3Series"].Points.AddXY(pointX, pointY);
            this.chart1.Series["chart3Series"].Label = "低压缸排汽流量:" + pointX + "\n\n      主汽流量:" + pointY;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 折线图表 绑定
        /// </summary>
        private void Chart1Bind()
        {
            //if (GlobalVariables.dtChartDatas == null || GlobalVariables.dtChartDatas.Rows.Count < 1)
            //    return;
            double pointX  = 550;
            double pointY  = 25;
            string dygpqll = "";  //低压缸排气流量1324/2324
            double dqy     = 0.1; //大气压

            //string dygjqyl = "--"; //低压缸进汽压力

            //int rowCount = GlobalVariables.dtChartDatas.Rows.Count - 1;
            //if (GlobalVariables.UnitNumber == 1)
            //{
            //    try
            //    {
            //        //这里添加#1机组的XY坐标
            //        pointX = double.Parse(GlobalVariables.dtChartDatas.Rows[rowCount]["F1169"].ToString());
            //        //pointY = double.Parse(CalDataTable.Rows[0]["F3126"].ToString()) * 1000;
            //        dygpqll = GlobalVariables.dtChartDatas.Rows[rowCount]["F1324"].ToString();
            //        dygjqyl = CalTree.GetShowValue(1111, "MPa", "F3004");
            //    }
            //    catch { }
            //}
            //else
            //{
            //    try
            //    {
            //        //这里添加#2机组的XY坐标
            //        pointX = double.Parse(GlobalVariables.dtChartDatas.Rows[rowCount]["F2169"].ToString());
            //        //pointY = double.Parse(CalDataTable.Rows[0]["F3126"].ToString()) * 1000;
            //        dygpqll = GlobalVariables.dtChartDatas.Rows[rowCount]["F2324"].ToString();
            //        dygjqyl = CalTree.GetShowValue(2111, "MPa", "F3004");
            //    }
            //    catch { }
            //}
            //try
            //{
            //    pointY = double.Parse(GlobalVariables.dtChartDatas.Rows[rowCount]["F3126"].ToString()) * 1000;
            //    dqy = double.Parse(GlobalVariables.dtChartDatas.Rows[rowCount]["F3004"].ToString()) * 1000;
            //}
            //catch { }

            if (this.UnitNO == 5)
            {
                try
                {
                    //这里添加#1机组的XY坐标
                    // X坐标修改成低压缸排汽流量 ZZH 20160830
                    pointX = TagValue.GetFinishedTagValueFive("F1324");// double.Parse(CalDataTable.Rows[0]["F1169"].ToString());
                    if (pointX == GlobalVariables.BadValue)
                    {
                        pointX = TagValue.GetSetValueFive("1324", "SetValue");
                    }
                    dygpqll = TagValue.GetShowValueFive(1324, "t/h", ""); // CalDataTable.Rows[0]["F1324"].ToString();
                    //dygjqyl = TagValue.GetShowValueFive(1111, "MPa", "");
                    //这里,如果不配置公共,需要修改 ZZH 2016-9-17
                    pointY = TagValue.GetFinishedTagValueFive("F3126") * 1000; //double.Parse(CalDataTable.Rows[0]["F3126"].ToString()) * 1000;
                    dqy    = TagValue.GetFinishedTagValueFive("F3004") * 1000; //double.Parse(CalDataTable.Rows[0]["F3004"].ToString()) * 1000;
                    if (pointY == GlobalVariables.BadValue * 1000)
                    {
                        pointY = TagValue.GetSetValueFive("3126", "SetValue") * 1000;
                    }
                    if (dqy == GlobalVariables.BadValue * 1000)
                    {
                        dqy = TagValue.GetSetValueFive("3004", "SetValue") * 1000;
                    }
                }
                catch { }
            }
            else if (this.UnitNO == 6)
            {
                try
                {
                    //这里添加#2机组的XY坐标
                    pointX = TagValue.GetFinishedTagValueSix("F2324");//double.Parse(CalDataTable.Rows[0]["F2169"].ToString());
                    if (pointX == GlobalVariables.BadValue)
                    {
                        pointX = TagValue.GetSetValueSix("2324", "SetValue");
                    }
                    dygpqll = TagValue.GetShowValueSix(2324, "t/h", ""); //CalDataTable.Rows[0]["F2324"].ToString();
                    //dygjqyl = TagValue.GetShowValueSix(2111, "MPa", "");
                    //这里,如果不配置公共,需要修改 ZZH 2016-9-17
                    pointY = TagValue.GetFinishedTagValueSix("F4126") * 1000; //double.Parse(CalDataTable.Rows[0]["F3126"].ToString()) * 1000;
                    dqy    = TagValue.GetFinishedTagValueSix("F4004") * 1000; //double.Parse(CalDataTable.Rows[0]["F3004"].ToString()) * 1000;
                    if (pointY == GlobalVariables.BadValue * 1000)
                    {
                        pointY = TagValue.GetSetValueSix("4126", "SetValue") * 1000;
                    }
                    if (dqy == GlobalVariables.BadValue * 1000)
                    {
                        dqy = TagValue.GetSetValueSix("4004", "SetValue") * 1000;
                    }
                }
                catch { }
            }



            //绑定低压缸排气流量和相对容积流量
            this.label27.Text = dygpqll;
            this.label28.Text = pointY + " KPa";
            //this.label1.Text = dygjqyl; //低压缸进气压力
            //真空 F3004*1000 - F3126*1000
            this.label43.Text = Math.Round(dqy - pointY, 2) + " KPa";
            try
            {
                //Y2轴 真空绑定
                double max = dqy - 0;
                double min = dqy - 70;
                this.chart1.ChartAreas[0].AxisY2.Minimum = min;
                this.chart1.ChartAreas[0].AxisY2.Maximum = max;
            }
            catch { }


            //闪点绑定
            this.chart1.Series["chart3Series"].Points.Clear();
            this.chart1.Series["chart3Series"].Points.AddXY(pointX, pointY);
            this.chart1.Series["chart3Series"].Label = "低压缸排气流量:" + dygpqll + "\r\n真        空:" + (dqy - pointY) + "KPa";
            //this.chart1.Series["chart3Series"].Label = "低压缸排气流量:" + dygpqll + "\r\n低压缸进汽压力:" + dygjqyl + "\r\n真        空:" + (dqy - pointY) + "KPa";
        }