Question
How can I generate, transfer and process an arbitrary waveform file for the HMF2550 using remote control?
I found no command to load a wave form file from the USB stick.
How can I generate, transfer and process an arbitrary waveform file for the HMF2550 using remote control?
I found no command to load a wave form file from the USB stick.
Using a wave form file from a USB stick is only possible from the front panel. There is no remote command available for these steps. However it is possible to generate and run individual ARB files using the remote control interface.
As it is the base for this operating mode, we start with the generation of the ARB waveform file. It is mandatory to have the file in binary format. In the SCPI Programers Manual we can find the following description:
In our case we use LabVIEW to demonstrate the data preparation. Please find the VI sample and also the binary file in the attachment:
It generates the necessary ARB information combining different wave forms to a dedicated binary file.
This waveform displays one period, so e.g. a frequency of 3kHz plays this file 3000 times in a second.
After the file is prepared we can directly start programming. Our example is written in R&S Forum, a free Python based interpreter available on the Rohde & Schwarz homepage. It Shows all the steps from file transfer tot he final generation oft he signal.
As it is using SCPI commands a programer can easily transcribe it to any other language.
***
# The import files must be available in the same folder as the current script
import VisaDeviceExtended
reload (VisaDeviceExtended)
# Just knock on the door, if instrument is present
idnResponse = HMF2550.query ('*IDN?')
print 'Hello, I am ' + idnResponse
# Reset the unit, wait to be finished and clear status byte,
# request for errors (should be empty)
HMF2550.write ("*RST")
time.sleep (1)
HMF2550.write ("*CLS")
HMF2550.ask ("SYST:ERR?")
# Send the ARB file from PC to the instrument and request for errors
# In Python always take care for the control characters, so that path names won't be
# recognized in the wrong way (see "r"); "True" must be set at the end specially
# for these HMx devices (is "False" as default)
HMF2550.ext_send_pc_file_data_to_instrument (r"DATA ", r"c:\temp\_lv_arb_file.bin", True)
HMF2550.ask ("SYST:ERR?")
# Set all the imprtant parameters for ARB
HMF2550.write ('FREQ 3000') # Frequency to 3kHz
HMF2550.ask ("SYST:ERR?")
HMF2550.write ('VOLT:UNIT VOLT') # Set amplitude unit (can also be DBM)
HMF2550.ask ("SYST:ERR?")
HMF2550.write ('VOLT 2') # Set amplitude to 2 volts
HMF2550.ask ("SYST:ERR?")
HMF2550.write ('FUNC:ARB RAM') # Specify the ARB mode
HMF2550.ask ("SYST:ERR?")
HMF2550.write ("FUNC ARB") # Activate the ARB mode
HMF2550.ask ("SYST:ERR?")
HMF2550.write ("OUTP ON") # Switch on the output - the sognal now should be present
HMF2550.ask ("SYST:ERR?")
print "ready"
***
Finally it will give you the following display on your HMF2550:
On the scope the following wave form will be displayed: