Read serial port data into a text file in VB2008 express
Hi i am trying to write a simple programme to allow the user to open and read data from a RS232 port on a medical equipment and save the data into text file. Iam not a techie. I am totally new to programming save a few projects in foxpro(lol.....yeah oldshool).
The tutorial is in Spanish and no English version found.
The code examples are clear. You can babelfish a little for the translation.
:)
Dear Lola,
I have tried invain to translate the page. I am unable to understand the explainations for each module. Can you please help.
I really want to understand how it is done. Thanks for replying it was kind of you.
Bejoy
Hi i am trying to write a simple programme to allow the user to open and read data from a RS232 port on a medical equipment and save the data into text file. Iam not a techie. I am totally new to programming save a few projects in foxpro(lol.....yeah oldshool).
can anyone help , i have vb2008 express edition.
Bejoy
Public Class Form1
Private Sub SerialPort1_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles SerialPort1.DataReceived
Dim writeFile As New System.IO.StreamWriter("Read.txt")
writeFile.Write(SerialPort1.ReadChar())
writeFile.Close()
End Sub
End Class