EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: PeDre on April 24, 2021, 02:56:52 pm

Title: R&S RTB2004 Settings via SCPI?
Post by: PeDre on April 24, 2021, 02:56:52 pm
I want to download the current settings from the oscilloscope via SCPI command. So do not save on the oscilloscope.

With the SCPI command ":SYSTem:SET <Setup>" I can download data. But uploading this data again does not work.

   :SYST:SET #44818<data...>
   :SYST:SET #9000004818<data...>
   -161,"Invalid block data"

If you specify more bytes in the block format than are available, there is no error. But the settings are not applied.

   :SYST:SET #44819<data...>
   0,"No error"

If you specify less bytes in the block format than are available, there is an error again.

   :SYST:SET #44817<data...>
   -101,"Invalid character"

With the SCPI command ":MMEM:DATA? <file>" I can download a saved settings file. But when uploading again, the file is shown as corrupted when trying to load these settings.

   Error loading file: /INT/SETTINGS/TEST.SET
   (-28)! Corrupted Data

Downloading the file again shows that the data is the same size, but the content is different. There are many zero bytes.

I am sure to receive and send the data correctly. I have no problems with the SCPI commands with other data.

With the internet browser you can download the current setting and also upload it again. This works and you don't have to save anything on the oscilloscope.

From a downloaded settings file I can extract the SCPI commands for the settings. Sending the commands works and the settings are applied.

I have not found an easy way. Does anyone have an idea?

Peter
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: tv84 on April 24, 2021, 03:38:38 pm
Have you tried something like this?

:SYST:SET #9000000512\14\BB\B2\5D\E0\EC\87\1F\D6\9D\FC\38... \n
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: PeDre on April 24, 2021, 04:19:28 pm
Hello tv84,

no, I have not. This is not a valid format according to the standard.

But I have now looked in the "SCPI 1999 Command Reference" to :SYST:SET. And there the command "*LRN?" is mentioned. With this I get the SCPI commands for the settings.

Edit:
However, the commands do not work as well as the normally saved settings. Not all parameters are taken over, such as protocol decoder source, position on the display, etc.

Edit2:
The commands are the same as in the downloaded settings file with the Internet browser. These commands also do not apply all settings.

Peter
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: tv84 on April 24, 2021, 04:50:20 pm
Peter,

But the problem is submitting contents, not retrieving.

BTW, please attach the "*LRN?" output.
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: PeDre on April 24, 2021, 05:12:47 pm
Hello tv84,

attached is the output of *LRN? from my settings. I have only replaced the semicolon between the commands with a newline.

Peter
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: PeDre on April 24, 2021, 05:33:19 pm
Hello tv84,

I have also tested your suggestion, but it does not work. It gives the error message again with ":SYST:ERR:ALL?":

   -161,"Invalid block data"

Peter
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: YetAnotherTechie on April 24, 2021, 09:33:41 pm
Have you tried to send only a subset of parameters? Maybe there's a specific point were it fails....
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: PeDre on April 25, 2021, 06:05:52 am
I have now used the USB connection and the ":SYST:SET" command works without problems. Now I have to find out where the error is in the LAN connection.

Peter
Title: Re: R&S RTB2004 Settings via SCPI?
Post by: PeDre on April 25, 2021, 09:08:03 am
It was of course an error in my program, how could it be otherwise.
The error occurred only with more than 2 KB of data. I omitted more and more data when calculating the pointer for the next data.

Peter