|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SerialPort1.ReadLinewhy is this piece of code not working????? It's getting really frustrating. I can not figure it out. If I replace the readline method for readchar it's working. But one character. I want to read everything from the serialport SerialPort1.Open() TextBox1.Text = SerialPort1.ReadLine SerialPort1.Close() I hope someone has the answer Did you see my reply to your previous inquiry?
Do you know that this "should" work? Have you examined the data from your device to make sure that it actually it terminated with both carriage return and line feed characters in that order? There are other (better, IMO) ways to handle this problem. -- Richard Grier, MVP Hard & Software Author of Visual Basic Programmer's Guide to Serial Communications, Fourth Edition, ISBN 1-890422-28-2, Mabry Publishing (391 pages, includes CD-ROM). July 2004. See www.hardandsoftware.net for details and contact information. Hi Dick,
Youre absolutly right. That was the problem. I received my line of text, but know with a linefeed and a CR. Thank you very much for the tip
To VB or not to VB?
To VB or not to VB? Excel automation??? VS2005 - Debug and Locked Files Debugging in VS2005 - why is some code shaded grey? SqlConnection component in VB.2005 For each ..... next Question Setup and Deployment and Microsoft Jet OLE DB Provider generics question Dir(strPath, +R +A +S +H) keeps returning hidden folders |
|||||||||||||||||||||||