How do i convert a string to bytes?
I want to send raw bytes out the serial control.
Private Sub Rs232SendData(B yVal cmd As String)
Try
cmd=cmd & vbCrLf
'Convert it to byte data here
??????????????? ??????????
SerialPort1.Wri te(byteData)
txtData.AppendT ext(Now.ToShort TimeString & "->Sent: " & cmd)
Catch ex As System.Exceptio n
MessageBox.Show (ex.Message)
End Try
End Sub
-Lou
I want to send raw bytes out the serial control.
Private Sub Rs232SendData(B yVal cmd As String)
Try
cmd=cmd & vbCrLf
'Convert it to byte data here
??????????????? ??????????
SerialPort1.Wri te(byteData)
txtData.AppendT ext(Now.ToShort TimeString & "->Sent: " & cmd)
Catch ex As System.Exceptio n
MessageBox.Show (ex.Message)
End Try
End Sub
-Lou
Comment