flowtext.value = input_box.get() if ChkUsrInputX.chkUsrNum(flowtext.value): #s.write(flow.SetPoint_Write(flowtext.value)) print("Worked") else: # Error message warn("Oops", "Not a Valid Number.") file_op = [["File", file_Exit], ["file2", get_Text]] edit_op = [["log window", log_window], ["edit2", get_Text]] app = App(title="Mass Flow Control") menuebar = MenuBar(app, ["File", "Edit"], [file_op, edit_op]) box = Box(app) box.bg = "red" box.height = 200 box.repeat(1000, counter) #logbox.repeat(1000,log_data ) #box.tk.configure(height =200, width = 200, background = "blue") #for child in box.tk.winfo_children(): # child.configure(background="blue") text1 = Text(box, text="Hello box") #text1.tk.configure(background="blue") Message = Text(app, text="Sierra Instruments Micro Trak 101") text = Text(app) button = PushButton(app, text="Enter", command=get_Text) #mywindow = Window(app, title = "Flow") mytext = Text(app, text="The SetPoint is ") flowtext = Text(app) Cmd = Text(app)
slider.height = 30 button = PushButton(app) button.width = 20 button.height = 2 pic = Picture(app, image="guizero.gif") pic.width = 400 pic.height = 50 combo = Combo(app, ["martin", "laura", "rik"]) combo.width = 50 combo.height = 2 check = CheckBox(app, "tick me") check.width = 17 check.height = 2 button_group = ButtonGroup(app, ["cheese", "onion", "crisps"], 1) button_group.width = 35 button_group.height = 9 button_group.bg = "darkgrey" box = Box(app) box.width = 100 box.height = 100 box.bg = "red" app.display()
menubar = MenuBar(app, toplevel=["Set Config", "Request State", "View Config"], options=[[["Erase Configuration", eraseConfig], ["Initialise for HAL", initHal], ["Initialise for Encoder", initStandard], ["Initialise for Sensorless", initSensorless]], [["Full", fullCal], ["Motor", motorCal], ["Closed", closedLoop], ["Sensorless", sensorless], ["Encoder", encoder], ["Index", index]], [["Axis0", axis0Config], ["Axis1", axis1Config]]]) y = 0 box = Box(app, grid=[0, y]) box.width = 10 box.height = 50 y = y + 1 text = Text(app, text="current_lim", grid=[0, y]) textbox3 = TextBox(app, text=odrv0.axis0.motor.config.current_lim, grid=[1, y]) y = y + 1 #text = Text(app, text="d_axis_current (<-70.0)", grid=[0,y]) #textbox0 = TextBox(app, text = odrv0.axis0.motor.config.d_axis_current, grid=[1,y]) y = y + 1 text = Text(app, text="vel_gain", grid=[0, y]) textbox1 = TextBox(app, text=odrv0.axis0.controller.config.vel_gain, grid=[1, y])