Automating SATSAGEN with autoexec.txt

Starting with version 0.9.5.1, SATSAGEN can execute commands automatically at the end of the Power-on sequence.

A file named autoexec.txt, placed in the Documents\satsagen\settings directory, is read by SATSAGEN after the Power-on sequence has completed. The commands contained in the file are then executed line by line.

When running multiple SATSAGEN instances, each instance uses its own autoexec file. The default instance #0 uses autoexec.txt, while subsequent instances use a numbered filename:

  • Instance #0 → autoexec.txt
  • Instance #1 → autoexec_1.txt
  • Instance #2 → autoexec_2.txt
  • and so on.

The autoexec.txt file can be used, for example, to configure register fields of the LMX2595 and LMX2820 PLL synthesizers when the default driver settings do not meet specific requirements. It can also be used to automatically configure and start the Spectrum Analyzer.

Configuring PLL Synthesizer Registers

The command used to set a register field is simply the letter w, followed by the field name and its value:

w FIELD VALUE

For example, if we want to prevent the PLL reference clock from being multiplied by two, we can use:

selectdevice tx
w OSC_2X 0

By default, the driver enables the reference clock doubler for input reference frequencies up to 130 MHz.

The first command, selectdevice tx, selects the device that will execute the following commands.

If we need to control one of the synthesizers used as a local oscillator for an external mixer, the corresponding commands are:

selectdevice extlorx

to select the synthesizer used as the LO of the external RX mixer, or:

selectdevice extlotx

to select the synthesizer used as the LO of the external TX mixer.

For the complete list of available register fields and their allowed values, refer to the official documentation of the corresponding synthesizer.

Automating Spectrum Analyzer Startup

As mentioned above, autoexec.txt can also be used to automate the configuration and startup of the Spectrum Analyzer.

The available commands are:

  • setcfsa frequency — sets the Spectrum Analyzer center frequency, expressed in kHz.
  • setspansa span — sets the frequency span, expressed in MHz.
  • setrxgainsa gain — sets the RX gain, expressed in dB.
  • startsa — starts the Spectrum Analyzer.

These commands can be combined with device-selection and PLL register commands, allowing a complete operating configuration to be established automatically at Power-on.

Example

For example, suppose we want to disable the reference clock doubler of the TX synthesizer and automatically start the Spectrum Analyzer at Power-on with:

  • Center frequency: 432 MHz
  • Span: 1 MHz
  • RX gain: 30 dB

The autoexec.txt file would contain:

selectdevice tx

w OSC_2X 0

setcfsa 432000

setspansa 1

setrxgainsa 30

startsa

With this configuration, after the Power-on sequence completes, SATSAGEN automatically selects the TX synthesizer, disables its reference clock doubler, configures the Spectrum Analyzer, and starts the acquisition.

The autoexec.txt mechanism provides a simple way to customize the startup configuration of SATSAGEN and automate repetitive operations without requiring manual interaction with the user interface.