Sunday, September 12, 2021

ADF4351 signal generator with sweep

Nothing major here, needed a small signal generator to test in the 10Ghz range (using harmonics from 3.3Ghz), decided to go with the ADF4351 module available everywhere. This is an improvement over the previous iteration here.
After the initial testing on 3.3Ghz made some changes on the software in order to set some common frequencies for future testing with QO-100 satellite equipment and also added provision to sweep around the frequency currently set in order to test some filters. Output on 3.4Ghz:
And testing the third harmonic:
The Rigol is not a 10Ghz version, I'm using a down converter before the input, that will be another post... The diagram, at this stage I still didn't added the two extra buttons (look on code for mode and band), to change band and to change mode between set frequency and sweep.
Inside on the almost final interaction (waiting SMA's to connect to front pannel):
And the front panel view working:

The code on the current version, keep in mind might still have some bugs, reach me for latest version if there is one: If blogger breaks formatting ask me a copy by email. 

/*!
   ADF4351 signal generator
   
   CT2GQV 2020
   v1.4

   Based on code from: ADF4351 example program https://github.com/dfannin/adf4351

   VFO with 100Khz steps starting from a predifined frquency (UL frequencia) using 2 buttons for up and down.
   Display on 16x2 I2C LCD of the frequency set and the third harmonic value
   Also serial output of the main frequency set.
   Possibility to sweep for filter testing.
*/

#include <Arduino.h>
#include "adf4351.h"
#include <LiquidCrystal_I2C.h>

#define SWVERSION "1.4" // 2021-09-11
#define PIN_SS 9  ///< SPI slave select pin, default value
ADF4351  vfo(PIN_SS, SPI_MODE0, 1000000UL , MSBFIRST) ;
                       
//unsigned long frequencia = 3333320000UL ; // 3.333.334 (10 Ghz n=3)
unsigned long frequencia = 3496500000UL ; // 3.496.000 (10.489 Ghz n=3)
unsigned long maxfrequencia;
unsigned long minfrequencia;

// unsigned long frequencia = 2000000000UL ; // 2.000.000 (10 Ghz n=5)
// unsigned long frequencia =    414000000UL ; //    414.000 (10.368 Ghz n=25)
// for 442Mhz use the bellow and comment the above
//   unsigned long frequencia =  442000000UL ; // 442Mhz or 1.326 Ghz , tird harmonic

// I2C LCD virtual pinout
#define I2C_ADDR    0x27  // I2C Address for my LCD, found with I2C scanner
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7
LiquidCrystal_I2C       lcd(I2C_ADDR, En_pin, Rw_pin, Rs_pin, D4_pin, D5_pin, D6_pin, D7_pin);

// buttons for up/down in frequency, puleed up from 5v with a 10K resistor, analog pin will be short to ground for button press

int button0 = 0; // mode
int button1 = 1; // up
int button2 = 2; // down
int button3 = 3; // select / band / step

int opmode = 0; //
int tempopmode = 0; //
int band = 0;
// Band 0 - 10Ghz (3.3Ghz harmonic) - 10489.550 to 10489.795MHz ->
// Band 1 - 2400.050 frequencia = 2400500000UL
// Band 2 - 1969.5Mhz (-2400 = 431Mhz )
// Band 3 - 2256 (2400-144Mhz) - 2400.050 to 2400.295MHz
// band 4 - 739.55 - LNB out

void setup()
{
  Serial.begin(9600) ;
  Serial.print("adf4351 VFO CT2GQV "); Serial.println(SWVERSION) ;

  pinMode(button0, INPUT); // mode
  pinMode(button1, INPUT); // up
  pinMode(button2, INPUT); // down
  pinMode(button3, INPUT); // band

  lcd.begin (16, 2, LCD_5x8DOTS); lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE); lcd.setBacklight(HIGH); // 20x4 lines display LCD
  lcd.home();
  lcd.setCursor(0, 0);  lcd.print("Signal Generator  ");
  lcd.setCursor(0, 1);  lcd.print("Ver: "); lcd.print(SWVERSION);

  Wire.begin() ;
  /*!
     setup the chip (for a 10 mhz ref freq)
     most of these are defaults
  */
  vfo.pwrlevel = 3 ; // measured at 3.3Ghz after 1m cable >> "0" = -8 dBm / "1" =  -5.8dbm / "2" = -3.3dbm / "3" = -0.4dbm
  vfo.RD2refdouble = 0 ; ///< ref doubler off
  vfo.RD1Rdiv2 = 0 ;   ///< ref divider off
  vfo.ClkDiv = 150 ;
  vfo.BandSelClock = 80 ;
  vfo.RCounter = 1 ;  ///< R counter to 1 (no division)
  vfo.ChanStep = steps[2] ;  ///< set to 10 kHz steps

  /*!
     sets the reference frequency to 10 Mhz
  */
  if ( vfo.setrf(10000000UL) ==  0 )
    Serial.println("REF.SET: 10 Mhz") ;
  else
    Serial.println("ERROR: reference freq set error") ;
  /*!
     initialize the chip
  */
  vfo.init() ;

  /*!
     enable frequency output
  */
  vfo.enable() ;

  delay(500);
  lcd.clear();

  if ( vfo.setf(frequencia) == 0 ) {
    Serial.print("VFO.SET:") ; Serial.println(vfo.cfreq) ;
    lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
    lcd.setCursor(0, 1);  lcd.print("F(3):"); lcd.print((frequencia/1000)*3);
  } else {
    Serial.println("ERROR: Set init Frequency") ;
  }

vfo.ChanStep = steps[4] ; ///< change to 100 kHz
}

void loop()
{
  int buttonState0 = analogRead(button0); // mode
  int buttonState3 = analogRead(button3); // band
 
  int buttonState1 = analogRead(button1); // up
  int buttonState2 = analogRead(button2); // down
  // serial debug for the button for +/- frequency
  // Serial.print("B1,B2:"); Serial.print(buttonState1); Serial.print(",");  Serial.println(buttonState2);


// band / start/stop sweep
  // button pin is puled down to ground...or close to it (100) as long as lower than 2049
  if (buttonState3 <= 100) {
    {


   if (opmode == 1 ){  
       /////// start stop start procedure
       if(tempopmode == 1) // started
        {
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("SWEEPING starded ");
        lcd.setCursor(0, 1);  lcd.print("Stop---------->  ");   
        tempopmode = 255;
        maxfrequencia=frequencia+10000000; //compute the max frequency so we start from the one now and 100Mhz down and up
        minfrequencia=frequencia-10000000; //compute the min frequency so we start from the one now and 100Mhz down and up
        delay(150);
        }
        else // is stoped
        {
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("SWEEPING stoped ");
        lcd.setCursor(0, 1);  lcd.print("Start---------->");
        tempopmode = 1;
        delay(150);
       }
   };
      
    // we are in band mode
    if (opmode == 0 ){            
      Serial.print ("BAND: ");
      band++;
      if (band > 4){band=0;};
      if(band == 0){
        frequencia=3496500000UL;
        vfo.setf(frequencia);
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
        lcd.setCursor(0, 1);  lcd.print("F(3):"); lcd.print((frequencia/1000)*3);  };
      
      if(band == 1){
        frequencia=2400500000UL;
        vfo.setf(frequencia);
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
        lcd.setCursor(0, 1);  lcd.print("TX QO100         ");   };
      
      if(band == 2){
        frequencia=1969500000UL;
        vfo.setf(frequencia);
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
        lcd.setCursor(0, 1);  lcd.print("+430Mhz QO100 TX");  };
      
      if(band == 3){
        frequencia=2256000000UL;
        vfo.setf(frequencia);
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
        lcd.setCursor(0, 1);  lcd.print("+144Mhz QO100 TX");  };

      if(band == 4){
        frequencia=739550000UL;
        vfo.setf(frequencia);
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
        lcd.setCursor(0, 1);  lcd.print("LNB OUT 10.48955");  };

        Serial.println(band) ;
      
     }; // let's change band
               
    };
  }
// end band up  

// mode  
  if (buttonState0 <= 100) {
    {
      if(opmode == 0)
      {
        opmode=1; tempopmode = 1;
        Serial.print ("SWEEP MODE:"); Serial.print(opmode);  Serial.print(","); Serial.println(tempopmode) ;
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("SWEEPING MODE   ");
        lcd.setCursor(0, 1);  lcd.print("START/STOP----->");   
        delay(150);       
      }
      else
      {
        opmode=0; tempopmode =0;
        Serial.print ("BAND MODE:"); Serial.print(opmode);  Serial.print(","); Serial.println(tempopmode) ;
        lcd.clear();
        lcd.setCursor(0, 0);  lcd.print("F :"); lcd.print(frequencia/1000);
        lcd.setCursor(0, 1);  lcd.print("BAND MODE       "); lcd.print(frequencia/1000);
        
      };
      
    }
  } // end if (buttonState0 <= 100) {



// if we are sweeping
if (opmode==1 && tempopmode == 255){lcd.print(" .");};
if (opmode==1 && tempopmode == 255){lcd.print("  o");};
if (opmode==1 && tempopmode == 255){lcd.print("   O");};

if (opmode==1 && tempopmode == 255){
  frequencia += vfo.ChanStep; // increase frquency by step
  if (frequencia >= maxfrequencia){frequencia=minfrequencia;}; // if we are on the limit then go to lower value
  vfo.setf(frequencia);
   Serial.print ("F:"); Serial.println(frequencia) ;
 };



// up frequency
  // button pin is puled down to ground...or close to it (100) as long as lower than 2049
  if (buttonState1 <= 100) {
    frequencia += vfo.ChanStep;
    if ( vfo.setf(frequencia) == 0 )
    {
      Serial.print ("VFO.SET: "); Serial.println(vfo.cfreq) ;
      lcd.clear();
      lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
      if (band == 0 ){lcd.setCursor(0, 1);  lcd.print("F(3):"); lcd.print((frequencia/1000)*3);};
    }
  }
// end up frequency  

// down frequency
  if (buttonState2 <= 100) {
    frequencia -= vfo.ChanStep;
    if ( vfo.setf(frequencia) == 0 )
    {
      Serial.print ("VFO.SET: "); Serial.println(vfo.cfreq) ;
      lcd.clear();
      lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
      if (band == 0 ){lcd.setCursor(0, 1);  lcd.print("F(3):"); lcd.print((frequencia/1000)*3);};
    }
  }
// end down frequency  

 
 // button software debounce if we are not sweeping
 if (opmode == 0) {   delay(150); };
 
} // end code

 

 

 

 Have a great day!

Saturday, May 22, 2021

Fan/temperature control for Agilent/HP6621A

 This power supply is a bit noisy with the fan being constantly on. 


Decided to change the fan status to come on only when temperature rise since it will be mostly used for small loads. 

The approach decided was the simplest one without much changes internally, a temperature activated switch for 30C inline with the fan supply (110V).

The switch was bolted to the heat-sync in the small available space and tested before drilling so it would not touch the lid after closing.


For example it would not fit on the following position:


The end result:

 

No schematic here, just placed the switch inline/series with one of the fan power cable line.

keep in mind that the thermal switch used is a normally open one (NO) and not like the most common ones, normally closed (NC), used in home appliances, like toasters and grills, also called thermal cut out switch.  It closes on reaching 30C.

The switch is just on the heath sync of power supply A, that will be the most used output. For output B would be just a matter of paralleling another thermal switch. The power supply it self has temperature control for thermal shutdown, that will be the second "line of defense" in case anything to go wrong and also the transformer itself resonates so it will be not a full quiet power supply.


Have a nice day!






Sunday, March 07, 2021

Microphone amplifier for signal generator external modulation input

 Needed a small microphone signal amplifier to connected to the external modulation input of the Wavetek 3001 signal generator so I can test an AM de-modulator.

Nothing fancy here, just basic electret microphone amplifier. Microphone is of the basic type sold for computers voice calls.

 The diagram/schematic:

 


The result:

Works OK for basic testing, maybe in the future will join a noise and dual tone generator.

Have a nice day!

Saturday, January 30, 2021

ADF4351 Signal Generator

 Not much here, just a simple signal generator based on ADF4351 module from "fleebay". PS: there is an improvement over this code at this new post.


 I just needed to generate one single frequency that can go up or down in 100Khz steps via two push buttons. Added an optional LCD to display the main frequency and the third harmonic since I'm using it to verify some equipment on 10Ghz.

Test board:



On the frequency counter:



Schematic based on an Arduino Nano controler:

Spectrum output on lower frequencies (414Mhz) and output level at "0" (add 20db attenuation at the spectrum input):

and the third harmonic:

Power at "3" (second harmonic now visible)


 3rd harmonic as seen on a 10Ghz adapter for a 1.5Ghz spectrum analyzer:
(not calibrated):

Code:

 /// code start
/*!
   ADF4351 signal generator
  
   CT2GQV 2020
   v1.3

   Based on code from: ADF4351 example program https://github.com/dfannin/adf4351

   VFO with 100Khz steps starting from a predifined frquency (UL frequencia) using 2 buttons for up and down.
   Display on 16x2 I2C LCD of the frequency set and the third harmonic value
   Also serial output of the main frequency set.
*/

#include <Arduino.h>
#include "adf4351.h"
#include <LiquidCrystal_I2C.h>

#define SWVERSION "1.3"
#define PIN_SS 9  ///< SPI slave select pin, default value
ADF4351  vfo(PIN_SS, SPI_MODE0, 1000000UL , MSBFIRST) ;
                      
unsigned long frequencia = 3333320000UL ; // 3.333.334 (10 Ghz n=3)
// unsigned long frequencia = 2000000000UL ; // 2.000.000 (10 Ghz n=5)
// unsigned long frequencia =    414000000UL ; //    414.000 (10.368 Ghz n=25)
// for 442Mhz use the bellow and comment the above
//   unsigned long frequencia =  442000000UL ; // 442Mhz or 1.326 Ghz , tird harmonic

// I2C LCD virtual pinout
#define I2C_ADDR    0x27  // I2C Address for my LCD, found with I2C scanner
#define BACKLIGHT_PIN     3
#define En_pin  2
#define Rw_pin  1
#define Rs_pin  0
#define D4_pin  4
#define D5_pin  5
#define D6_pin  6
#define D7_pin  7
LiquidCrystal_I2C       lcd(I2C_ADDR, En_pin, Rw_pin, Rs_pin, D4_pin, D5_pin, D6_pin, D7_pin);

// buttons for up/down in frequency, puleed up from 5v with a 10K resistor, analog pin will be short to ground for button press
int button1 = 1;
int button2 = 2;


void setup()
{
  Serial.begin(9600) ;
  Serial.print("adf4351 VFO CT2GQV "); Serial.println(SWVERSION) ;

  pinMode(button1, INPUT);
  pinMode(button2, INPUT);

  lcd.begin (16, 2, LCD_5x8DOTS); lcd.setBacklightPin(BACKLIGHT_PIN, POSITIVE); lcd.setBacklight(HIGH); // 20x4 lines display LCD
  lcd.home();
  lcd.setCursor(0, 0);  lcd.print("Signal Generator  ");
  lcd.setCursor(0, 1);  lcd.print("Ver: "); lcd.print(SWVERSION);

  Wire.begin() ;
  /*!
     setup the chip (for a 10 mhz ref freq)
     most of these are defaults
  */
  vfo.pwrlevel = 3 ; // measured at 3.3Ghz after 1m cable >> "0" = -8 dBm / "1" =  -5.8dbm / "2" = -3.3dbm / "3" = -0.4dbm
  vfo.RD2refdouble = 0 ; ///< ref doubler off
  vfo.RD1Rdiv2 = 0 ;   ///< ref divider off
  vfo.ClkDiv = 150 ;
  vfo.BandSelClock = 80 ;
  vfo.RCounter = 1 ;  ///< R counter to 1 (no division)
  vfo.ChanStep = steps[2] ;  ///< set to 10 kHz steps

  /*!
     sets the reference frequency to 10 Mhz
  */
  if ( vfo.setrf(10000000UL) ==  0 )
    Serial.println("REF.SET: 10 Mhz") ;
  else
    Serial.println("ERROR: reference freq set error") ;
  /*!
     initialize the chip
  */
  vfo.init() ;

  /*!
     enable frequency output
  */
  vfo.enable() ;

  delay(1000);
  lcd.clear();

  if ( vfo.setf(frequencia) == 0 ) {
    Serial.print("VFO.SET:") ; Serial.println(vfo.cfreq) ;
    lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
    lcd.setCursor(0, 1);  lcd.print("F(3):"); lcd.print((frequencia/1000)*3);
  } else {
    Serial.println("ERROR: Set init Frequency") ;
  }

vfo.ChanStep = steps[4] ; ///< change to 100 kHz
}

void loop()
{
  int buttonState1 = analogRead(button1);
  int buttonState2 = analogRead(button2);
  // serial debug for the button for +/- frequency
  // Serial.print("B1,B2:"); Serial.print(buttonState1); Serial.print(",");  Serial.println(buttonState2);

// up frequency
  // button pin is puled down to ground...or close to it (100) as long as lower than 2049
  if (buttonState1 <= 100) {
    frequencia += vfo.ChanStep;
    if ( vfo.setf(frequencia) == 0 )
    {
      Serial.print ("VFO.SET: "); Serial.println(vfo.cfreq) ;
      lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
      lcd.setCursor(0, 1);  lcd.print("F(3):"); lcd.print((frequencia/1000)*3);
    }
  }
// end up frequency 

// down frequency
  if (buttonState2 <= 100) {
    frequencia -= vfo.ChanStep;
    if ( vfo.setf(frequencia) == 0 )
    {
      Serial.print ("VFO.SET: "); Serial.println(vfo.cfreq) ;
      lcd.setCursor(0, 0);  lcd.print("F   :"); lcd.print(frequencia/1000);
      lcd.setCursor(0, 1);  lcd.print("F(3):"); lcd.print((frequencia/1000)*3);
    }
  }
// end down frequency 

 
// button software debounce
  delay(150);
}
/// code end

Some other signal generators based on similar modules and also the ADF4355:
http://f6kbf.free.fr/html/ADF4351%20and%20Arduino_Fr_Gb.htm
https://pa0rwe.nl/?page_id=1345 (for the ADF4355)

 

Have a nice day!

Wednesday, January 27, 2021

EIP-371 Source Locking Microwave Counter repair


 I've done a previous repair on this device because I got it without being working on the 18Ghz range. I suspect this will not be the last one given it's age.

Anyhow, one of this days I turned it on to check the output frequency of a FVC99 module and it was displaying all entrance selector LED's on (should be one at a time) and no change on the input by pressing the band selector. Also there was no activity on the display for the source locking.

I suspect the usual bad contacts (it's slot based construction) or power supply, more to the power supply side since the equipment hadn't been moved (it's a bit sensitive on moving/vibrations and that had been the cause of the first repair).


 First thing I did was removing and inserting all the boards one by one trying to find the one responsible for the selector LED's, I have the manual but didn't feel like to read it. In the end, had no luck. Then I realized there's another board that does not slide, instead is attached to the side panel. So I moved that one to the side and checked all the connections. 


 Image, now, after connecting back, started working, I can now select the input and have the digits lit:

I can measure again but I'm preparing a home made counter in case this one fails again in the future.


Have a nice day!


Sunday, January 03, 2021

Return loss bridge

 Small project made last year (4 days ago) just for fun and to try out the SWR feature of the spectrum analyzer.

Design is based on this one to the exception of the ferrite material, I used 43 instead of 77.

RF source will be the tracking generator, load will be device under test and detector the spectrum analyzer RF input.

For the 50 Ohm resistors (R1,R2,R3) I used two leaded 100 Ohm in parallel, SMD and shorter leads between components would help more on the high frequency side of the spectrum.

Build:



 Some data taken:

With no load connected in one direction and then the opposite one (cable swap), if all is perfectly balanced it should show equal lines, in this case....almost there, in any case the return loss line is all but flat...


Now measuring a 50 Ohm load, ideally should give the lowest possible result and a flat line for all the frequency range:

At 1.6Mhz: 1.22, so not very usable at the low range, probably due to lack of inductance on the core.

At 10.8 Mhz, 1.05, much more inline with and expected result (very low VSWR).


At 152 Mhz looks like it starts to break the measurement again.


And forget it at 433 Mhz since it's too off.


The load used was a Narda 370 BNM, 5W and good to 18Ghz.

Basically it's very usable on the HF range or just as general curve tracer for antenna VSWR at VHF frequency ranges.

You can also take the same info without the SWR measurement option on the Spectrum Analyzer, just use the tracking generator, normalize in the open position (no device under testing connected) and then look for the SWR from the return loss measured, you can use this table or calculate it yourself.

 

Have a great Year!







Tuesday, December 29, 2020

LXI - Rigol DSA815 Spectrum Analyzer - remote control

 Following on the series for "GPIB" control of instruments, this post is about LXI control, in particular the Rigol DSA815-TG spectrum analyzer. It is more Linux oriented but commands can be ported to other systems.
Did this out of need since I could not find a single explanatory source of information for all the commands listed besides the programing guide and as all programing guides, they never have a simple; "how to to this"
Most of the command are using the "lxi" tool v1.21. You can use also the gui version "lxi-gui"

LXI is nothing more than LAN extensions for instrumentation control. Same end result as GPIB or Serial port control, that is, you have a system that controls and queries the instrument, only the medium is different on this case, it uses a more modern approach, the Ethernet/LAN.

Recently acquired a Rigol DSA815-TG 1.5Ghz spectrum analyzer and although at the moment I only use computer control for taking some screenshots would be interesting to know how to take more advantage of instrument remote control.

First thing you will need is connect your instrument via the LAN port to your local network, in my case I just connect it back to back to my laptop. Then you will need to set the IP via instrument panel, in my case I used a static IP in the same range as the Ethernet port of the laptop.

Laptop was configured with IP 192.168.1.65 / netmask 255.255.255.0 (/24 for the hard core one)

In case you don't know your instrument IP, case configured by DHCP for example, you can use the "lxi" tool discover command to "automatically" discover the instruments available on you local are network.

==
# lxi discover
Searching for LXI devices - please wait...
 
Broadcasting on interface lo
Broadcasting on interface enp9s0
  Found "Rigol Technologies,DSA815,DSA8A22XXXXXX,00.01.19.00.02" on address 192.168.1.81
Broadcasting on interface wlp12s0
 
Found 1 device
==

If you are more inclined to review some additional protocol specifications,you can find it here.
A simple wireshark capture allows to have an idea of the inner workings of the discovery process.

 


 

At this stage you can query the instrument with the classic "*IDN?" command:
 

==
#  lxi scpi --address 192.168.1.81 "*IDN?"
A: Rigol Technologies,DSA815,DSA8A22XXXXXX,00.01.19.00.02
==
Note: I replaced part of the instrument identifier string with X's.

 

You can also use a normal "telnet" to port 5555 and make de same query:
==
# telnet 192.168.1.81 5555
Trying 192.168.1.81...
Connected to 192.168.1.81.
Escape character is '^]'.
*IDN?
Rigol Technologies,DSA815,DSA8A22XXXXX,00.01.19.00.02
==

Now let's take some data from the instrument, a screenshot for a start, using the lxi tool screenshot option:

==
 # lxi screenshot --address 192.168.1.81 trace.bmp
==

Result is is "trace.bmp file saved on the current working directory:


The screenshot will literary take a screenshot of what's visible on the screen be it a trace or a configuration screen.

Even more complicated screenshot for the command line die hard's:
==
# echo ":PRIV:SNAP? BMP" | nc -w 5 192.168.1.81 5555 | dd bs=1 skip=11 of=screen.bmp
==

Continuing with some other commands...

Display brightness query:

==
# lxi scpi --address 192.168.1.81 "DISP:BRIG?"
==
Note: answer with be a numeric value of the the setting, in my case is "1"

If you need to change to "2" the screen brightness:
==
# lxi scpi --address 192.168.1.81 "DISPlay:BRIGhtness 2"
==


Turning the tracking generator/TG on:

==
# lxi scpi --address 192.168.1.81 "OUTP:STATE 1"
==

Querying the tracking generator/TG status:
==
# lxi scpi --address 192.168.1.81 "OUTP:STATE?"
==
Output will be 1 or 0 if ON or OFF.


Setting and querying the start frequency:

==
# lxi scpi --address 192.168.1.81 "FREQ:START 124Mhz"
==
Query:
==
# lxi scpi --address 192.168.1.81 "FREQ:START?"
==
Note: it will answer the previous set frequency: "124000000"

For stop frequency should be "FREQuency:STOP", bellow for a 450Mhz stop frequency
==
# lxi scpi --address 192.168.1.81 "FREQ:STOP 450Mhz"
==
The result will be like this on the spectrum analyzer:


 Now we need to take/download traces: this for me is the most interesting part since we can take the traces and then compute over the results, for instance in SWR (when trial license expires ) or 3db bandwidth for example.


Download data of trace 1
==
# lxi scpi --address 192.168.1.81 ":TRACe:DATA? TRACe1"
==
Output, (shortened version) will be similar to this:
#9000009014 -2.017071e+01, -5.862679e+01, -6.025334e+01, -6.129734e+01, -6.015621e+01, -6.299181e+01, -5.941000e+01, -6.174416e+01, -5.768233e+01, -6.222626e+01, -6.008302e+01, -6.109689e+01, -6.196978e+01, -6.302518e+01, -6.228621e+01, -6.230527e+01, -6.312371e+01, -6.304392e+01, -6.187805e+01, -6.133699e+01, -6.096120e+01, -5.720531e+01, -5.873640e+01, -6.165216e+01, -5.796873e+01, -5.905419e+01, -5.763849e+01, -6.094759e+01, -6.073965e+01,..

You can "pipe" the command to file this way:
==
# lxi scpi --address 192.168.1.81 ":TRACe:DATA? TRACe1" > trace1.csv
==
Open "trace1.csv" on a spreadsheet software and plot a graph:


To download trace 3 for example:
==
# lxi scpi --address 192.168.1.81 ":TRACe:DATA? TRACe3"
==
If nothing is set for that trace the output will look like this:
#9000009014 -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02, -4.000000e+02,...(continues)


As last command on this series, let's query the instrument language:
==
 # lxi scpi --address 192.168.1.81 "SYST:LANG?"
==
Output is on my case: "ENGl"

==========

- In the future will try to add more commands in this document and write some scripts for automation, maybe even a GUI program. 

- If you copy past the command in this post, don't forget to set your instrument IP instead of the one I used (192.168.1.81)

- Rigol DSA800 programing guide can be downloaded at: https://www.batronix.com/files/Rigol/Spektrum-Analysatoren/DSA800/DSA800_ProgrammingGuide_EN.pdf

Hope this helps someone,

Have a nice day!