QUESTION - Sending data out COM port (w/o using MSCOMM.VBX) 
Author Message
 QUESTION - Sending data out COM port (w/o using MSCOMM.VBX)

After more research I found the answer.
To quote the MICROSOFT KNOWLEDGE BASE:

"NOTE: If the communication settings in Terminal do not
match those specified in Control Panel, Terminal's settings
take precedence."

And Terminal's settings were set to 1200,n,8,1.



Fri, 25 Sep 1998 03:00:00 GMT  
 QUESTION - Sending data out COM port (w/o using MSCOMM.VBX)
I'd like to send data out the COM port using the "OPEN
filename" statement (i.e.  Open "COM2" For Output As
#fnum2) and the "Print" statement, exactly as if I was
printing to a file.  This works great for LPT1, but when I
use COM2, all I get out the COM port is junk (parity or
baud rate or data bits is incorrectly specified.)  I've
gone into "CONTROL PANEL" and configured the port, but this
doesn't seem to help.  I don't want to use MSCOMM.VBX
because I want one routine that works for either COM ports
or LPT ports.  Any ideas why the data coming out the COM
port is screwed up?


Fri, 25 Sep 1998 03:00:00 GMT  
 QUESTION - Sending data out COM port (w/o using MSCOMM.VBX)

Quote:

> I'd like to send data out the COM port using the "OPEN
> filename" statement (i.e.  Open "COM2" For Output As
> #fnum2) and the "Print" statement, exactly as if I was
> printing to a file.  This works great for LPT1, but when I
> use COM2, all I get out the COM port is junk (parity or
> baud rate or data bits is incorrectly specified.)  I've
> gone into "CONTROL PANEL" and configured the port, but this
> doesn't seem to help.  I don't want to use MSCOMM.VBX
> because I want one routine that works for either COM ports
> or LPT ports.  Any ideas why the data coming out the COM
> port is screwed up?

Download the VBCOMDEM sample from Microsoft. It uses the 16 bit
comm API to control a COM port. A few minor changes and it can
be use with LPT ports also.

/Ian

--
Visit my homepage at http://www.why.net/home/exuian



Sat, 26 Sep 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Send Ctrl-Z to Com Port using MSComm

2. Send Ctrl-Z to Com Port using MSComm

3. MSComm control - binary data transfer using a com port

4. VB and COM ports and mscomm.vbx and hung PCs

5. MSCOMM - Port data, Mscomm no data

6. How to send data to a com-port

7. Sending data thru the COM ports

8. Need help getting com port data being sent by another pgm

9. How do you send binary data to the Com port

10. Sending Hex data out a COM port

11. Newbie Question - Code to send info to a Com port

12. VB4.0 sending commands to rs232 (com port) and printer port

 

 
Powered by phpBB® Forum Software