Lou,
Maybe this page gives an explanation
http://msdn2.microsoft.com/en-us/library/ms172828.aspx
Use only ASCII if you are sure that you are only the 7 less significant
bites from a byte (127bits) as ASCII is only for that. It is using in a lot
of countries different code pages and gives therefore different results as
it is used in that if it is about the full byte.
Cor
"Lou" <lo********@comcast.netschreef in bericht
news:%2****************@TK2MSFTNGP06.phx.gbl...
How do i convert a string to bytes?
I want to send raw bytes out the serial control.
Private Sub Rs232SendData(ByVal cmd As String)
Try
cmd=cmd & vbCrLf
'Convert it to byte data here
?????????????????????????
SerialPort1.Write(byteData)
txtData.AppendText(Now.ToShortTimeString & "->Sent: " & cmd)
Catch ex As System.Exception
MessageBox.Show(ex.Message)
End Try
End Sub
-Lou