This commit is contained in:
@@ -8,17 +8,21 @@ import ch.psi.pshell.crlogic.CrlogicPositioner as CrlogicPositioner
|
||||
import ch.psi.pshell.crlogic.CrlogicSensor as CrlogicSensor
|
||||
|
||||
|
||||
def on_command_started(info):
|
||||
print "Started: " + str(info.script) + str(info.error)
|
||||
|
||||
def on_command_finished(info):
|
||||
print "Finished: " + str(info.script) + str(info.error)
|
||||
###################################################################################################
|
||||
# Layout setup
|
||||
###################################################################################################
|
||||
import ch.psi.pshell.data.LayoutSF as LayoutSF
|
||||
|
||||
LayoutSF.setExperimentArguments([pv, motor, pe, cv, en, sin])
|
||||
LayoutSF.setExperimentArguments([pv, motor, pe, cv, energy, sin])
|
||||
|
||||
|
||||
|
||||
#Libraries
|
||||
#Librariesenergy
|
||||
#import Jama.Matrix
|
||||
#sys.path.append('/Users/gobbo_a/dev/pshell/config/home/script/Lib/diffcalc')
|
||||
|
||||
@@ -136,14 +140,14 @@ get_context().addListener(clistener)
|
||||
def trig_scienta():
|
||||
time.sleep(1.0)
|
||||
|
||||
energy = None
|
||||
en_val = None
|
||||
class SimulatedEnergy(Writable):
|
||||
def write(self, value):
|
||||
self.put(value)
|
||||
|
||||
def put(self, value, timeout = None):
|
||||
global energy
|
||||
energy = value
|
||||
global en_val
|
||||
en_val = value
|
||||
|
||||
def close(self):
|
||||
pass
|
||||
@@ -155,8 +159,8 @@ class SimulatedEnergy(Writable):
|
||||
|
||||
class SimulatedEnergyReadback(Readable):
|
||||
def read(self):
|
||||
global energy
|
||||
return energy;
|
||||
global en_val
|
||||
return en_val;
|
||||
|
||||
def get(self):
|
||||
return self.read()
|
||||
|
||||
Reference in New Issue
Block a user