示例#1
0
        private void AnalogTimer_Tick(object sender, EventArgs e)
        {
            if (!Iscon)
            {
                digit.Connect_port1_write();
                Iscon = true;
            }
            //anal.Connect(ref ErrorMsg);
            AnalogInput.Text = Convert.ToString(anal.Read(ref ErrorMsg));
            chart1.Series[0].Points.AddY(anal.Read(ref ErrorMsg));

            if (chart1.Series[0].Points.Count > 200)
            {
                chart1.Series[0].Points.RemoveAt(0);
            }
        }
示例#2
0
 private void AnalogTImer_Tick(object sender, EventArgs e)
 {
     /*if (!Iscon)
      * {
      *  digit.Connect_port1_write();
      *  Iscon = true;
      * }*/
     //anal.Connect(ref ErrorMsg);
     digit.Connect_port1_write();
     AnalogInput.Text = Convert.ToString(anal.Read(ref ErrorMsg));
 }