# Script to select the bit for the LED widget. Considering the "_H" pulser registers (the upper 32 bit register) # Orlando Soto, January 2014 from org.csstudio.opibuilder.scriptUtil import PVUtil base = 32 # base channel chann = widget.getParent().getMacroValue("chann") # Getting chann macro value, works even if the parents macro are not inherited. widget.setPropertyValue("bit",int(chann) - base) # Setting the bit widget property relative to base channel.