FAQs from Rohde & Schwarz

HM8118 remote control hints

Question

The remote control of the HM8118 has proven to be difficult

how can a reliable connection be established?

Answer

The little example uses a termination and the OPC? for establish the connection
(this little program was tested in FORUM
https://www.rohde-schwarz.com/applications/using-r-s-forum-application-for-instrument-remote-control-application-note_56280-50946.html

HM8118.instrument.write_termination = '\n\r'
HM8118.instrument.read_termination = '\n\r'

# perform a reset on the device and wait 5 seconds for completion
HM8118.write ("*RST")
time.sleep (5)
# just knock on the door to see if instrument is present
idnResponse = HM8118.query ('*IDN?')
print idnResponse
print 'Hello, I am ' + idnResponse
#
HM8118.write ('FREQ20')
HM8118.query ('FREQ?')
HM8118.query ('*OPC?')
HM8118.query ('XMAJ?')
HM8118.query ('*OPC?')