Skip to content
Snippets Groups Projects
Commit 32909f15 authored by BRONES Romain's avatar BRONES Romain
Browse files

fix(align): Add random wait for align

* This avoid sampling twice at a not proper time
* Also change evetn number for synchro
parent e6c38225
No related branches found
No related tags found
No related merge requests found
......@@ -44,19 +44,19 @@ def align_ccn(nodename):
# Loop until two consecutives identical measures
N=[7,3]
while N[-2] != N[-1]:
if len(N) > 7:
logger.error("Could not measure sequence offset.")
return False
logger.debug("Latch two sequence numbers without offset")
prx.ccnpack0_control=1 # let it roll a bit to collect data
time.sleep(2)
time.sleep(2+np.random.uniform())
prx.ccnpack0_control=2 # latch it
time.sleep(2)
N.append(prx.ccnpack0_latchedseq1-prx.ccnpack0_latchedseq2)
logger.debug("seq ({}, {}, {})".format(prx.ccnpack0_latchedseq1, prx.ccnpack0_latchedseq2, N[-1]))
if len(N) > 5:
logger.error("Could not measure sequence offset.")
return False
N=N[-1]
......@@ -508,7 +508,7 @@ def sync_all_bpm():
This will use the timing system (central and local board).
"""
EVN=66 # Event number
EVN=240 # Event number
# Get FofbManager proxy, only for its properties
p = tango.DeviceProxy(FofbTool.Configuration.config["tangopath"]["fofb-manager"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment