Call Search

New to Ham Radio?
My Profile

Friends Remembered
Survey Question

DX Cluster Spots

Ham Exams
Ham Links
List Archives
News Articles
Product Reviews
QSL Managers

Site Info
eHam Help (FAQ)
Support the site
The eHam Team
Advertising Info
Vision Statement

donate to eham
   Home   Help Search  
Pages: [1]   Go Down
Author Topic: Help with VB Prog and Yaesu Cat Problem Please!!  (Read 1282 times)

Posts: 1

« on: February 16, 2004, 07:03:17 AM »

This is my first post to the group and i really hope someone can help me, I have writen a very short little test prog to send cat controls to my FT897, and it works fine, just 5 little text boxes and a send button and i can change freq or mode just as it should but... i have no idea how to get infro back from the radio ,like the freq it thinks its on or signal strength , i know i need to use the mscomm.input but not sure what to do about buffers etc and will the info come back in hex or ascii ? anyone that has writen any progs for yaesu cat may beable to help ,if you can please do im pulling out my hair here and i dont have much left. The program (If it ever gets finished !) is for anyone with poor vision and will have a very large freq readout etc ,it will be freeware on my web site.
cheers all
Paul M0BMN

Posts: 2092


« Reply #1 on: February 17, 2004, 04:38:01 AM »

You must periodically direct your FT897 to send you its VFO frequency, VFO mode, and S-meter.

The commands to do this are described on page 62 of you FT-897 manual.

Sending the "Read Frequency and Mode Status" command (opcode 03, incorrectly called "Read RX Status" in the table) will cause the FT-897 to send you 5 bytes into which the frequency and mode are encoded, as shown in Note 5 on page 62. The four bytes containing frequency are binary-coded decimal (BCD), as illustrated in Note 5. The mode byte is a simple hex encoding.

Sending the "Read RX Status" command (opcode E7) will cause the FT-897 to send you a byte containing the S-meter data in its low-order 4 bits, as shown in Note 3 on page 62.

The code I use to open a serial port using the MSCOMM control is appended below.

You may find it helpful to download Commander, a free transceiver control application that besides handling most Yaesu, Kenwood, Icom, and TenTec transceivers will display all transceiver control messages in either Hex, Decimal, or Ascii; given the poor quality of Yaesu's documentation -- this will save you some trial-and-error. Commander is available via .


         Dave, AA6YQ

Const ReceiveBufferLen = 1024
Const TransmitBufferLen = 1024

Sub OpenPort(Port As Integer, Speed As Long, Parity As String, WordLength As String, StopBits As String, DTRControl As Integer, RTSControl As Integer)

    Dim CommString As String
    Dim ErrorMessage As String
    On Error GoTo Abort

    If Port = 0 Then Exit Sub
    If Opened Then CommControl.PortOpen = False 'reconfigure
    CommControl.CommPort = Port
    CommControl.DTREnable = ModemControlEnabled(DTRControl)
    CIVComm.ConfigureRTS (RTSControl)
    CommControl.InBufferSize = ReceiveBufferLen
    CommControl.InputLen = 0                  'get everything received
    CommControl.NullDiscard = False
    CommControl.InputMode = comInputModeText  'get strings
    CommControl.RThreshold = 1                'enable receive events
    CommControl.OutBufferCount = 0            'clear the output buffer
    CommControl.OutBufferSize = TransmitBufferLen
    CommControl.SThreshold = 0                'disable transmit events
    CommControl.InBufferCount = 0             'flush anything laying around from before
    CommString = Format$(Speed) + "," + Parity + "," + WordLength + "," + StopBits
    'Debug.Print CommString
    CommControl.Settings = CommString
    CommControl.EOFEnable = False
    CommControl.Handshaking = comNone
    On Error GoTo OpenFailed
    CommControl.PortOpen = True               'try opening the port
    On Error GoTo Abort
    Opened = True
    CIVModule.SetCommCaption ""
    Exit Sub


    If Err.Number = 8005 Then
        CIVModule.SetCommCaption " - selected Com port already in use"
        MsgBox "Already in use", vbOKOnly, "Unable to open Com" + Format$(Port)
        Opened = False
        ErrorMessage = Err.Description + " (" + Format$(Err.Number) + "), port = " + Format$(Port) + ", settings = " + CommString
        CIVModule.SetCommCaption " - selected Com port failed to open: " + Err.Description
        MsgBox ErrorMessage, vbOKOnly, "Unable to open Com" + Format$(Port)
        Opened = False
    End If
    Exit Sub
    Common.ProgramError Err.Number, "CIVComm.OpenPort"
End Sub
Pages: [1]   Go Up
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!