Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not getting output from the MSComm object

Status
Not open for further replies.
Mar 4, 2001
43
US
This should be a relatively simple question, but I'm not seeing it, even after viewing most of the posts regarding the MSComm object. I'm trying to send a string to a serial label printer. I'm constructing a valid command string; I'm outputting the concatenated string to a text box, saving this as a text file, and if I copy this text file to the com port, I get the expected output. At first I was getting no output from the port and a transmit buffer full (1010) CommEvent, which I thought was odd since I'm only really sending 5-7k worth of data, but I up'd the output buffer to a Meg and that went away. Now the I'm getting nothing from the CommEvent and still nothing from the comm port. Here's how I'm trying to send the data:

Private Sub Command3_Click()
MsgBox Right(fileCont, 12)
MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.OutBufferSize = 1024
MSComm1.InputLen = 0
MSComm1.PortOpen = True
MSComm1.Output = fileCont
MSComm1.PortOpen = False
End Sub
I added this during prototyping to see comm errors

Private Sub MSComm1_OnComm()
MsgBox Me.MSComm1.CommEvent
End Sub

Any guidance/assistance would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top