GitLab will be upgraded on June 23rd evening. During the upgrade the service will be unavailable, sorry for the inconvenience.

Commit e988671c authored by bliss administrator's avatar bliss administrator

Bugs correction

parent 3008c277
......@@ -10,6 +10,7 @@ from bliss.config.static import get_config
from bliss.common.session import get_current_session
global short_calibration
short_calibration = False
def init_sx():
......@@ -163,6 +164,8 @@ def init_sy():
# search for SZ pos home switch and reset dial to 0
def init_mr_yrot():
previous_speed = yrot.velocity
yrot.velocity = 5
yrot.limits=(-10000,10000)
######### LIMIT -
......@@ -187,7 +190,7 @@ def init_mr_yrot():
print("init_yrot --- Moving to hard limit + ")
start = time.time()
try:
mv(yrot,yrot.sign*999+yrot.offset)
mv(yrot,yrot.sign*-999+yrot.offset)
except:
if 'LIMNEG' in yrot.state or 'LIMPOS' in yrot.state:
......@@ -214,6 +217,7 @@ def init_mr_yrot():
print("init_yrot --- reseting yrot limits to hard limits +/ 0.05\n")
yrot.limits=(-slp,slp)
yrot.velocity = previous_speed
if time.time()-start >= 60:
print("init_yrot --- Time end: "+str((time.time()-start)/60) + ' min')
......@@ -457,12 +461,12 @@ def init_mr_srot():
print("init_srot --- Searching home...")
srot.home()
time.sleep(0.5)
srot.sync_hard()
print("init_srot --- moving srot to 0\n")
# move some degrees to free the home switch. Only moving to 0, the home switch will still be active
# and another call to home will end in eternal rotation!
mv(srot,5)
print("init_srot --- moving srot to 0\n")
umv(srot,0)
if time.time()-start >= 60:
......@@ -506,9 +510,7 @@ def calib_motors(*motors,short_calib=True):
all_calib += [init_hr_sz,init_hr_yrot,init_hr_srot,init_hr_z0]
all_motors.append(z0)
if get_current_session().name == 'MRTOMO':
#all_calib += [init_mr_sz,init_mr_yrot,init_mr_srot]
# Problem with mr_yrot limit switches!!!!!!!!
all_calib += [init_mr_sz, init_mr_srot]
all_calib += [init_mr_sz,init_mr_yrot,init_mr_srot]
global short_calibration
short_calibration = short_calib
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment