Noobie with a MX2 using VB6
-
- LCD?
- Posts: 6
- Joined: Sat Jan 21, 2006 7:30 pm
Noobie with a MX2 using VB6
Hi All,
Can you please help me get up and running. I am writing an application in vb6 to talk to my 2x16 MX2 display.
My code is:
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
End If
MSComm1.Output = "Test"
I was previously getting a "Port already open" error, but end tasking a few apps got rid of this error.
My code runs and opens the port correctly, but the display does not change at all, it just stays on the "MATRIX ORBITAL MX2" welcome screen.
Many thanks in advance!
Can you please help me get up and running. I am writing an application in vb6 to talk to my 2x16 MX2 display.
My code is:
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
End If
MSComm1.Output = "Test"
I was previously getting a "Port already open" error, but end tasking a few apps got rid of this error.
My code runs and opens the port correctly, but the display does not change at all, it just stays on the "MATRIX ORBITAL MX2" welcome screen.
Many thanks in advance!
-
- LCD?
- Posts: 6
- Joined: Sat Jan 21, 2006 7:30 pm
Thanks for your reply Henry. I have adjusted the rate, and still no success. I am using com port 3 (I have tried 1 and 2 but get an error). My code now reads...
MSComm1.CommPort = 3
MSComm1.Settings = "19200,N,8,1"
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
End If
MSComm1.Output = "Test"
MSComm1.CommPort = 3
MSComm1.Settings = "19200,N,8,1"
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
End If
MSComm1.Output = "Test"
-
- LCD?
- Posts: 6
- Joined: Sat Jan 21, 2006 7:30 pm
-
- LCD?
- Posts: 6
- Joined: Sat Jan 21, 2006 7:30 pm
-
- LCD?
- Posts: 6
- Joined: Sat Jan 21, 2006 7:30 pm
-
- LCD?
- Posts: 6
- Joined: Sat Jan 21, 2006 7:30 pm
-
- LCD Guru
- Posts: 55
- Joined: Tue Apr 12, 2005 2:31 am
Re: Noobie with a MX2 using VB6
Because you did not provide the full source but only a snippet I'm not sure what's the exact error. Did you create an instance of MSComm (that's not clear in your message) Anyway, this code works:unlocktechnology wrote: My code is:
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
End If
MSComm1.Output = "Test"
I was previously getting a "Port already open" error, but end tasking a few apps got rid of this error.
Code: Select all
Private Sub Command1_Click()
Dim MSComm1 As MSComm
Set MSComm1 = New MSComm
MSComm1.CommPort = 3
MSComm1.Settings = "19200,N,8,1"
If MSComm1.PortOpen = False Then
MSComm1.PortOpen = True
End If
MSComm1.Output = "Test"
End Sub
Code: Select all
Private Sub Command2_Click()
Dim display As MatrixOrbital_Display.TextDisplay
Set display = New MatrixOrbital_Display.TextDisplay
display.Open 3
display.Write "Test"
End Sub