Serial I/O Card Installation
Asynchronous Serial
communication capabilities are built into Visual Basic by using the Open, Close, Get, and
Put statements.
First, you "Open" COM1 or whatever Com# you may be using. Next it is your option
to read data from the port by using the Get statement or send data out the port by using
Put. An example of using the Open statement: (Open "COM1:9600,n,8,1" For Random
As #1). That statement will open Com 1 at 9600 bits/second, no parity, 8 bits per
character, 1 stop bit, for Random access, and file number 1. The put statement is what you
would use to output a string of data to the Com port: (Put #1 , , out). "Out"
being a string variable containing data. It does not have to be a string, but it works
well as an example. Get and Close are similarly implemented. For complete documentation
consult the Visual Basic reference guide.