def jav_openvisa(self, sVISAStr, fily=''): """ TCPIP0::<IP_Address>::inst0::INSTR TCPIP0::<IP_Address>::hislip0::INSTR TCPIP0::<IP_Address>::5025::SOCKET GPIB::<Addr>::INSTR ASRL1::INSTR """ TMR = timer() TMR.start() rm = pyvisa.ResourceManager(self.VISA) #Create Resource Manager TMR.tick() #rmList = rm.list_resources() #List VISA Resources try: # self.K2 = rm.open_resource(sVISAStr, open_timeout=100) #Create Visa Obj self.K2 = rm.open_resource(sVISAStr) #Create Visa Obj self.K2.timeout = 5000 #Timeout, millisec # self.K2.write_termination = self.EOL # self.K2.read_termination = self.EOL self.jav_IDN() self.jav_fileout(fily, self.dataIDN) self.jav_ClrErr() except: if self.debug: print ('jav_OpnErr: ' + sVISAStr) self.K2 = 'NoVISA' TMR.tick() asdf = TMR.Get_Params_Time() return self
def open(self, resourceID, param=0): #pylint: disable=unused-argument """ Open VISA object w/ VISA String. Examples: TCPIP0::<IP_Address>::inst0::INSTR TCPIP0::<IP_Address>::hislip0::INSTR TCPIP0::<IP_Address>::5025::SOCKET GPIB::<Addr>::INSTR ASRL1::INSTR """ TMR = timer() TMR.start() self.rm = pyvisa.ResourceManager(self.VISA) # Create Resource Manager self.ResID = resourceID TMR.tick() try: # self.K2 = rm.open_resource(resourceID, open_timeout=100) # Create Visa Obj self.K2 = self.rm.open_resource(self.ResID) # Create Visa Obj self.K2.timeout = 5000 # Timeout, millisec self.K2.write_termination = self.EOL self.K2.read_termination = self.EOL except: logging.info(f'jaV_OpnErr: {self.ResID}') self.K2 = 'NoVISA' TMR.tick() asdf = TMR.Get_Params_Time() return self
FSW_IP = '192.168.1.109' UserDir = '2020.07.30-Autolevel' freqArry = [28e9] pwrArry = range(-50,10,2) #Power Array comment = '-Autolevel' ############################################################################### ### Overhead ############################################################################### from rssd.VSG.NR5G_K144 import VSG from rssd.VSA.NR5G_K144 import VSA from rssd.FileIO import FileIO from rssd.RSI.time import timer OFile = FileIO().makeFile(__file__) TMR = timer() SMW = VSG().jav_Open(SMW_IP,OFile) #Create SMW Object SMW.debug = 0 FSW = VSA().jav_Open(FSW_IP,OFile) #Create FSW Object FSW.debug = 0 class dataClass(): def __init__(self): # self.Direction = 'UL' # self.CellID = 1 # # self.FreqRng = 'HIGH' # self.ChBW = 100 # self.TF = 'ON' # self.SubSp = 120 # self.RB = 60 # self.RBO = 0
def setUp(self): #Run before each test self.TMR = timer()