fgh3966 Active Member Licensed User May 26, 2023 #1 Hello everybody. I put a data to com usbserial port with this code, but i'm not remember how to get data from usbserial port , how call a sub with data from com port ? Il look at callsub, etc ... but no match Code: Copy Private Sub btn1_Click If usbserial.IsInitialized Then Dim st As String = "001" Dim msgt() As Byte = st.GetBytes("UTF8") usbserial.Write(msgt) lblspeed.Text = "textA" End If End Sub Regard Last edited: May 26, 2023
Hello everybody. I put a data to com usbserial port with this code, but i'm not remember how to get data from usbserial port , how call a sub with data from com port ? Il look at callsub, etc ... but no match Code: Copy Private Sub btn1_Click If usbserial.IsInitialized Then Dim st As String = "001" Dim msgt() As Byte = st.GetBytes("UTF8") usbserial.Write(msgt) lblspeed.Text = "textA" End If End Sub Regard
agraham Expert Licensed User Longtime User May 26, 2023 #2 fgh3966 said: how call a sub with data form com port ? Click to expand... You don't. You should get an data available event, depending on which USB serial library you are using. Upvote 0
fgh3966 said: how call a sub with data form com port ? Click to expand... You don't. You should get an data available event, depending on which USB serial library you are using.