This Visual Basic sample illustrates how to use LOGic's Windows COM (Common Object Module) interface feature to easily interface your program
This example is written in Visual Basic 6. However, any language or product supporting COM may be used, including ASP. If you do not have Visual Basic, you can look at vbtest.frm with any text editor to see the methods and properties exposed by LOGic's COM interface, and examples of how to use them.
Contact Dennis Hevener at PDA if you have any questions or need functionality you don't see in this example. Sorry, we do not have a full list of all properties and methods available to you. Pretty much the whole LOGic application is exposed thru the interface, so there are literally thousands of properties and methods available!
Here is some miscellaneous stuff that you can do with the LOGic interface--not too well organized--just stuff people have asked about:
Of course you must first
Do the VFO A=B function
Send your own carriage return CHR(13) at the end of the command for the Orion
returns TRUE or FALSE depending on whether or not LOGic is successfully communicating with the radio.
Set or return polling of all rigs. Turn off if you want to read from the rig yourself.
This info is for the Orion and other rigs that use ASCII text for their control.
First, you can wait for a specific character to be received in the buffer. This waits for a carriage return to be sent. If not sent in 350 milliseconds, it returns FALSE.
The wait time must be less than the polling timer interval! If if returns false, you may want to wait and retry, and after a few retries, alert the user.
Oh, before you can use wait_char(), you should know about
It sets or returns the number of characters that the MSCOMM control will receive before firing the ONCOMM event. It must be set to 1 to use wait_char(). It probably already is set for you, but you may want to check it.
To just read what is in the buffer, read
This command is specific to the Orion and possibly a few other rigs that use text input and output:
This sends the Command, waits for a response, and then returns the response. It automatically appends CHR(13) to the command. It automatically handles retrying and alerting the user if the rig disappears.
Flush cnt characters from the receive buffer, or pass 0 to flush all.
sets and reads the InputMode property. returned by the Iput property of .comm. 0 is text, 1 is binary, returned in an array.
Reads Cnt characters from the port and returns them as a string. Pass 0 to read all characters in the rx buffer. This will read all ASCII characters, including chr(0) (be careful if using character strings in the C language!). I think InputMode has to be set to 1 first.
.Comm is simply a reference to the Microsoft Comm control MSCOMMLib.MScomm Consult the microsoft documentation for more info.
Here is how to control the Voice Push-To-Talk in LOGic. The "Voice" PTT is actually a general-purpose PTT control, useful for keying the transmitter from a digital communications program, for instance. (The CW Keyer PTT in LOGic is a separate object in LOGic. It is a part of the CW Keyer form.)
To see if the user has set up Voice PTT, check that
is not .null.
To key PTT:
You can check the key-down state by checking this property:
It will be True or False.