FAQs from Rohde & Schwarz

HMC8012 Remote Controlled Logging and save the log file to the local PC

Description

Can you please provide an example how to
- Activate Remote Controlled Logging and
- Transfer the log file to my local PC
using the HMC8012?

I tried several ways completing the task with a Python script. Unfortunately at least I fail in transferring the log file to my PC when requesting "DATA:DATA?".
As the case may be it throws different errors:
- "Timeout", but I just received the first line of the file.
- "Query interrupted" when requesting "SYST:ERR?" after the "DATA:DATA?" command

What is wrong with my Script?

Resolution

In the attachment of this FAQ you can find a Python Script written with R&S Forum (using PyVISA).
It describes the necessary commands and settings for the logging features as well as how to transfer the CSV file to your PC.

As the DATA:DATA? function is not working in binary format, the CSV file must be read line by line.
Each line of the CSV file contains a Line Feed ("\n" / CHR$10 / h0A / 0x0A) at the end. This is the same character we use for command / response line termination.
So a standard request will see the end of transmission also if the buffer still contains data.

The only way to get all the data is to read all line by line including the header until the end of the CSV file.
The request for "DATA:POINts?" will give an information about the number of data lines to be transferred.

Name
Type
Version
Date
Size
HMC8012_Logging_Voltage_and_save_to PC.i3e
Type
FAQ
Version
Date
17-Dec-2020
Size
5 kB