from org.csstudio.opibuilder.scriptUtil import PVUtil chann = widget.getParent().getMacroValue("chann") widget.setPropertyValue("bit",int(chann) - 32)