This commit is contained in:
2018-04-17 12:05:48 +02:00
parent 14edc0e745
commit 58a1260003
428 changed files with 41350 additions and 477 deletions

42
script/import/import.py Executable file
View File

@@ -0,0 +1,42 @@
#Script imported from: test1.xml
#Variables
var1 = 0.0
#TODO: Set the diplay names of positioners and detectors
scan = ManualScan(['id278043'], ['id348623', 'id367393'] , [0.0], [31.0], [31])
scan.start()
#Creating channels: dimension 1
#LinearPositioner id278043
id278043 = Channel('TESTIOC:TESTCALCOUT:Input', type = 'd')
#ScalarDetector id348623
id348623 = Channel('TESTIOC:TESTCALCOUT:Output', type = 'd')
#ScalarDetector id367393
id367393 = Channel('TESTIOC:TESTSINUS:SinCalc', type = 'd')
#Dimension 1
#LinearPositioner id278043
for setpoint1 in frange(0.0, 31.0, 1.0, True):
if setpoint1 > 31.0 or setpoint1 < 0.0:
break
id278043.put(setpoint1, timeout=None) # TODO: Set appropriate timeout
readback1 = id278043.get()
if abs(readback1 - setpoint1) > 0.5 : # TODO: Check accuracy
raise Exception('Actor id278043 could not be set to the value ' + str(setpoint1))
#Dimension Actions
#Script action
#TODO: Move, if needed, this import to the file header: import time
time.sleep(0.1)
#Detector id348623
detector1 = id348623.get()
#Detector id367393
detector2 = id367393.get()
scan.append ([setpoint1], [readback1], [detector1, detector2])
#Closing channels
id278043.close()
id348623.close()
id367393.close()
scan.end()

55
script/import/import2.py Executable file
View File

@@ -0,0 +1,55 @@
#Script imported from: test2.xml
#Variables
var1 = 0.0
#TODO: Set the diplay names of positioners and detectors
scan = ManualScan(['id643271', 'id278043'], ['id348623', 'id367393'] , [0.0, 0.0], [5.0, 31.0], [5, 31])
scan.start()
#Creating channels: dimension 1
#LinearPositioner id643271
id643271 = Channel('TESTIOC:TESTCALC:MyCalc', type = 'd')
#Creating channels: dimension 2
#LinearPositioner id278043
id278043 = Channel('TESTIOC:TESTCALCOUT:Input', type = 'd')
#ScalarDetector id348623
id348623 = Channel('TESTIOC:TESTCALCOUT:Output', type = 'd')
#ScalarDetector id367393
id367393 = Channel('TESTIOC:TESTSINUS:SinCalc', type = 'd')
#Dimension 1
#LinearPositioner id643271
for setpoint1 in frange(0.0, 5.0, 1.0, True):
if setpoint1 > 5.0 or setpoint1 < 0.0:
break
id643271.put(setpoint1, timeout=None) # TODO: Set appropriate timeout
readback1 = id643271.get()
if abs(readback1 - setpoint1) > 0.5 : # TODO: Check accuracy
raise Exception('Actor id643271 could not be set to the value ' + str(setpoint1))
#Dimension 2
#LinearPositioner id278043
for setpoint2 in frange(0.0, 31.0, 1.0, True):
if setpoint2 > 31.0 or setpoint2 < 0.0:
break
id278043.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
readback2 = id278043.get()
if abs(readback2 - setpoint2) > 0.5 : # TODO: Check accuracy
raise Exception('Actor id278043 could not be set to the value ' + str(setpoint2))
#Dimension Actions
#Script action
#TODO: Move, if needed, this import to the file header: import time
time.sleep(0.01)
#Detector id348623
detector1 = id348623.get()
#Detector id367393
detector2 = id367393.get()
scan.append ([setpoint1, setpoint2], [readback1, readback2], [detector1, detector2])
#Closing channels
id278043.close()
id348623.close()
id367393.close()
id643271.close()
scan.end()

31
script/import/import5.py Executable file
View File

@@ -0,0 +1,31 @@
#Script imported from: test5.xml
set_exec_pars(flush=False)
#set_preference(Preference.PLOT_DISABLED,True)
set_preference(Preference.TABLE_DISABLED,True)
#TODO: Set the diplay names of positioners and detectors
scan = ManualScan(['id236750', 'id226053'], ['id246209'] , [0.0, 0.0], [1000.0, 1000.0], [1000, 1000])
scan.start()
#Creating channels: dimension 1
#PseudoPositioner id236750
#Timestamp id246209
#Creating channels: dimension 2
#PseudoPositioner id226053
#Dimension 1
#PseudoPositioner id236750
for setpoint1 in range(0, 1000):
readback1 = setpoint1
#Detector id246209
detector1 = java.lang.System.currentTimeMillis()
#Dimension 2
#PseudoPositioner id226053
for setpoint2 in range(0, 1000):
readback2 = setpoint2
scan.append ([setpoint1, setpoint2], [readback1, readback2], [detector1])
#Closing channels
scan.end()

52
script/import/import7.py Executable file
View File

@@ -0,0 +1,52 @@
#Script imported from: test7.xml
#Variables
var1 = 0.0
#TODO: Set the diplay names of positioners and detectors
scan = ManualScan(['id278043'], ['id348623', 'id367393', 'id192931', 'id173831'] , [0.0], [31.0], [31])
scan.start()
#Creating channels: dimension 1
#LinearPositioner id278043
id278043 = Channel('TESTIOC:TESTCALCOUT:Input', type = 'd')
#ScalarDetector id348623
id348623 = Channel('TESTIOC:TESTCALCOUT:Output', type = 'd')
#ScalarDetector id367393
id367393 = Channel('TESTIOC:TESTSINUS:SinCalc', type = 'd')
#Timestamp id192931
#Dimension 1
#LinearPositioner id278043
for setpoint1 in frange(0.0, 31.0, 1.0, True):
if setpoint1 > 31.0 or setpoint1 < 0.0:
break
id278043.put(setpoint1, timeout=None) # TODO: Set appropriate timeout
readback1 = id278043.get()
if abs(readback1 - setpoint1) > 0.5 : # TODO: Check accuracy
raise Exception('Actor id278043 could not be set to the value ' + str(setpoint1))
#Dimension Actions
#Script action
#Variable Mappings
x = Channel('TESTIOC:TESTSINUS:SinCalc', type = 'd')
#TODO: Move, if needed, this import to the file header: import time
time.sleep(0.1)
#print "==>" + str(x.getValue())
#Detector id348623
detector1 = id348623.get()
#Detector id367393
detector2 = id367393.get()
#Detector id192931
detector3 = float(java.lang.System.currentTimeMillis())
#Manipulation id173831
#Variable Mappings
v = detector2
id173831 = v+100.0
scan.append ([setpoint1], [readback1], [detector1, detector2, detector3, id173831])
#Closing channels
id278043.close()
id348623.close()
id367393.close()
scan.end()