//RxString is the serial data int start = RxString.IndexOf('@') + 1; // Data starts with @ int end = s.IndexOf('#', start); // Ends with # string result = s.Substring(start, end - start); //The data now looks like 0001J123 and needs to be dissected // into three different strings using substring string A = result.substring (0, 4); string T = result.substring (4, 1); string Z = result.substring (5, 3);
The program gets hung up usually on string Z with an Index out of Range Exception. This leads me to believe that the program may not be getting all of the data out of the serial port buffer. Any ideas on this?
This post has been edited by TelcoJoe: 08 November 2010 - 06:42 PM