private void Poll() { //double nidbuff = double.MaxValue; DateTime dt = DateTime.Now; while (!bExit) { if (ReadCount - ChartCount < 99 && !Pause) { // byte[] data = sc.GetAppdata(); double nid = (DateTime.Now - dt).TotalSeconds; //if (!GetDataByTime) //{ // nid = StaubliXML.GetXMLDouble("nID", StaubliXML.Byte2xd(data)); //} //double nSpeed = StaubliXML.GetXMLDouble("nRobotSpeed", StaubliXML.Byte2xd(data)); //if (nid != nidbuff && nid > 0) //{ // nidbuff = nid; //} double[] Joint = sc.GetJointPos(); if (Joint != null) { speeddata[ReadCount % 100, 0] = nid; for (int i = 0; i < Joint.Length; i++) { speeddata[ReadCount % 100, i + 1] = Joint[i]; } ReadCount++; } } System.Threading.Thread.Sleep(polltime); } }