Customer dispay on com port

Luka

Registered User.
Local time
Today, 20:27
Joined
Oct 29, 2004
Messages
40
Hi,

I'm using this code sending data on customer display over com port:

Open "Com2:" For Output As #1
Print #1, "Test"
Close #1

The problem is that display is showing some strange characters. Something like: CCCCCCCC...

Any ideas how to fix that?
thanx in advance
 
another try

I tried this code and now I'm getting error no variable defined in the first MSComm1 line. I use option explicit. If i deleted then it says no object found on the same line.


Dim Instring As String

MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 0
MSComm1.PortOpen = True
MSComm1.Output = "ATV1Q0" & Chr$(13)
MSComm1.PortOpen = False
 
I've only used the MsComm control a couple of times but from memory, here's how I used it on a form:

Make sure you have MS Comm Control selected in the references and you have added the activeX control to your form.

Code:
Private MsComm1 as MsComm

Private Sub Form_Load()
Set MsComm1 as Me.[B][I]MsComm_ActiveX_Control[/I][/B].Object
End Sub

Private Sub MyButton_Click()
MSComm1.CommPort = 2
MSComm1.Settings = "9600,N,8,1"
MSComm1.InputLen = 0
MSComm1.PortOpen = True
MSComm1.Output = "ATV1Q0" & Chr$(13)
MSComm1.PortOpen = False
End Sub

You might be able to pick something out of that to help you?

Regards,
Pete.
 
Thanks for reply

I got the idea how to do it, lets hope it works
 

Users who are viewing this thread

Back
Top Bottom