Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Serialport
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01129986
Message ID:
01133257
Views:
17
>Hi
>thanks for the reply.
>
>the code below (I have stripped out some lines )shows what I am trying to do. It crashes with any code in OnSerialDataReceived even if its just updating a text box. I can see the data if i step through the code in OnSerialDataReceived so that part works.
>
>sorry for the long delay I have had one of those weeks :)
>any help gratefully received
>thanks
>Stuart
>
>
>      public SerialPort ComPort;
>       public scan1 oScan;
>
>             oScan = new scan1();
>
>              ComPort = new SerialPort(port, baud);
>
>                ComPort.Parity = Parity.None;
>                ComPort.StopBits = StopBits.One;
>                ComPort.DataBits = 8;
>                ComPort.Handshake = Handshake.None;
>                ComPort.DataReceived += OnSerialDataReceived;
>
>        public void OnSerialDataReceived(object sender, SerialDataReceivedEventArgs args)
>        {
>
>            string data = this.ComPort.ReadExisting();
>
>            oScan.updateScan(data);
>
>        }
>
Which line in OnSerialDataReceived throws an exception? If it is the ReadExisting line then it appears that the only thing that can throw an exception is if the serial port is closed. What does the updateScan scan method do?
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform