I want to programmatically get the SWR, or at least an approximation of the
SWR via the serial cable.
I found an old application kx3swr.py (http://robert.butera.org/?p=380), but
somehow this one returned always 0.0 as SWR back, which I didn't really
believe. Basically the program does this:
select ATU menu: MN023;
turn ATU to bypass: MP001;
turn menu off: SWT09;
set frequency: FA ... ;
wait a bit
turn TUNE button: SWH16;
wait a bit
get VFO data: DS;
try to decipher it
release TUNE button: SWT16;
However, my KX3 with firmware 2.38 always returns DS@@@@@>>@; as response.
Even when I do the steps manually. Did this change with some recent
firmware update, or did I miss something important? Only when outside of
TUNE I get some value, e.g. DS14³60°00.
Also, dear Elecraft, in the K3&KX3 Programmers manual you wrote in the BG
command description "CWT, SWR, and CMP readings not yet available". How
long is "not yet" going to take? :-)
Or, dear Elecraft, maybe you implement the RM command like the Kenwood
TS850 or TS870 ... (I have found them used in the hamlib source).
of my KX3 :-) I'd rather learn in a generic way how to get the SWR.
I however checked out the source, and
in wizkers/oem/radio/www/js/app/instruments/elecraft/driver_frontend.js it
does in this.tune = something similar: MN023;MP001;MN255;SWH16;. I didn't
found where it sends the DS; command, but the parsing of the DS commands
output is is at the end
However, if the radio returns DS@@@@@>>@; as response, than there is still
nothing to decode.
The SWR returned is 1.3-1 as displayed on VFO-A. The @ in the returned data means there is NO data in that byte position. The returned DS data will require “massaging” to get a proper text string as there is display Icon data mixed in.
A KX2 was used for this test, but KX3 should be the same.
For “TUNE” hold, I have my KX2 is set to a fixed level (3 Watts) by the TUN PWR menu entry. So the power level issue was masked in my setup. I don’t know what minimum power level is required for an accurate SWR reading, and ATU tuning. The designers may want to comment. For KX3 ref pg 14 in owners reference.
The KX3 may be “fast enough” to not need a delay in your code. The KX2 appears to not be.