EasyManua.ls Logo

Keysight N9041B - Page 2619

Keysight N9041B
2852 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 Save/Recall/Print
7.3 Save
'Ref Level'|':DISPlay:WINDow:TRACe:Y:SCALe:RLEVel 5']
def ConnecToInstrument():
rm = pyvisa.ResourceManager()
_inst = rm.open_resource(_connectionString)
_inst.read_termination = '\n'
_inst.write_termination = '\n'
idn = _inst.query('IDN?')
print("Sending Recording Entries to: " + idn)
def CheckError()
err = _inst.query('SYST:ERR?')
return err.lower.find("no error")
def SendCommand(recordingEntry):
# split the recording entry into label and mnemonic
labelAndMnemonic = recordingEntry.split('|')
label = labelAndMnemonic[0]
mnemonic = labelAndMnemonic[1]
# check and see if this is OPC query
opcIndex = mnemonic.find('OPC?')
#if OPC query send the query and get OPC query value
if opcIndex >= 0:
opcQueryValue = _inst.query(mnemonic)
print(opcQueryValue)
else:
print(mnemonic)
_inst.write(mnemonic)
err = CheckError()
# publish any errors from the previous command
if err:
print('Error for command ' + label + ': ' + err)
for entry in _recordingEntries
2619 Spectrum Analyzer Mode User's &Programmer's Reference

Table of Contents

Other manuals for Keysight N9041B

Related product manuals