def writeToODB(self): #On/Off writeOK=pyodbedit.write(f"{odbbase}Power",bool2yn(self.OnOff.get())) if writeOK!='': print('Error in writeToODB. writeOK=',writeOK) #PulseFreq writeOK=pyodbedit.write(f"{odbbase}PulseFreq(MHz)",f'{self.FreqBar.w1.get():.4f}') if writeOK!='': print('Error in writeToODB. writeOK=',writeOK) #BurstFreq writeOK=pyodbedit.write(f"{odbbase}BurstFreq(Hz)",f'{self.BurstBar.w1.get():.4f}') if writeOK!='': print('Error in writeToODB. writeOK=',writeOK) #PowerControl writeOK=pyodbedit.write(f"{odbbase}PowerControl",f'{self.RBar.w1.get():.4f}') if writeOK!='': print('Error in writeToODB. writeOK=',writeOK)
def laser_off(self): ArduinoSerial.write(str.encode('OFF\n')) # set Arduino output pin 13 low self.lbl_laser.config(bg='cornsilk2', fg='black') self.laser_status.set('Laser is OFF') self.OnOff.set(False) ### Update to ODB if self.LocalControl.get(): #On/Off writeOK=pyodbedit.write(f"{odbbase}Power",bool2yn(self.OnOff.get())) if writeOK!='': print('Error in writeToODB. writeOK=',writeOK)
def laser_on(self): #ArduinoSerial.reset_input_buffer() ArduinoSerial.write(str.encode('ON\n')) # set Arduino output pin 13 high #print('receiving from serial:'+line) self.laser_status.set('Laser is ON') self.lbl_laser.config(bg='OrangeRed2', fg='white') self.OnOff.set(True) ### Update to ODB if self.LocalControl.get(): #On/Off writeOK=pyodbedit.write(f"{odbbase}Power",bool2yn(self.OnOff.get())) if writeOK!='': print('Error in writeToODB. writeOK=',writeOK)
def writeToODB(self): #PowerControl writeOK=pyodbedit.write(f"{odbbase}PowerControl",f'{self.w1.get():.4f}') if writeOK!='': print('Error in writeToODB. writeOK=',writeOK)
def writeToODB(self): #BurstFreq writeOK=pyodbedit.write(f"{odbbase}BurstFreq(Hz)",f'{self.w1.get():.4f}') if writeOK!='': print('Error in writeToODB. writeOK=',writeOK)