# Set LED widget status. # The script is triggered by status variables. # Orlando Soto, March 2014. from org.csstudio.opibuilder.scriptUtil import PVUtil, ConsoleUtil pv0 = PVUtil.getDouble(pvs[0]) # Getting status mask pv1 = PVUtil.getDouble(pvs[1]) # Getting start mask pv2 = PVUtil.getDouble(pvs[2]) # PV connected to LED widget PV #ConsoleUtil.writeInfo("\nBefore status_r: %d\nstart_mask_r: %d\nled_bit_w: %d" % (int(pv0),int(pv1),int(pv2))) if (pv0 == pv1) and pv1 and pv0: pvs[2].setValue(1); else: pvs[2].setValue(0); #ConsoleUtil.writeInfo("\nAfter status_r: %d\nstart_mask_r: %d\nled_bit_w: %d" % (int(pv0),int(pv1),int(pv2)))