Noobie with a MX2 using VB6

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
unlocktechnology
LCD?
Posts: 6
Joined: Sat Jan 21, 2006 7:30 pm

Noobie with a MX2 using VB6

Post by unlocktechnology »

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!

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3002
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post by Henry »

Welcome to the forums,

the first thing i spoted is that the display runs at 19200 not 9600, as well make sure it is on comport 3.
Henry J.
President
Matrix Orbital

unlocktechnology
LCD?
Posts: 6
Joined: Sat Jan 21, 2006 7:30 pm

Post by unlocktechnology »

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"

unlocktechnology
LCD?
Posts: 6
Joined: Sat Jan 21, 2006 7:30 pm

Post by unlocktechnology »

In addition, I have tried to write to the device using the executable files in the power_on and boot_screen folders and nothing seems to happen at all. I have also tried the display_tuner to adjust the brightness and this also fails. I think I am doing something terribly wrong.

Raquel
Matrix Orbital
Matrix Orbital
Posts: 805
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hi,
I just want to ask you if you have simply tested the module with hyperterminal or any other terminal emulators. Just to make sure that the module is working properly.
Raquel Malinis
Design and Development
Matrix Orbital

unlocktechnology
LCD?
Posts: 6
Joined: Sat Jan 21, 2006 7:30 pm

Post by unlocktechnology »

I have not as yet tested the device using hyperterminal. What settings should I use in hyperterminal to connect?

Raquel
Matrix Orbital
Matrix Orbital
Posts: 805
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Use the same settings: 19200,N,8,1. This is elementary testing. If this does not work, it could be the installation of the drivers.
Raquel Malinis
Design and Development
Matrix Orbital

unlocktechnology
LCD?
Posts: 6
Joined: Sat Jan 21, 2006 7:30 pm

Post by unlocktechnology »

I cannot get anything working with hyperterminal, however I am not farmiliar with its use. I can connect ok (as I can with the included test apps) but cannot write anything to the display.

What sort of flow control setting should I use in hyperterminal?

Henry
OMNIPRESENT
OMNIPRESENT
Posts: 3002
Joined: Tue Aug 14, 2001 6:00 pm
Contact:

Post by Henry »

None
Henry J.
President
Matrix Orbital

unlocktechnology
LCD?
Posts: 6
Joined: Sat Jan 21, 2006 7:30 pm

Post by unlocktechnology »

Which driver does one use...

FTDIBUS.INF or FTDIPORT.INF...

Jeroen Vonk
LCD Guru
Posts: 55
Joined: Tue Apr 12, 2005 2:31 am

Re: Noobie with a MX2 using VB6

Post by Jeroen Vonk »

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.
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:

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
If you would like to use the display in you program, but don't really care about comm port programming you could consider using the SDK I wrote. The link is at the bottom of my message..... The above code would be this:

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
Should save you a lot of work :)

Post Reply