|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How do I create a Serial port listnerI would like to create a serial port listener that starts recording
data to a text file as soon as the port starts receiving the data. How do I trigger the program to start running when data is sent to that port. Any help with the code would be great! Thank you!! On May 4, 8:29 am, Quentin <quinn.willoug***@gmail.com> wrote:
> I would like to create a serial port listener that starts recording Hi,> data to a text file as soon as the port starts receiving the data. > > How do I trigger the program to start running when data is sent to > that port. > > Any help with the code would be great! > > Thank you!! I have just started working with the SerialPort class availble in, Imports System.IO.Ports You can declare an instance, Private WithEvents serialPort As SerialPort = New SerialPort() It have a recieved event, Private Sub serialPort_DataReceived(ByVal sender As System.Object, ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles serialPort.DataReceived This event is fired when some data arives at the port. In there I use the serial port method, inData = serialPort.ReadExisting() and then do whatever needs to be done with the data. I am just learing it myself. Jeff On May 4, 1:35 pm, Hoop <jcoll***@oshtruck.com> wrote:
Show quoteHide quote > On May 4, 8:29 am, Quentin <quinn.willoug***@gmail.com> wrote: thanks for your help!> > > I would like to create a serial port listener that starts recording > > data to a text file as soon as the port starts receiving the data. > > > How do I trigger the program to start running when data is sent to > > that port. > > > Any help with the code would be great! > > > Thank you!! > > Hi, > I have just started working with the SerialPort class availble in, > Imports System.IO.Ports > > You can declare an instance, > Private WithEvents serialPort As SerialPort = New SerialPort() > > It have a recieved event, > Private Sub serialPort_DataReceived(ByVal sender As System.Object, > ByVal e As System.IO.Ports.SerialDataReceivedEventArgs) Handles > serialPort.DataReceived > > This event is fired when some data arives at the port. > > In there I use the serial port method, > inData = serialPort.ReadExisting() > and then do whatever needs to be done with the data. > > I am just learing it myself. > > Jeff
Countdown
is there a control that displays a multi-column array of rectangles Is This Overkill? Talking with USB GPS in VB.Net Listing properties of an object Checking db connection open status File busy after sent via email Problem on shutdown computer if my appication is opened Write to an Access database Help Converting Some C# Code to Visual Basic... |
|||||||||||||||||||||||