Virtual Com port
-
Hi guys i need some help on virtual com port communication. I need to communicate to my external hardware via virtual com port. Now that i already gotten the command line for my hardware i just need to know how can i communicate with it and send the command. Will be greatly thankful if that is any example to allow me to understand better.
-
Hi guys i need some help on virtual com port communication. I need to communicate to my external hardware via virtual com port. Now that i already gotten the command line for my hardware i just need to know how can i communicate with it and send the command. Will be greatly thankful if that is any example to allow me to understand better.
Google for "System.Io.Ports.SerialPort" and you'll come up with dozens of examples and documentation.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Google for "System.Io.Ports.SerialPort" and you'll come up with dozens of examples and documentation.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I look up google on the topic, but what they shows are all communication between computer. I cant find any which is communication with hardware.
Talking to an external piece of hardware on a serial port is no different than talking to a PC.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Talking to an external piece of hardware on a serial port is no different than talking to a PC.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Ok, sorry for asking stupid question. But i am quite new to serial communication. Another question i have is why when i Dim Withevents Port as serialPort = New Serialport, is labeled as error as undefined. But i have already imported the library.
Did you put this at the top of your code??
Imports System.Io.Ports
And are you using .NET 2.0 (Visual Studio 2005) or greater?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Did you put this at the top of your code??
Imports System.Io.Ports
And are you using .NET 2.0 (Visual Studio 2005) or greater?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I'll repeat my question. Are you using .NET 2.0 (Visual Studio 2005) or greater?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
I'll repeat my question. Are you using .NET 2.0 (Visual Studio 2005) or greater?
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Well, there's nothing to add a reference to since the SerialPort class is in System.dll. I have no idea what you're doing wrong. It should be as simple as:
Imports System.Io.Ports
Public Class MyForm
...
Private ComPort As SerialPort = New SerialPortA guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008