#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from labinstruments.rohdeschwarz import RohdeSchwarzFSVA40

# # Parameters
# fcenter_mhz = 100
# fspan_mhz = 200
# rbw_khz = 100
# vbw_khz = rbw_khz / 30

# Connect to instrument
speca = RohdeSchwarzFSVA40("192.168.1.40")
print("\n" + speca.get_id())
speca.reset()

# # Frequency range
# speca.set_center_frequency(fcenter_mhz, 'mhz')
# speca.set_span(fspan_mhz, 'mhz')

# # Resolution / video bandwidth
# speca.set_rbw_auto("off")
# speca.set_rbw(rbw_khz, 'khz')
# speca.set_vbw_auto("off")
# speca.set_vbw(vbw_khz, 'khz')

# External mixer
speca.set_external_mixer_band("F")
speca.set_external_mixer_signal_detection("AUTO")
