This commit is contained in:
2018-04-18 09:34:08 +02:00
parent 8f794d6033
commit 493f67fbca
8 changed files with 255 additions and 43 deletions

View File

@@ -1,8 +1,9 @@
import traceback
THETA_RANGE = (0.0, 5.0)
THETA_STEP = 1.0
PHI_RANGE = (-160.0, +160.0)
PHI_STEP = 40.0
PHI_STEP = 160.0 #40.0
LATENCY = 0.0
ZIGZAG = True
@@ -30,21 +31,21 @@ print "phi_positions: ", phi_positions
def before_pass(pass_num, scan):
print "Initializing pass ", pass_num
phi = phi_positions[pass_num]
phi = phi_positions[pass_num-1]
inp.write(phi)
print "phi = ", phi
#phi = phi_positions[record.index/THETA_NSTEPS]
#ManipulatorPhi.write(phi)
#print "phi = ", phi
#ManipulatorPhi.waitValueInRange(phi, 1.0, 100)
try:
try:
cscan(MOTORS, SENSORS, THETA_RANGE[0], THETA_RANGE[1], THETA_NSTEPS - 1, time=theta_time, passes = len(phi_positions), zigzag = ZIGZAG, before_pass=before_pass)
while(True):
cscan(MOTORS, SENSORS, THETA_RANGE[0], THETA_RANGE[1], THETA_NSTEPS - 1, latency=0.1, time=theta_time, passes = len(phi_positions), zigzag = ZIGZAG, before_pass=before_pass, check_positions = False)
except Exception:
print sys.exc_info()[1]
#print sys.exc_info()
traceback.print_exc()
traceback.print_stack()
print "Caught"
finally:
if ENDSCAN: