I have a Vantage Pro2 which is weather instruments system. My communication with it is by serial port. When I command to it, it gives back me an acknowledgment character and 99 bytes array of data.
But after some minutes I get the following error:
But after some minutes I get the following error:
IO Exception was unhandled
An unhandled exception of type 'System.IO.IOException' occured in System.dll
Additional Information: The I/O operation has been aborted because of either a thread exit or an application request
I run a lot of tests and I almost believe the problem is due to the C# NOT to my Vantage. Is there any idea?An unhandled exception of type 'System.IO.IOException' occured in System.dll
Additional Information: The I/O operation has been aborted because of either a thread exit or an application request
private void VantageserialPort_DataReceived(object sender, SerialDataReceivedEventArgs e) { VantageReadInterval.Enabled = false; VantageserialPort.Read(VantageData, 0, 100); // jj++; // SetText(jj.ToString()); //label23.Text = jj.ToString(); this.Invoke(new EventHandler(VantageUpdateVar)); }The error occurs on the VantageserialPort.Read(VantageData, 0, 100); line
Last edited by a moderator: