##################################################################### # # These records are to caclulate the alarm conditaions for the # solenoid test setup. # #################################################################### #----------------------------------------------------------------------------- ##################################################################### # # This record indicates if our operations are normal (value 1) or # there is a problem (value 0). In case of value 0 the guard shack # will page the Hall D solenoid test expert's number. # ##################################################################### grecord(bo, "$(IOC):sld_test_ok") { field(DESC, "Solenoid Test OK signal") field(SCAN, "Passive") field(VAL, "1" ) field(PINI, "1" ) field(ZNAM, "Down" ) field(ONAM, "OK" ) field(ZSV, "MAJOR") field(OSV, "NO_ALARM") } #========================================================== # # Record to check the if the system is healthy # or not based on SafeState tag from PLC and # the heartbeat signal from PLC. Ouputs to the record # monitored by the gurd shack. # #========================================================== grecord(calcout,"$(IOC):sys_stat_calc") { field(DESC,"Status of the system") field(SCAN,"1 second") field(CALC,"(a=1&b=1)|c=1?1:0") field(INPA,"$(IOC):plc_in_ctrl NPP NMS") field(INPB,"$(IOC):plc_hb_check NPP NMS") field(INPC,"$(IOC):stat_mask NPP NMS") field(OUT, "$(IOC):sld_test_ok PP NMS") field(OOPT,"Every Time") field(DOPT,"Use CALC") } grecord(bo, "$(IOC):stat_mask") { field(DESC, "Mask out guard shack alarm") field(SCAN, "Passive") field(VAL, "0" ) field(PINI, "1" ) field(ZNAM, "UnMasked" ) field(ONAM, "Masked" ) field(OSV, "MAJOR") field(ZSV, "NO_ALARM") } grecord(calc,"$(IOC):plc_in_ctrl") { field(DESC,"PLC is in control") field(SCAN,"1 second") # field(CALC,"a=1?1:0") # field(INPA,"$(IOC):All_Safe NPP NMS") field(CALC,"a=1?0:1") # field(INPA,"$(IOC):Guard_Shack_Alarm NPP NMS") field(INPA,"$(IOC):Guard_Shack_Alarm_Send_Email NPP NMS") } grecord(bi,"$(IOC):Guard_Shack_Alarm_ioc") { field(SCAN,"1 second") field(SCAN,"1 second") # field(INP,"$(IOC):Guard_Shack_Alarm NPP NMS") field(INP,"$(IOC):Guard_Shack_Alarm_Send_Email NPP NMS") field(ONAM,"ALARM") field(ZNAM,"SAFE") field(OSV,"MAJOR") field(ZSV,"NO_ALARM") } # # A set of records to check that the PLC hearbeat is # changing is value to 0 and 1. # If for some time interval it does not do that # the record $(IOC):plc_hb_check is set to 0. # Otherwise its value is 1. # # # Check for 0 value in heartbeat, if not detected increment by 1 grecord(calc,"$(IOC):plc_hb_0s") { field(DESC,"Counter of 0 states" ) field(SCAN,".5 second") field(CALC,"a=0?0:b+1") field(INPA,"$(IOC):plc_heartbeat NPP NMS") field(INPB,"$(IOC):plc_hb_0s NPP NMS") } # Check for 1 value in heartbeat, if not detected increment by 1 grecord(calc,"$(IOC):plc_hb_1s") { field(DESC,"Counter of 1 states" ) field(SCAN,".5 second") field(CALC,"a=1?0:b+1") field(INPA,"$(IOC):plc_heartbeat NPP NMS") field(INPB,"$(IOC):plc_hb_1s NPP NMS") } # Calculates if hartbeat is present or not # 1 - heartbeat is present, 0 - no heartbeat in PLC grecord(calc,"$(IOC):plc_hb_calc") { field(DESC,"Check for PLC heartbeat") field(SCAN,"1 second") field(CALC,"a