def xmgrace(): # Send the data to Xmgrace global data p.grace(data, _('milliSeconds'), _('Volts')) def quit(): sys.exit() p = eyes.open() p.set_sqr1(0) root = Tk() Canvas(root, width = WIDTH, height = 5).pack(side=TOP) # Some space at the top g = eyeplot.graph(root, width=WIDTH, height=HEIGHT) # make plot objects using draw.disp g.setWorld(0,-5, NP * delay * 0.001, 5,_('mS'),_('V')) if p == None: g.text(0, 0,_('EYES Hardware Not Found. Check Connections and restart the program'),1) root.mainloop() sys.exit() cf = Frame(root, width = WIDTH, height = 10) cf.pack(side=TOP, fill = BOTH, expand = 1) l = Label(cf,text='NS =') l.pack(side=LEFT, anchor=SW) Nsam = Entry(cf,width = 4, bg = 'white') Nsam.pack(side=LEFT, anchor = SW)
Calc2.config(text=_('Wrong Input'), fg='red') #=============================== main program starts here =================================== p = eyes.open() if p == None: sys.exit() p.set_sine(AWGval) p.select_range('A1', 4) p.select_range('A2', 4) p.configure_trigger(0, 'A1', 0.0) root = Tk() f = Frame(root) f.pack(side=LEFT) g = eyeplot.graph(f, width=WIDTH, height=HEIGHT) # make plot objects using draw.disp g.setWorld(0, -5, 20, 5, _('mS'), _('V')) f1 = Frame(f) f1.pack(side=TOP, fill=BOTH, expand=1) Label(f1, text=_('Frequency')).pack(side=LEFT) Wfreq = Entry(f1, width=5) Wfreq.pack(side=LEFT) Wfreq.bind("<Return>", set_frequency) Wfreq.delete(0, END) Wfreq.insert(0, str(AWGval)) Label(f1, text=_('Hz ')).pack(side=LEFT) Label(f1, text=_('Timebase')).pack(side=LEFT,