Closedown

This commit is contained in:
gobbo_a
2017-07-14 16:39:23 +02:00
parent c69cf02dc8
commit d2eaa659e4
2 changed files with 26 additions and 11 deletions
+16 -1
View File
@@ -1,3 +1,5 @@
do_elog = True
if get_exec_pars().source == CommandSource.ui:
station = "STEST01"
else:
@@ -7,16 +9,29 @@ phase_set = caget(station + "-RSYS:PHASE-SET")
ampli_set = caget(station + "-RSYS:AMPLT-SET")
power_set = caget(station + "-RSYS:POWER-SET")
n = 0
if (phase_set == 'True'):
phase_offset = caget(station + "-RSYS:SET-VSUM-PHASE-OFFSET-BASE-CALC")
caput(station + "-RSYS:SET-VSUM-PHASE-OFFSET-BASE", phase_offset)
print phase_set
n = n + 1
if (ampli_set == 'True'):
amplitude_scale = caget(station + "-RSYS:SET-VSUM-AMPLT-SCALE-CALC")
caput(station + "-RSYS:SET-VSUM-AMPLT-SCALE", amplitude_scale)
print ampli_set
n = n + 1
if (power_set == 'True'):
power_scale = caget(station + "-RSYS:SET-VOLT-POWER-SCALE-CALC")
caput(station + "-RSYS:SET-VOLT-POWER-SCALE", power_scale)
print power_set
caput(station + "-RSYS:CMD-LOAD-CALIB-BEAM", 1)
n = n + 1
caput(station + "-RSYS:CMD-LOAD-CALIB-BEAM", 1)
if do_elog == True and n > 0:
title = "Set phase" + station
log_msg = ""
if (phase_set == 'True'): log_msg = log_msg + station + "-RSYS:SET-VSUM-PHASE-OFFSET-BASE: %0.2f" % phase_offset + " deg \n"
if (ampli_set == 'True'): log_msg = log_msg + station + "-RSYS:SET-VSUM-AMPLT-SCALE: %0.3f" % amplitude_scale + " MV \n"
if (power_set == 'True'): log_msg = log_msg + station + "-RSYS:SET-VOLT-POWER-SCALE: %0.5f" % power_scale + " MW/MV^2"
attachments = []
elog(title, log_msg, attachments)