diff --git a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte index 8005c00..b35a40d 100644 --- a/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte +++ b/EC-GN-JA-PCF-IN/src/main/resources/qst-gyrotron-fast-controller/Configurations/src/thread1/state_management.marte @@ -190,234 +190,234 @@ Function = GoWaitReady } } -} -//# GAM in WaitReady state. Check PLC_READY and CCPS_IN_OPERATION status. -+GoWaitPermitGAM = { - Class = JAMessageGAM - Operation = "AND" - InputSignals = { - CCPS_IN_OPERATION = { - DataSource = DDB1 - Comparator = "EQUALS" - Value = 1 + //# GAM in WaitReady state. Check PLC_READY and CCPS_IN_OPERATION status. + +GoWaitPermitGAM = { + Class = JAMessageGAM + Operation = "AND" + InputSignals = { + CCPS_IN_OPERATION = { + DataSource = DDB1 + Comparator = "EQUALS" + Value = 1 + } + PLC_READY = { + DataSource = NI6528_DI + Type = uint32 + Comparator = "EQUALS" + Value = 1 + } } - PLC_READY = { - DataSource = NI6528_DI - Type = uint32 - Comparator = "EQUALS" - Value = 1 + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitPermit } } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitPermit - } -} -+GoWaitStandbyFromReadyGAM = { - Class = JAMessageGAM - Operation = "AND" - InputSignals = { - PLC_STANDBY = { - DataSource = NI6528_DI - Type = uint32 - Value = 0 - Comparator = "EQUALS" - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitStandby - } -} -//# GAM in WaitPermit state. Check Permit and States of Operation Modes. -+GoWaitReadyFromWaitPermitGAM = { - Class = JAMessageGAM - Operation = OR - InputSignals = { - PLC_STANDBY = { - DataSource = NI6528_DI - Comparator = "EQUALS" - Value = 0 - } - PLC_READY = { - DataSource = NI6528_DI - Comparator = "EQUALS" - Value = 0 - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitReady - } -} -+GoWaitHVONGAM = { - Class = JAMessageGAM - Operation = AND - InputSignals = { - PLC_SYNCMODE = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 0 - } - PREP_MODE = { - DataSource = EPICSCAInput - Operator = "EQUALS" - Value = 0 - } - PLC_PERMIT = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 1 - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitHVON - } -} -+GoWaitHVON_PREP_GAM = { - Class = JAMessageGAM - Operation = AND - InputSignals = { - PLC_SYNCMODE = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 0 - } - PREP_MODE = { - DataSource = EPICSCAInput - Operator = "EQUALS" - Value = 1 - } - PLC_PERMIT = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 1 - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitHVON_PREP - } -} -+GoWaitHVON_SDN_GAM = { - Class = JAMessageGAM - Operation = AND - InputSignals = { - PLC_SYNCMODE = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 1 - } - PREP_MODE = { - DataSource = EPICSCAInput - Operator = "EQUALS" - Value = 0 - } - PLC_PERMIT = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 1 - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitHVON_SDN - } -} -+GoWaitHVON_SDN_PREP_GAM = { - Class = JAMessageGAM - Operation = AND - InputSignals = { - PLC_SYNCMODE = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 1 - } - PREP_MODE = { - DataSource = EPICSCAInput - Operator = "EQUALS" - Value = 1 - } - PLC_PERMIT = { - DataSource = NI6528_DI - Operator = "EQUALS" - Value = 1 - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitHVON_SDN_PREP - } -} -//# GAM in WaitHVON_xx states. If PLC_READY is zero, goto WaitStandby. -+FromWaitHVONToWaitStandby = { - Class = JAMessageGAM - Operation = AND - InputSignals = { - PLC_READY = { - DataSource = NI6528_DI - Comparator = EQUALS - Value = 0 - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitStandby - } -} -//# GAM in WaitHVON_xx states. If PLC_PERMIT is zero, goto WaitPermit. -+FromWaitHVONToWaitPermit = { - Class = JAMessageGAM - Operation = AND - InputSignals = { - PLC_PERMIT = { - DataSource = NI6528_DI - Comparator = EQUALS - Value = 0 - } - APS_HVON = { - DataSource = RealTimeThreadAsyncBridge - Type = uint32 - Comparator = EQUALS - Value = 0 - } - BPS_HVON = { - DataSource = RealTimeThreadAsyncBridge - Type = uint32 - Comparator = EQUALS - Value = 0 - } - MHVPS_HVON = { - DataSource = RealTimeThreadAsyncBridge - Type = uint32 - Comparator = EQUALS - Value = 0 - } - BPS_SWON = { - DataSource = RealTimeThreadAsyncBridge - Type = uint32 - Comparator = EQUALS - Value = 0 - } - APS_SWON = { - DataSource = RealTimeThreadAsyncBridge - Type = uint32 - Comparator = EQUALS - Value = 0 - } - } - +Event = { - Class = Message - Destination = StateMachine - Function = GoWaitPermit + +GoWaitStandbyFromReadyGAM = { + Class = JAMessageGAM + Operation = "AND" + InputSignals = { + PLC_STANDBY = { + DataSource = NI6528_DI + Type = uint32 + Value = 0 + Comparator = "EQUALS" + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitStandby + } + } + //# GAM in WaitPermit state. Check Permit and States of Operation Modes. + +GoWaitReadyFromWaitPermitGAM = { + Class = JAMessageGAM + Operation = OR + InputSignals = { + PLC_STANDBY = { + DataSource = NI6528_DI + Comparator = "EQUALS" + Value = 0 + } + PLC_READY = { + DataSource = NI6528_DI + Comparator = "EQUALS" + Value = 0 + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitReady + } + } + +GoWaitHVONGAM = { + Class = JAMessageGAM + Operation = AND + InputSignals = { + PLC_SYNCMODE = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 0 + } + PREP_MODE = { + DataSource = EPICSCAInput + Operator = "EQUALS" + Value = 0 + } + PLC_PERMIT = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 1 + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitHVON + } + } + +GoWaitHVON_PREP_GAM = { + Class = JAMessageGAM + Operation = AND + InputSignals = { + PLC_SYNCMODE = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 0 + } + PREP_MODE = { + DataSource = EPICSCAInput + Operator = "EQUALS" + Value = 1 + } + PLC_PERMIT = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 1 + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitHVON_PREP + } + } + +GoWaitHVON_SDN_GAM = { + Class = JAMessageGAM + Operation = AND + InputSignals = { + PLC_SYNCMODE = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 1 + } + PREP_MODE = { + DataSource = EPICSCAInput + Operator = "EQUALS" + Value = 0 + } + PLC_PERMIT = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 1 + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitHVON_SDN + } + } + +GoWaitHVON_SDN_PREP_GAM = { + Class = JAMessageGAM + Operation = AND + InputSignals = { + PLC_SYNCMODE = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 1 + } + PREP_MODE = { + DataSource = EPICSCAInput + Operator = "EQUALS" + Value = 1 + } + PLC_PERMIT = { + DataSource = NI6528_DI + Operator = "EQUALS" + Value = 1 + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitHVON_SDN_PREP + } + } + //# GAM in WaitHVON_xx states. If PLC_READY is zero, goto WaitStandby. + +FromWaitHVONToWaitStandby = { + Class = JAMessageGAM + Operation = AND + InputSignals = { + PLC_READY = { + DataSource = NI6528_DI + Comparator = EQUALS + Value = 0 + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitStandby + } + } + //# GAM in WaitHVON_xx states. If PLC_PERMIT is zero, goto WaitPermit. + +FromWaitHVONToWaitPermit = { + Class = JAMessageGAM + Operation = AND + InputSignals = { + PLC_PERMIT = { + DataSource = NI6528_DI + Comparator = EQUALS + Value = 0 + } + APS_HVON = { + DataSource = RealTimeThreadAsyncBridge + Type = uint32 + Comparator = EQUALS + Value = 0 + } + BPS_HVON = { + DataSource = RealTimeThreadAsyncBridge + Type = uint32 + Comparator = EQUALS + Value = 0 + } + MHVPS_HVON = { + DataSource = RealTimeThreadAsyncBridge + Type = uint32 + Comparator = EQUALS + Value = 0 + } + BPS_SWON = { + DataSource = RealTimeThreadAsyncBridge + Type = uint32 + Comparator = EQUALS + Value = 0 + } + APS_SWON = { + DataSource = RealTimeThreadAsyncBridge + Type = uint32 + Comparator = EQUALS + Value = 0 + } + } + +Event = { + Class = Message + Destination = StateMachine + Function = GoWaitPermit + } } }