The Wind control demo requires three files:
1) NMEATalker.ocx talks to the NMEA 1.5 or NMEA 2.0 wire
2) Wind.ocx draws the wind control
3) MWV.EXE is the program to run that connects the two above
Optional file: Visual BASIC 6.0 source code, in PKZip format.
If you place all three files in the same directory and then run MWV.EXE, you ought to see the wind control show on your screen. The control is resized via its width: if you use the mouse cursor and left mouse button, you can pull the control left or right to make it larger or smaller.
Private Sub Form_Resize() If Me.WindowState <> vbMinimized Then If Me.Width < 2500 Then Me.Width = 2500 ctlWind1.Width = Me.Width - Screen.TwipsPerPixelX * 14 ctlWind1.Height = ctlWind1.Width If Me.WindowState <> vbMaximized Then Me.Height = ctlWind1.Height + (Screen.TwipsPerPixelX * 33) End If End If End Sub
If you "double click" the wind control, you ought to see the set-up window. The defaults for NMEA are COM1,4800,n,8,1 but you may change the COM port and baud rate where needed. The older NMEA uses a baud rate of 1200, while the newer uses 9600.
The set-up screen includes a "Open Talker" button that is used to start the control listening to the NMEA wire. The "Close Talker" disconnects from the NMEA wire. The timeout is 5 seconds: if a connection is not made in that time, chances are good the com port or baud rate is incorrect, or your computer is not wired to the NMEA buss.
Private Sub Talker1_MWV(NMEASentence As Variant) ctlWind1.MWV NMEASentence End Sub
When connected, the control listens to any MWV sentence, and when it hears one it passes that sentence to the control to redraw. The MWV device that speaks ought to be itself selectable for true or relative angle, and the unit of speed.
Note that I could not test the program with a anemometer because I do not have one. I did test the NMEA connection using a GPS receiver. If it does not work, please holler so that I can try to fix it.
NMEA Sage Wind Control
NMEA Sage Talker Control