I am trying to make a program in vb 2005 to real all the data from a device connected on Serial Port (Com 1).
i did this:
Imports System Imports System.IO.Ports Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SerialPort1.Open() End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If SerialPort1.IsOpen Then With RichTextBox1 .AppendText(SerialPort1.ReadLine & vbCrLf) .ScrollToCaret() End With End If SerialPort1.Close() End Sub
this code only give me the first line of the data that i will receive. If i try read existing nothing hapens. please help me:
the data storage on serial port device is like this:
110002+00000010 21.102+25166290 22.102+32314650 31..10+00000000
110003+00001001 21.102+00000000 22.102+09988810 31..10+00000000
110004+00001002 21.102+06314750 22.102+09922750 31..10+00000000
110005+00001003 21.102+07009970 22.102+09975390 31..10+00000000
and this is how i want to reciveit.
when i lounch the program i only receive first line "410001+00000001" and after that i get on the device rs232 error
i am ataching all the project here. it is in vb 2005
Number of downloads: 3446
This post has been edited by opium_21002100: 02 November 2009 - 06:12 AM