Esempio n. 1
0
        public static void lineStyle2()
        {
            int l = signalList[SigPos.GetCurrentSignal()].Count();

            double[] yy = new double[l];
            for (int i = 0; i < l; i++)
            {
                yy[i] = signalList[SigPos.GetCurrentSignal()][i];
            }
            double yMax = yy.Max();
            double yMin = yy.Min();

            foreach (double a in yy)
            {
                if (a >= (yMax * 0.98))
                {
                    colorList.Add(Color.DarkRed);
                    lineWidthList.Add(3);
                }
                else if (a <= (yMin * 0.98))
                {
                    colorList.Add(Color.DarkBlue);
                    lineWidthList.Add(3);
                }
                else
                {
                    colorList.Add(Color.Green);
                    lineWidthList.Add(2);
                }
            }
        }
Esempio n. 2
0
        public void CreateChart()
        {
            int signr = SigPos.GetCurrentSignal();
            int l     = RecData.signalList[signr].Count();

            for (int i = 0; i < l; i++)
            {
                chart1.Series[0].Points.Add(RecData.signalList[0][i]);
                chart1.Series[0].Points[i].Color       = RecData.colorList[i];
                chart1.Series[0].Points[i].BorderWidth = RecData.lineWidthList[i];
            }
            chart1.Size = new Size(1100 + RecData.signalList[signr].Count() * 2, 520);
            //Series MIN = chart1.Series.Add($"Count: {RecData.colorList.Count().ToString()}");
            // MIN.Font = new Font("Times", 72f);
            this.chart1.SaveImage(@"mychart.bmp", ChartImageFormat.Bmp);
            aa    = this.chart1.CreateGraphics();
            chart = this.chart1;
        }
Esempio n. 3
0
        //add markup with signal value at tool position
        public static void AddMarkup()
        {
            double  y1;
            Station station2 = Project.ActiveProject as Station;

            myMark = new Markup();
            if (signalList[SigPos.GetCurrentSignal()].Count() > 1)
            {
                y1 = signalList[SigPos.GetCurrentSignal()][currentVal];
            }
            else
            {
                y1 = 1;
            }
            myMark.Text = "Sig" + (SigPos.GetCurrentSignal() + 1) + ": " + y1.ToString();
            myMark.Transform.Translation = new ABB.Robotics.Math.Vector3(RecData.ToolValuesList[currentVal].x, RecData.ToolValuesList[currentVal].y, RecData.ToolValuesList[currentVal].z);
            station2.Markups.Add(myMark);
        }