Call Search
     

New to Ham Radio?
My Profile

Community
Articles
Forums
News
Reviews
Friends Remembered
Strays
Survey Question

Operating
Contesting
DX Cluster Spots
Propagation

Resources
Calendar
Classifieds
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
About eHam.net

   Home   Help Search  
Pages: [1]   Go Down
  Print  
Author Topic: Help with VB Prog and Yaesu Cat Problem Please!!  (Read 906 times)
M0BMN
Member

Posts: 1




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

Hi
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
Logged
AA6YQ
Member

Posts: 1746


WWW

Ignore
« 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 www.qsl.net/dxlab .

    73,

         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 ""
    CIVModule.UpdateCaption
       
    Exit Sub

OpenFailed:

    If Err.Number = 8005 Then
        CIVModule.SetCommCaption " - selected Com port already in use"
        CIVModule.UpdateCaption
        MsgBox "Already in use", vbOKOnly, "Unable to open Com" + Format$(Port)
        Opened = False
    Else
        ErrorMessage = Err.Description + " (" + Format$(Err.Number) + "), port = " + Format$(Port) + ", settings = " + CommString
        CIVModule.SetCommCaption " - selected Com port failed to open: " + Err.Description
        CIVModule.UpdateCaption
        MsgBox ErrorMessage, vbOKOnly, "Unable to open Com" + Format$(Port)
        Opened = False
    End If
   
    Exit Sub
   
Abort:
    Common.ProgramError Err.Number, "CIVComm.OpenPort"
End Sub
Logged
Pages: [1]   Go Up
  Print  
 
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!