#!/usr/bin/env python # # P. Mattione November 2015 # from org.csstudio.opibuilder.scriptUtil import PVUtil from org.csstudio.opibuilder.scriptUtil import WidgetUtil from org.csstudio.opibuilder.scriptUtil import ConsoleUtil from org.csstudio.utility.pv import PVFactory from org.csstudio.opibuilder.scriptUtil import ColorFontUtil import re import os import time import sys linkingContainer = [] Arr=[] def main(): Pref = widget.getParent().getMacroValue("pref") #PVs are: UserRange, ManualFlag #trigger on UserRange pvs[1].setValue(1) #set ManualFlag to true #ConsoleUtil.writeInfo("input pvs = " + str(PVUtil.getDouble(pvs[0])) + ", " + str(PVUtil.getDouble(pvs[1])) + ", " + str(PVUtil.getDouble(pvs[2]))) #UserMax = PVUtil.getDouble(pvs[0]) #pvs[1].setValue(UserMax) #FCAL:scaler_r1_max #pvs[2].setValue(0) #FCAL:scaler_r1_automax #time.sleep(2); #ConsoleUtil.writeInfo("set pvs = " + str(PVUtil.getDouble(pvs[0])) + ", " + str(PVUtil.getDouble(pvs[1])) + ", " + str(PVUtil.getDouble(pvs[2]))) if __name__ == "__main__": main()