Baud Rate changing Break Command in vb.net - vb.net

I am using AirCable Serial5 Bluetooth adapter for RS232 to Bluetooth transfer. I need to change Baudrate from lower 9600 to 115200. I talked with AirCable supplier and he said that, for that I have to send Baud changing Break command(0x85) to serial COM port. I don't know how to send break command with baud changing HEX code in VB.NET
Imports System
Imports System.IO.Ports
Imports System.Text
Imports System.Threading
Public Class Form1
Private Sp As New SerialPort
Private comBuffer As Byte()
Private Delegate Sub UpdateFormDelegate()
Private UpdateFormDelegate1 As UpdateFormDelegate
Dim m As Integer
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
With Sp
.PortName = "COM8"
.BaudRate = 9600
.DataBits = 8
.Parity = Parity.None
.StopBits = StopBits.One
.Handshake = Handshake.None
End With
Try
Sp.Open()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
AddHandler Sp.DataReceived, AddressOf Sp_DataReceived
Sp.Write("s r0x90 115200" + vbCr)
Thread.Sleep(100)
End Sub
Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Sp.Write("s r0x90 9600" + vbCr)
Thread.Sleep(100)
End Sub
Private Sub getBD_Click(sender As System.Object, e As System.EventArgs) Handles getBD.Click
Sp.Write("g r0x90" + vbCr)
Thread.Sleep(100)
End Sub
Private Sub Sp_DataReceived(ByVal Sender As Object, ByVal e As SerialDataReceivedEventArgs)
'Handles serial port data received events
UpdateFormDelegate1 = New UpdateFormDelegate(AddressOf UpdateDisplay)
Dim n As Integer = Sp.BytesToRead 'find number of bytes in buffer
m = n
comBuffer = New Byte(n - 1) {} 're dimension storage buffer
Sp.Read(comBuffer, 0, n) 'read data from the buffer
Me.Invoke(UpdateFormDelegate1) 'call the delegate
End Sub
Private Sub UpdateDisplay()
' updates label text
'Label1.Text = ""
Dim b As Integer = 0
Do Until b = m
Dim array() As Byte = {CStr(comBuffer(b))}
Dim value As String = System.Text.ASCIIEncoding.ASCII.GetString(array)
Label1.Text += value
b += 1
Loop
End Sub
Private Sub snd_Click(sender As System.Object, e As System.EventArgs) Handles snd.Click
Dim x As String
x = cmdBox.Text
Sp.Write(x + vbCr)
Thread.Sleep(100)
End Sub
End Class
Please let me know if you have any questions.

Related

Reciving data from Cell counter through rs232

I have a cell counter machine that sends data automatically after test end through a rs232 cable. I tried the following code to receive that data but I get nothing although I changed the BaudRate value many times. What is the problem?
My code:
Imports System
Imports System.Threading
Imports System.IO.Ports
Imports System.ComponentModel
Public Class ComReadWrite
Dim myPorts As Array
Dim txtline As String
Dim txtchar As String
Dim txtbyte As String
Dim txtexisting As String
Delegate Sub setTextCallBack(ByVal txt As String)
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
myPorts = IO.Ports.SerialPort.GetPortNames()
portnamecombo.Items.AddRange(myPorts)
WriteButton.Enabled = False
CloseButton.Enabled = False
BaudRateBox.Items.Add(110)
BaudRateBox.Items.Add(300)
BaudRateBox.Items.Add(600)
BaudRateBox.Items.Add(1200)
BaudRateBox.Items.Add(2400)
BaudRateBox.Items.Add(4800)
BaudRateBox.Items.Add(9600) 'Populate the baudratebox Combo box to common baud rates used
BaudRateBox.Items.Add(14400)
BaudRateBox.Items.Add(19200)
BaudRateBox.Items.Add(38400)
BaudRateBox.Items.Add(57600)
BaudRateBox.Items.Add(115200)
BaudRateBox.Items.Add(128000)
BaudRateBox.Items.Add(256000)
BaudRateBox.Text = 38400
End Sub
Private Sub Start_Click(sender As Object, e As EventArgs) Handles Start.Click
SerialPort1.PortName = portnamecombo.Text
SerialPort1.BaudRate = BaudRateBox.Text
SerialPort1.ReadTimeout = 500
SerialPort1.Parity = Parity.None
SerialPort1.DataBits = 8
SerialPort1.StopBits = StopBits.One
SerialPort1.Open()
Start.Enabled = False
WriteButton.Enabled = True
CloseButton.Enabled = True
End Sub
Private Sub WriteButton_Click(sender As Object, e As EventArgs) Handles WriteButton.Click
SerialPort1.Write(Chr(6))
End Sub
Private Sub CloseButton_Click(sender As Object, e As EventArgs) Handles CloseButton.Click
SerialPort1.Close()
Start.Enabled = True
WriteButton.Enabled = False
CloseButton.Enabled = False
End Sub
Private Sub SerialPort1_DataReceived(sender As Object, e As SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Try
RecievedText(SerialPort1.ReadExisting())
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub RecievedText(ByVal txt As String)
If Me.ReadBox.InvokeRequired Then
Dim x As New setTextCallBack(AddressOf RecievedText)
Me.Invoke(x, New Object() {(txt)})
Else
Me.ReadBox.Text &= txt
End If
End Sub
End Class

loop data in textbox from serial data vb.net

I'm newbie to VB.net. my case is, i need to display data from serial port to text box. In continuous loop. How do i do that?
I have wrote simple program to display the data. i can display the data once in the textbox, but not continuously.
serialport1 is where i get data from port 1. serialport2 is data from port 2.
SerialPort2.Write("!12,F" & vbCr)
data "!11,F" and "!12,F" is a command to my 2 device.
TextBox2.Text and TextBox5.Text is where i want to continuously display my data.
here is the code;
Imports System
Imports System.Threading
Imports System.IO.Ports
Imports System.ComponentModel
Public Class Form2
Dim myPort As Array
Dim myport1 As Array
Delegate Sub SetTextCallback(ByVal [text] As String) 'Added to prevent threading errors during receiveing of data
'------------------------------------------------
Private Sub Form2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
myPort = IO.Ports.SerialPort.GetPortNames()
myport1 = IO.Ports.SerialPort.GetPortNames()
ComboBox1.Items.AddRange(myPort)
ComboBox2.Items.AddRange(myport1)
btnwrite.Enabled = False
End Sub
'------------------------------------------------
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles btninit.Click
SerialPort1.Encoding = System.Text.Encoding.GetEncoding(28591) ' convert to ascii
SerialPort1.PortName = ComboBox1.Text
SerialPort1.BaudRate = TextBox3.Text
SerialPort1.Open()
SerialPort2.Encoding = System.Text.Encoding.GetEncoding(28591) ' convert to ascii
SerialPort2.PortName = ComboBox2.Text
SerialPort2.BaudRate = TextBox3.Text
SerialPort2.Open()
btninit.Enabled = False
btnwrite.Enabled = True
btnwrite2.Enabled = True
btnclose.Enabled = True
End Sub
'------------------------------------------------
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles btnwrite.Click
SerialPort1.Write("!11,F" & vbCr) 'concatenate with \n
End Sub
Private Sub btnwrite2_Click(sender As Object, e As EventArgs) Handles btnwrite2.Click
SerialPort2.Write("!12,F" & vbCr) 'concatenate with \n
End Sub
Private Sub SerialPort1_DataReceived(sender As System.Object, e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
ReceivedText(SerialPort1.ReadExisting())
End Sub
Private Sub SerialPort2_DataReceived(sender As System.Object, e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort2.DataReceived
ReceivedText1(SerialPort2.ReadExisting())
End Sub
Private Sub ReceivedText(ByVal [text] As String) 'input from ReadExisting
If Me.TextBox2.InvokeRequired Then
Dim x As New SetTextCallback(AddressOf ReceivedText)
Me.Invoke(x, New Object() {(text)})
Else
Me.TextBox2.Text &= [text] 'append text
End If
End Sub
Private Sub ReceivedText1(ByVal [text] As String) 'input from ReadExisting
If Me.TextBox5.InvokeRequired Then
Dim x As New SetTextCallback(AddressOf ReceivedText1)
Me.Invoke(x, New Object() {(text)})
Else
Me.TextBox5.Text &= [text] 'append text
End If
End Sub
Private Sub btnclose_click(sender As System.Object, e As System.EventArgs) Handles btnclose.Click
SerialPort1.Close()
SerialPort2.Close()
btninit.Enabled = True
btnwrite.Enabled = False
btnwrite2.Enabled = False
btnclose.Enabled = False
End Sub
End Class

Communication with Serial Device on COM port gives unreadable characters in VB

I am trying to communicate with a CBC Autoanaylyser machine which sends data across RS232 serial port. These are the device settings
enter image description here
I am connecting it to com4 port using a serial to usb adapter
ON COM4 port I am using the following VB code to read the data coming through.
Imports System
Imports System.Threading
Imports System.IO.Ports
Imports System.ComponentModel
Public Class ComReadWrite
Dim myPorts As Array
Dim txtline As String
Dim txtchar As String
Dim txtbyte As String
Dim txtexisting As String
Delegate Sub setTextCallBack(ByVal txt As String)
Private Sub ComReadWrite_Load(sender As Object, e As EventArgs) Handles MyBase.Load
myPorts = IO.Ports.SerialPort.GetPortNames()
portnamecombo.Items.AddRange(myPorts)
WriteButton.Enabled = False
CloseButton.Enabled = False
End Sub
Private Sub Start_Click(sender As Object, e As EventArgs) Handles Start.Click
SerialPort1.PortName = portnamecombo.Text
SerialPort1.BaudRate = BaudRateBox.Text
SerialPort1.ReadTimeout = 500
SerialPort1.Parity = Parity.None
SerialPort1.DataBits = 8
SerialPort1.StopBits = StopBits.One
SerialPort1.Open()
Start.Enabled = False
WriteButton.Enabled = True
CloseButton.Enabled = True
End Sub
Private Sub WriteButton_Click(sender As Object, e As EventArgs) Handles WriteButton.Click
SerialPort1.Write(WriteBox.Text)
End Sub
Private Sub CloseButton_Click(sender As Object, e As EventArgs) Handles CloseButton.Click
SerialPort1.Close()
Start.Enabled = True
WriteButton.Enabled = False
CloseButton.Enabled = False
End Sub
Private Sub SerialPort1_DataReceived(sender As Object, e As SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
RecievedText(SerialPort1.ReadExisting())
End Sub
Private Sub RecievedText(ByVal txt As String)
If Me.ReadBox.InvokeRequired Then
Dim x As New setTextCallBack(AddressOf RecievedText)
Me.Invoke(x, New Object() {(txt)})
Else
Me.ReadBox.Text &= txt
End If
End Sub
Private Sub portnamecombo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles portnamecombo.SelectedIndexChanged
End Sub
Private Sub Label5_Click(sender As Object, e As EventArgs)
End Sub
Private Sub BindingSource1_CurrentChanged(sender As Object, e As EventArgs) Handles BindingSource1.CurrentChanged
End Sub
End Class
On running the program the form only reads weird unreadable characters like OOOOOOOO but not any thing readable as shown in pic
only shows weird characters
The documentation which came with the device has the following pages which seem to be relevant.
page1
page2
We need to communicate the commands in ASCII code. Enq is Chr(5) ack is Chr(6). These were the unreadable characters.
Hey Thanks to the Stack overflow community for the help. I found the solution it is as follows
The machine is supposed to say enq to which host is supposed to reply ack. But when I read the serial port machine seems to be sending an unreadable character.
Well the enq is equal to ASCII code 5 which does not have any character associated with it so it's unreadable character. So if instead of serialport1.readexisting() I write serialport1.readchar() I get that the machine is saying 5. That is machine is actually sending the enq.
Now we need to send the whose ASCII value is 6
If I say serialport1.write('6') it's not get to work.
What will work is serialport1.write(Chr(6))
And using this I got the machine to send the data.

Serial data overwrite on visual basic

I am new to visual basic . I am sending data from arduino evey 1s say current. I wanted to print on text box. Here is my code on VB side . Problem i am facing here . I am getting data but Not ovwrwriting .it just print one after the other. I am using VB2010.
VB code
Imports System
Imports System.ComponentModel
Imports System.Threading
Imports System.IO.Ports
Public Class frmMain
Dim myPort As Array 'COM Ports detected on the system will be stored here
Delegate Sub SetTextCallback(ByVal [text] As String) 'Added to prevent threading errors during receiveing of data
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
myPort = IO.Ports.SerialPort.GetPortNames() 'Get all com ports available
cmbBaud.Items.Add(9600) 'Populate the cmbBaud Combo box to common baud rates used
cmbBaud.Items.Add(19200)
cmbBaud.Items.Add(38400)
cmbBaud.Items.Add(57600)
cmbBaud.Items.Add(115200)
For i = 0 To UBound(myPort)
cmbPort.Items.Add(myPort(i))
Next
cmbPort.Text = cmbPort.Items.Item(0) 'Set cmbPort text to the first COM port detected
cmbBaud.Text = cmbBaud.Items.Item(0) 'Set cmbBaud text to the first Baud rate on the list
'SerialPort1.PortName = cmbPort.Text()
'SerialPort1.BaudRate = cmbBaud.Text()
btnDisconnect.Enabled = False 'Initially Disconnect Button is Disabled
End Sub
Private Sub btnConnect_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnConnect.Click
SerialPort1.PortName = cmbPort.Text()
'Set SerialPort1 to the selected COM port at startup
SerialPort1.BaudRate = cmbBaud.Text()
'Set Baud rate to the selected value on
'Other Serial Port Property
SerialPort1.Parity = IO.Ports.Parity.None
SerialPort1.StopBits = IO.Ports.StopBits.One
SerialPort1.DataBits = 8 'Open our serial port
SerialPort1.Open()
btnConnect.Enabled = False 'Disable Connect button
btnDisconnect.Enabled = True 'and Enable Disconnect button
End Sub
Private Sub btnDisconnect_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisconnect.Click
SerialPort1.Close() 'Close our Serial Port
btnConnect.Enabled = True
btnDisconnect.Enabled = False
End Sub
Private Sub btnSend_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSend.Click
SerialPort1.Write(txtTransmit.Text & vbCr) 'The text contained in the txtText will be sent to the serial port as ascii
'plus the carriage return (Enter Key) the carriage return can be ommitted if the other end doe
End Sub
Private Sub SerialPort1_DataReceived(ByVal sender As Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
ReceivedText(SerialPort1.ReadExisting()) 'Automatically called every time a data is received at the serialPort
End Sub
Private Sub ReceivedText(ByVal [text] As String)
'compares the ID of the creating Thread to the ID of the calling Thread
If Me.Current_Read.InvokeRequired Then
Dim x As New SetTextCallback(AddressOf ReceivedText)
Me.Invoke(x, New Object() {(text)})
Else
Me.Current_Read.Text &= [text]
End If
End Sub
Private Sub cmbPort_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
If SerialPort1.IsOpen = False Then
SerialPort1.PortName = cmbPort.Text 'pop a message box to user if he is changing ports
Else 'without disconnecting first.
MsgBox("Valid only if port is Closed", vbCritical)
End If
End Sub
Private Sub cmbBaud_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
If SerialPort1.IsOpen = False Then
SerialPort1.BaudRate = cmbBaud.Text 'pop a message box to user if he is changing baud rate
Else 'without disconnecting first.
MsgBox("Valid only if port is Closed", vbCritical)
End If
End Sub
Private Sub RELAY_ON_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RELAY_ON.Click
SerialPort1.Write("1")
End Sub
Private Sub RELAY_OFF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RELAY_OFF.Click
SerialPort1.Write("0")
End Sub
End Class
Arduino Code.
float Output_Current ;
void TakeReading()
{
newaverage = analogRead(A5);
Output_Current = 0.0336666666667*newaverage - 17.17;
}
void loop()
{
Serial.println( Output_Current );
delay(1000);
}

How to recieve and read data through UART from microcontroller using VB

I will be posting my code for whatever I have done till now.
I'm sending data to microcontroller, but now I've to check other way and want to receive data.
I have written code which itself acts as UART. I am using readexisting and able to read some characters which is unrelevent, but I'm not able to read required data.
Imports System.IO.Ports
Public Class Settings
Dim myComPort As New SerialPort
' Call a routine to write a command to turn on an LED and read the response.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
SendCommand("7")
End Sub
' Call a routint write a command to turn on an LED and read the response.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SendCommand("A")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
SendCommand("C")
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
myComPort.BaudRate = CInt(cmbBitRate.SelectedItem)
TextBox4.Text = myComPort.BaudRate
End Sub
' If myComPort is open, finish transmitting.
' Exiting the Using block closes the port and releases its resources.
Sub CloseComPort()
Try
Using myComPort
If (Not (myComPort Is Nothing)) Then
' The COM port exists.
If myComPort.IsOpen Then
' Wait for the transmit buffer to empty.
Do While (myComPort.BytesToWrite > 0)
Loop
End If
End If
End Using
Catch ex As UnauthorizedAccessException
' The port may have been removed. Ignore.
End Try
End Sub
' Set the BaudRate property of myComPort to match the bit rate selected in the combo box.
Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbBitRate.SelectedIndexChanged
myComPort.BaudRate = CInt(cmbBitRate.SelectedItem)
'TextBox2.Text = ToString(myComPort.BaudRate)
End Sub
' If the previously selected COM port is open, close it.
' Set the PortName property of myComPort to match the port selected in the combo box.
' Call a routine to open the port.
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPorts.SelectedIndexChanged
CloseComPort()
myComPort.BaudRate = CInt(cmbBitRate.SelectedItem)
' myComPort.BaudRate = 500
'TextBox2.Text = myComPort.BaudRate
OpenComPort()
End Sub
' Call a routine to close the COM port.
Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
CloseComPort()
End Sub
' Call routines to initalize the form and open the selected COM port.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
InitializeForm()
OpenComPort()
AddHandler myComPort.DataReceived, AddressOf DataReceivedeventHandler
End Sub
' Set up the form and select a default port and bit rate.
Sub InitializeForm()
Dim bitRates(9) As Integer
Dim nameArray() As String
' Find the COM ports on the system.
nameArray = SerialPort.GetPortNames
Array.Sort(nameArray)
' Fill a combo box with the port names.
cmbPorts.DataSource = nameArray
cmbPorts.DropDownStyle = ComboBoxStyle.DropDownList
' Select a default port.
'cmbPorts.SelectedIndex = 1
'Bit rates to select from.
bitRates(0) = 300
bitRates(1) = 600
bitRates(2) = 1200
bitRates(3) = 2400
bitRates(4) = 9600
bitRates(5) = 14400
bitRates(6) = 19200
bitRates(7) = 38400
bitRates(8) = 57600
bitRates(9) = 115200
'Place the bit rates in a combo box.
cmbBitRate.DataSource = bitRates
cmbBitRate.DropDownStyle = ComboBoxStyle.DropDownList
' Select a default bit rate.
' If (Not (cmbBitRate Is Nothing)) Then
'CloseComPort()
'End If
End Sub
' Set port parameters and open the COM port
' associated with the SerialPort object myComPort.
Sub OpenComPort()
Try
' Get the selected COM port's name from the combo box.
If Not myComPort.IsOpen Then
myComPort.PortName = cmbPorts.SelectedItem.ToString
' Get the selected bit rate from the combo box.
If cmbBitRate.SelectedIndex > 0 Then
myComPort.BaudRate = CInt(cmbBitRate.SelectedItem)
TextBox4.Text = myComPort.BaudRate
End If
'myComPort.BaudRate = CInt(cmbBitRate.SelectedItem)
' Set other port parameters.
myComPort.Parity = Parity.None
myComPort.DataBits = 8
myComPort.StopBits = StopBits.One
myComPort.Handshake = Handshake.None
myComPort.ReadTimeout = 3000
myComPort.WriteTimeout = 5000
' Open the port.
myComPort.Open()
End If
Catch ex As InvalidOperationException
MessageBox.Show(ex.Message)
Catch ex As UnauthorizedAccessException
MessageBox.Show(ex.Message)
Catch ex As System.IO.IOException
MessageBox.Show(ex.Message)
End Try
End Sub
' Write a command to the SerialPort object and read the response.
''' <param name= "command"> The command to send. </param>
Private Sub SendCommand(ByVal command As String)
' Dim response As String
Try
'TextBox1.BackColor = Color.MediumPurple
myComPort.Write(command)
'myComPort.ReadTimeout = 1000
' While myComPort.ReadLine = 0
' End While
'If myComPort.IsOpen Then
'myComPort.ReadLine()
'End If
'TextBox6.Text = myComPort.ReadLine
Select Case command
Case "A"
' TextBox6.Text = myComPort.
TextBox1.Text = "Green LED is on"
TextBox1.BackColor = Color.LightGreen
Case "7"
TextBox1.Text = " Red LED is ON"
TextBox1.BackColor = Color.Red
'TextBox6.Text = myComPort.ReadLine
Case "C"
TextBox1.Text = " Both LED's are ON"
TextBox1.BackColor = Color.RoyalBlue
'TextBox6.Text = myComPort.ReadLine
Case Else
End Select
Catch ex As TimeoutException
MessageBox.Show(ex.Message)
Catch ex As InvalidOperationException
MessageBox.Show(ex.Message)
Catch ex As UnauthorizedAccessException
MessageBox.Show(ex.Message)
End Try
End Sub
Public Sub DataReceivedeventHandler(
ByVal sender As Object,
ByVal e As SerialDataReceivedEventArgs)
Dim sp As SerialPort = CType(sender, SerialPort)
Dim indata As String = sp.ReadExisting()
' Dim jndata As String = sp.ReadChar
MsgBox(indata)
'TextBox6.Text = CStr(vbMsgBoxRtlReading)
' MsgBox(jndata)
' Console.WriteLine("Data Received:")
Console.Write(indata)
' ArgumentException.Equals(indata)
End Sub
Public Sub TextBox6_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox6.TextChanged
End Sub
'Private Sub DataReceivedEventHandler(ByVal sender As Object, ByVal e As SerialDataReceivedEventArgs)
' Throw New NotImplementedException
'End Sub
End Class