EasyManua.ls Logo

Keysight N9020B - Page 2299

Keysight N9020B
2530 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
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
SendCommand(entry)
Short Range Comms & IoT Mode User's &Programmer's Reference 2299

Table of Contents

Other manuals for Keysight N9020B

Related product manuals