def btn5(): ### Write SCPI ### windowLowerWrite("--> " + Entry2.get()) K2 = jaVisa() K2.jav_Open(Entry1.get()) K2.write(Entry2.get()) K2.jav_Close()
def btn1(): ### Scan VISA ### windowLowerWrite("[Resource List]") K2 = jaVisa() InstrList = K2.jav_reslist() for i in InstrList: windowLowerWrite(" " + i) K2.jav_Close()
def btn4(): ### Query SCPI String ### windowLowerWrite("--> " + Entry2.get()) K2 = jaVisa() K2.jav_Open(Entry1.get()) readStr = K2.query(Entry2.get()) windowLowerWrite("<-- " + readStr) K2.jav_Close()
def btn3(): ### *IDN Query ### windowLowerWrite("--> *IDN?") K2 = jaVisa() K2.jav_Open(Entry1.get()) readStr = K2.query("*IDN?") windowLowerWrite("<-- " + readStr) K2.jav_Close()
def btn2(): ### Send SCPIList in TopWindow ### windowLowerWrite("[SCPI LIST]") K2 = jaVisa() K2.jav_Open(Entry1.get()) SCPIList = list(lstTopWind.get(0, END)) OutList = K2.jav_scpilist(SCPIList) try: windowLowerWrite(' Err:' + ''.join(K2.jav_Close())) except: pass for Ostr in OutList: windowLowerWrite(" " + Ostr)
def btn2(): """Send SCPIList in TopWindow""" windowLowerWrite("[SCPI LIST]") K2 = jaVisa() K2.jav_Open(Entry1.get()) SCPIList = lstTopWind.get("1.0", END).split('\n') OutList = K2.jav_scpilist(SCPIList) try: windowLowerWrite(' Err:' + ''.join(K2.jav_Close())) except: pass for Ostr in OutList: windowLowerWrite(" " + Ostr)