Files
x07ma/script/test/set_ramp_rate.py
gac-x07ma 9e969bd356
2023-12-06 11:15:37 +01:00

14 lines
690 B
Python

RAMP_RATE=1.0
if RAMP_RATE is not None:
print ("ramp rate:",RAMP_RATE)
START_RAMP_RATE=ramp_rate.read()
ramp_rate.write(RAMP_RATE)
#ramp_rate.waitInPosition(RAMP_RATE,10000) # this is hanging when setting ramp rate to 1.0 T/min on 26.10.22. CP
difference = RAMP_RATE - START_RAMP_RATE
RAMP_RATE_PREC=RAMP_RATE/10
#difference0 = difference # difference0 is the field offset before entering the stabilization loop
#last_difference = difference # last_difference is updated during the stabilization loop
while abs(difference) > RAMP_RATE_PREC:
time.sleep(2.0)
difference = ramp_rate.read() - RAMP_RATE
print "Set ramp rate done."