Changeset 643
- Timestamp:
- Oct 4, 2011 5:24:14 PM (12 years ago)
- Location:
- moxy/trunk/src/moxy
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
moxy/trunk/src/moxy/examples/simple-test.xml
r642 r643 1 1 <?xml version="1.0" ?> 2 <moxy date="2011-10-04" time=" 01:23:16" version="1.0">2 <moxy date="2011-10-04" time="17:17:17" version="1.0"> 3 3 <XYpair name="a1y & a2y test motors" selected="True"> 4 4 <EPICS_configuration> … … 17 17 <row name="0.2 mm below" x="-0.01997" y="24.98001"/> 18 18 <row name="my starting position" x="1.1" y="2.2"/> 19 <row name="small change up" x="2" y="3"/> 20 <row name="small change down" x="0.5" y="0.5"/> 21 <row name="zero" x="0" y="0"/> 19 22 </tab> 20 23 </XYpair> -
moxy/trunk/src/moxy/index.html
r631 r643 24 24 <h2>A GUI tool for EPICS</h2> 25 25 <br/><b>author: Pete R. Jemian (jemian@anl.gov)</b> 26 <br/><b>version: 0. 5</b>26 <br/><b>version: 0.6</b> 27 27 </td> 28 28 <td valign="top"><img -
moxy/trunk/src/moxy/moxy_axis.py
r642 r643 28 28 import copy 29 29 import time 30 import threading 30 31 31 32 … … 33 34 34 35 35 class Axis :36 class Axis(threading.Thread): 36 37 ''' 37 EPICS PVs and connections for one axis 38 EPICS PVs and connections for one axis. 39 Run the EPICS PV monitors in a separate thread so the GUI can be updated. 38 40 39 41 Example use:: … … 52 54 def __init__(self): 53 55 '''declare initial storage''' 56 threading.Thread.__init__(self) 54 57 self.db = {} # internal data 55 58 self.pvname = {} # actual PV name for each field -
moxy/trunk/src/moxy/pair.py
r642 r643 11 11 #************************************************************************* 12 12 13 '''14 Define the GUI elements and interface for one X,Y pair15 16 @version:17 13 ########### SVN repository information ################### 18 14 # $Date$ … … 22 18 # $Id$ 23 19 ########### SVN repository information ################### 20 21 ''' 22 Define the GUI elements and interface for one X,Y pair 24 23 ''' 25 24 … … 348 347 def SetEpicsConfig(self, config): 349 348 '''define the EPICS PVs from a configuration 350 @param config: Python dictionary with axes configurations''' 349 350 :param dict config: Python dictionary with axes configurations 351 ''' 351 352 for axis in ['x', 'y']: 352 353 self.epics[axis].SetConfigure(copy.deepcopy(config[axis])) … … 358 359 field = kw['field'] 359 360 value = kw['value'] 360 print "onChangePositions", axis, field, value361 #print "onChangePositions", axis, field, value 361 362 if 'precision' in kw: 362 363 # what about display precision? … … 370 371 else: 371 372 str_value = str(value) 372 # TODO: either callbacks or widget updates should be in a different thread373 373 self.widget[axis][field].SetLabel(str_value) 374 374 self.Layout() … … 380 380 field = kw['field'] 381 381 value = kw['value'] 382 print "onChangePositions", axis, field, value382 #print "onChangeTitle", axis, field, value 383 383 self.titles[axis][field] = value 384 384 title = "%s, %s" % (self.titles[axis]['DESC'], self.titles[axis]['EGU']) 385 # TODO: either callbacks or widget updates should be in a different thread386 385 self.widget[axis]['title'].SetLabel(title) 387 386 … … 392 391 axis = kw['axis'] 393 392 value = kw['value'] 394 # TODO: either callbacks or widget updates should be in a different thread395 393 self.SetMotorColor(axis, value == 1) 396 394 … … 410 408 if not item.Connect(**redirects): 411 409 raise RuntimeError, "Did not connect %s axis" % axis 410 # TODO: initial RBV connection does not generate a monitor, fake it here somehow 412 411 413 412 def ReleaseEpics(self):
Note: See TracChangeset
for help on using the changeset viewer.