Esempio n. 1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            float positionVoltageValue;
            float torqueVoltageValue;

            //float position = float.Parse(pc.AnalogInput10(0, out positionVoltageValue));
            //float troque = float.Parse(pc.AnalogInput(1, out torqueVoltageValue));
            //this.label1.Text = torqueVoltageValue.ToString("00.00");


            float position = cc.getPositionSignal();
            float troque   = cc.getTorqueSignal();

            if (ifStartDebugMode)
            {
                position = 1744;
                troque   = 2862;
            }


            this.lblPositionValue.Text = position.ToString();
            this.lblTorqueValue.Text   = troque.ToString();



            this.pictureBox1.CreateGraphics().DrawImage(dp.drawSignalCurve(lpf1, lpf2), 0, 0);
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            float position = cc.getPositionSignal();
            float troque   = cc.getTorqueSignal();

            if (ifStartDebugMode)
            {
                position = 1982;
                troque   = 0;
            }


            this.lblPositionValue.Text = position.ToString();
            this.lblTorqueValue.Text   = troque.ToString();


            lpf1.Add(position);
            lpf2.Add(troque);
            if (lpf1.Count == 300)
            {
                lpf1.Remove(lpf1[0]);
            }

            if (lpf2.Count == 300)
            {
                lpf2.Remove(lpf2[0]);
            }

            this.pictureBox1.CreateGraphics().DrawImage(dp.drawSignalCurve(lpf1, lpf2), 0, 0);
        }