Command Tester/K3 Macros

This page may be used to exercise the K3 commands described in the Elecraft K3 Programmer's Reference, or to view data sent by the K3 that is not a response to an immediate command, for example the periodic data sent by the K3 when it is in Text to Terminal or Auto Info mode.

Type a command into the input area, and observe the K3's response in the output window. Commands are shown in green, K3 responses are shown in black.

Some K3 command responses may contain unprintable characters. The command tester converts unprintable characters (those outside the range from \x20 to \x7E) into a hexadecimal representation. For example, the response to the "IC;" command on my K3 is displayed as "IC\x80\x88\x94\x80\x80;". When my K3's VFO A display reads " 7.078.36 ", the response to the "DS;" command is displayed as "DS@7\xB078\xB36@\x90\x80;". See the K3 Programmer's Reference for a description of K3 commands and their responses.

Buttons on the Command Tester page are enabled only when the K3 Utility has established communications with your K3.

Macro buttons

Above the output window are several rows of Macro buttons. These buttons may be configured by selecting the "Edit Macros" button to display the Edit Command Testers/K3 Macros dialog.

Edit Command Tester/K3 Macros

The first eight Macros may be stored in the K3 and assigned to K3 front panel switches for single-switch execution. Each K3 macro may have up to 7 characters of Macro Label and 120 characters of associated Macro Commands. The 7-character Macro Label length limitation corresponds to the length of the K3 VFO B display area.

Prepare and test your K3 macros in the Command Tester, then click the "Send Macros 1-8 to K3" button. Be patient, as it takes a few seconds to store the Macros.

The Save button at the bottom of this dialog saves macro captions and text on your Personal Computer. Use the "Send Macros 1-8 to K3" button to store macros into your K3.

K3 Macro capability was introduced in MCU revision 03.51. See the Firmware Release Notes and the K3 Programmer's Reference (version C.6 or later) for information on writing macros and how to assign a K3 Macro to a specific K3 front panel switch.

Macro assignment procedure overview

Copy and Paste procedure

You may use the standard Windows clipboard copy/paste functions to copy the Macro Commands from source documents (such as the Sample Macros below in this Help page) into the edit boxes of the K3 Utility's Edit Command Tester/K3 Macros dialog.

  1. Position the mouse cursor on the first character of the "source" text.
  2. Press and hold the left mouse button.
  3. While holding the left mouse button down, move the mouse to the right so that the mouse cursor is over the last character of the source text. The highlighted text is the "selected text".
  4. Release the left mouse button.
  5. On the computer keyboard, hold the Ctrl key and tap "C" to copy the selected text into the Windows Clipboard. Ctrl-C is the "copy to clipboard" keyboard shortcut.
  6. Position the mouse cursor in the desired edit box in the "Macro Commands" column of the Edit Command Tester/K3 Macros dialog.
  7. Click and release the left mouse button. This changes "keyboard focus" to the edit box.
  8. On the computer keyboard, hold the Ctrl key and tap "V" to paste the Windows Clipboard content into the edit box. Ctrl-V is the "paste" keyboard shortcut.

Sample Macros

These macros are starting points for your own work.

Refer to the K3 Programmer's Reference (Revision C6 or later) sections headed "Command Examples" and "Creating and Using Macros" for a further introduction.

Macro LabelMacro CommandsDescription
SPLIT+2 SWT13;SWT13;FT1;UPB5;RT0;XT0; CW Split starting point (UP 2)
SWT13; is a switch emulation command that has the same effect as tapping the A->B key once to copy VFO A frequency to VFO B.
SWT13; taps the A->B key again to copy all other settings to VFO B.
FT1; enters Split mode.
UPB5; moves VFO B up 2 kHz. The number 5 in UPB5 is not a value in kHz, but ain index into a table of set sizes. See the K3 Programmer's Reference description of DN for full details.
RT0; turns off RIT.
XT0; turns off XIT.
SPLIT+5 SWT13;SWT13;FT1;UPB5;RT0;XT0; CW Split starting point (UP 5)
SWT13; taps A->B once to copy VFO A frequency to VFO B.
SWT13; taps A->B again to copy all other settings to VFO B.
FT1; enters Split mode.
UPB7; moves VFO B up 5 kHz. See the K3 Programmer's Reference description of DNB for the encoding of the move VFO B command.
RT0; turns off RIT.
XT0; turns off XIT.
WEAKSIG DV1;PA1;PA$1;BW0020;IS 9999; Weak signal (with diversity, requires the KRX3 sub receiver)
DV1; to turn on Diversity mode
PA1; turns on the main receiver preamp.
PA$1; turns on the sub receiver preamp.
BW0020; sets the filter bandwidth to 200 Hz. BW is expressed in units of 10 Hz.
IS 9999; removes IF shift and centers the passband in the current mode.
CLEANUP FT0;RT0;XT0;LN0;SQ000; Turns off split, RIT, XIT, unlinks VFOs, and turns off squelch.
FT0; turns off Split mode.
RT0; turns off RIT.
XT0; turns off XIT.
LN0; unlinks the VFOs.
SQ000; turns squelch off
WWV 10 FA00010000000;MD5;FA00010000000;BW0300; Tune rig to WWV at 10 MHz, AM
FA00010000000; tunes VFO A to 10 MHz. The FA command requires 11 digits. May cause a band change.
MD5; enters AM mode.
FA00010000000; is required only if auto-offset-on-mode-change is in effect (in CONFIG:CW WGHT, tapping 5 alternates between VFO NOR and VFO OFS). In the latter case, the VFO frequency is adjusted when switching between CW and any other mode.
BW0300; sets the filter bandwith to 3 kHz.
OLDIES FA00001550000;MD5;FA00001550000; BW0400;IS 9999;RA01;PA0; Tune to N6KR's favorte late-night AM music station on 1550 kHz
FA00001550000; tunes VFO A to 1550 kHz.
MD5; enters AM mode.
FA00001550000;
BW0400; sets the filter bandwith to 4 kHz.
IS 9999; removes any IF shift.
RA01; turns on the receive attenuator.
PA0; turns off the preamp.
LCD BRT MN003;MP005;MN255; Set the LCD brightness to 6, the brighest setting
MN003; opens the MENU and selects the LCD menu item.
MP005; selects brightness level 6. Use the command tester to evaluate what happens with MP000; through MP005;
MN255; closes the menu.
LCD DIM MN003;MP001;MN255; Set the LCD brightness to 2, one of the dimmest settings
MN003; opens the MENU and selects the LCD menu item.
MP001; selects brightness level 2.
MN255; closes the menu.
LOCKA&B LK1;LK$1; Lock VFOs A and B
LK1; locks VFO A
LK$1; locks VFO B. This works whether or not a sub receiver is installed.
PWRTEST PC100;KYW=;PC010;KYW=;PC001;KYW=;PC100; Sends the BT prosign at 100 W, 10 W, 1 W, and restores power to 100 watts
PC100; sets power to 100 watts
KYW=; sends the BT prosign
PC010; sets power to 10 watts
KYW=; sends the BT prosign
PC001; sets power to 1 watt
KYW=; sends the BT prosign
PC100; sets power to 100 watts
TUN 10W PC010;SWH16; Sets power to 10 watts and enters TUNE mode
PC010; sets power to 10 watts
SWH16; emulates holding TUNE
599FAST KS040;KYW5NN;KS025;KYWTEST; Sends "5NN" at 40 WPM, then "TEST" at 25 WPM
KS040; sets the keyer speed to 40 WPM.
KYW5NN; sends "5NN" and waits for the characters to all be transmitted.
KS025; sets the keyer speed to 25 WPM.
KYWTEST sends "TEST" and waits for the characters to all be transmitted
MUTE AF AG000;AG$000; Sets Main and Sub receiver AF gain to zero
AG000; sets the main receiver AF gain to zero.
AG$000; sets the sub receiver AF gain to zero.
SCANNOW SWT15;SWT39;SWT23;SWT39;SWH41; Stores VFO A and B in per-band quick memory M4 and starts scan. (> 2 second hold starts "live" scan). VFO B frequency must be > VFO A
SWT15; simulates tapping V->M
SWT39; simulates tapping M4
SWT23; simulates tapping M->V
SWT39; simulates tapping M4
SWH41; simulates holding M4-RPT
MON OFF ML000; Sets monitor volume to zero
ML000; sets the monitor level to zero in the present mode.
STEPPIR IF; Sends frequency information to a device attached to the K3 serial port, such as an antenna controller or ATU.
IF; requests general transceiver information, including VFO A's frequency and the mode. When the K3 encounters a GET command in a macro, it sends the response to any device attached to the serial port, just as if the computer had requested it. Multiple GET commands could be placed in a macro if necessary; examples include FA; and FB; which return VFO A and VFO B frequencies.