Changed state machine with Temperatures
This commit is contained in:
@@ -86,11 +86,11 @@ record(calc, "$(P)$(R)WSHOTCALCSTATE") {
|
|||||||
field(INPA,"$(P)$(R)WSHOTINGSTATE.VAL PP NMS")
|
field(INPA,"$(P)$(R)WSHOTINGSTATE.VAL PP NMS")
|
||||||
}
|
}
|
||||||
|
|
||||||
record(ai, "$(P)$(R)Temperature_0") {
|
#record(ai, "$(P)$(R)Temperature_0") {
|
||||||
field(DESC, "ISTTOK Temperature 0 Calculated")
|
# field(DESC, "ISTTOK Temperature 0 Calculated")
|
||||||
field(EGU, "C")
|
# field(EGU, "C")
|
||||||
field(SCAN,"1 second")
|
# field(SCAN,"1 second")
|
||||||
}
|
#}
|
||||||
|
|
||||||
record(bo, "$(P)$(R)OPREQ") {
|
record(bo, "$(P)$(R)OPREQ") {
|
||||||
info(autosaveFields, "VAL")
|
info(autosaveFields, "VAL")
|
||||||
|
|||||||
@@ -178,6 +178,10 @@ float IsttokRPump2_Pressure;
|
|||||||
assign IsttokRPump2_Pressure to "ISTTOK:central:RPump2-Pressure";
|
assign IsttokRPump2_Pressure to "ISTTOK:central:RPump2-Pressure";
|
||||||
monitor IsttokRPump2_Pressure;
|
monitor IsttokRPump2_Pressure;
|
||||||
|
|
||||||
|
float IsttokVVesselTemperature;
|
||||||
|
assign IsttokVVesselTemperature to "ISTTOK:temperature:VVessel-Temperature";
|
||||||
|
monitor IsttokVVesselTemperature;
|
||||||
|
|
||||||
short IsttokShotBuzzer;
|
short IsttokShotBuzzer;
|
||||||
assign IsttokShotBuzzer to "ISTTOK:central:Buzzer";
|
assign IsttokShotBuzzer to "ISTTOK:central:Buzzer";
|
||||||
|
|
||||||
@@ -391,6 +395,8 @@ ss PulseSequence {
|
|||||||
pvPut(IsttokLastOPSTATE);
|
pvPut(IsttokLastOPSTATE);
|
||||||
IsttokShotShot_TorPSDisable = PCF_RELAY_OFF;
|
IsttokShotShot_TorPSDisable = PCF_RELAY_OFF;
|
||||||
pvPut(IsttokShotShot_TorPSDisable);
|
pvPut(IsttokShotShot_TorPSDisable);
|
||||||
|
IsttokProcReq = STOP;
|
||||||
|
pvPut(IsttokProcReq);
|
||||||
}
|
}
|
||||||
when(IsttokEmergency == ON){
|
when(IsttokEmergency == ON){
|
||||||
strcpy(msg, "Emergency from Process");
|
strcpy(msg, "Emergency from Process");
|
||||||
@@ -418,8 +424,6 @@ ss PulseSequence {
|
|||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
errlogSevPrintf(MINOR, "%s\n",msg);
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
/* Pulse state change to Stopping */
|
/* Pulse state change to Stopping */
|
||||||
// IsttokOPSTATE = POS_Stopping;
|
|
||||||
// pvPut(IsttokOPSTATE);
|
|
||||||
} state Stopping
|
} state Stopping
|
||||||
when (IsttokProcReq==START && IsttokProcMode==CLEAN ) {
|
when (IsttokProcReq==START && IsttokProcMode==CLEAN ) {
|
||||||
strcpy(msg, "State to Clean");
|
strcpy(msg, "State to Clean");
|
||||||
@@ -448,6 +452,15 @@ ss PulseSequence {
|
|||||||
|
|
||||||
when (IsttokOPREQ == STOP) {} state Stopping
|
when (IsttokOPREQ == STOP) {} state Stopping
|
||||||
|
|
||||||
|
when ( pvStatus(IsttokVVesselTemperature) != pvStatOK) {
|
||||||
|
/* Temperature Limit Pulse state change to Process */
|
||||||
|
//IsttokProcReq = STOP;
|
||||||
|
//pvPut(IsttokProcReq);
|
||||||
|
strcpy(msg, "State to Process");
|
||||||
|
pvPut(msg);
|
||||||
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
|
} state Process
|
||||||
|
|
||||||
when ( pvStatus(IsttokTMPump1_Emergency) != pvStatOK ||
|
when ( pvStatus(IsttokTMPump1_Emergency) != pvStatOK ||
|
||||||
pvStatus(IsttokTMPump2_Emergency) != pvStatOK) {
|
pvStatus(IsttokTMPump2_Emergency) != pvStatOK) {
|
||||||
/* Vacuum emergency: Pulse state change to Stopping */
|
/* Vacuum emergency: Pulse state change to Stopping */
|
||||||
@@ -457,13 +470,13 @@ ss PulseSequence {
|
|||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
errlogSevPrintf(MAJOR, "%s\n",msg);
|
errlogSevPrintf(MAJOR, "%s\n",msg);
|
||||||
} state Stopping
|
} state Stopping
|
||||||
|
|
||||||
when(IsttokEmergency == ON){
|
when(IsttokEmergency == ON){
|
||||||
strcpy(msg, "Emergency from Clean");
|
strcpy(msg, "Emergency from Clean");
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
errlogSevPrintf(MAJOR, "%s\n",msg);
|
errlogSevPrintf(MAJOR, "%s\n",msg);
|
||||||
/* Pulse state change to Emergency*/
|
/* Pulse state change to Emergency*/
|
||||||
} state Emergency
|
} state Emergency
|
||||||
|
|
||||||
}
|
}
|
||||||
/* State WaitShot */
|
/* State WaitShot */
|
||||||
state WaitShot {
|
state WaitShot {
|
||||||
@@ -862,16 +875,18 @@ ss ShotSequence {
|
|||||||
pvPut(IsttokShotCountdownScan);
|
pvPut(IsttokShotCountdownScan);
|
||||||
}
|
}
|
||||||
when( IsttokOPSTATE == POS_WaitShot ){
|
when( IsttokOPSTATE == POS_WaitShot ){
|
||||||
strcpy(msg, "Waiting for Trigger...");
|
//strcpy(msg, "Waiting for Trigger...");
|
||||||
pvPut(msg);
|
// pvPut(msg);
|
||||||
errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
//errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
||||||
IsttokShotCountdown = 0;
|
IsttokShotCountdown = 0;
|
||||||
pvPut(IsttokShotCountdown);
|
pvPut(IsttokShotCountdown);
|
||||||
strcpy(IsttokShotCountdownScan, "1 second");
|
strcpy(IsttokShotCountdownScan, "1 second");
|
||||||
pvPut(IsttokShotCountdownScan);
|
pvPut(IsttokShotCountdownScan);
|
||||||
WSHOTINGSTATE = WSHTST_WaitTrg;
|
WSHOTINGSTATE = WSHTST_ShotEnd;
|
||||||
pvPut(WSHOTINGSTATE);
|
pvPut(WSHOTINGSTATE);
|
||||||
} state ShotWaitTrg
|
//WSHOTINGSTATE = WSHTST_WaitTrg;
|
||||||
|
//pvPut(WSHOTINGSTATE);
|
||||||
|
} state ShotEnd
|
||||||
}
|
}
|
||||||
state ShotWaitTrg {
|
state ShotWaitTrg {
|
||||||
when ((IsttokShotCountdown > 1800) || (IsttokOPSTATE != POS_WaitShot)) {
|
when ((IsttokShotCountdown > 1800) || (IsttokOPSTATE != POS_WaitShot)) {
|
||||||
@@ -938,7 +953,7 @@ ss ShotSequence {
|
|||||||
} state Shoting4
|
} state Shoting4
|
||||||
}
|
}
|
||||||
state Shoting4 {
|
state Shoting4 {
|
||||||
when ((IsttokOPSTATE != POS_WaitShot) && (IsttokShotCountdown == 160)) {
|
when (IsttokOPSTATE != POS_WaitShot ) {
|
||||||
strcpy(msg, "Shoting4 Out");
|
strcpy(msg, "Shoting4 Out");
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
||||||
@@ -951,7 +966,7 @@ ss ShotSequence {
|
|||||||
} state Shoting5
|
} state Shoting5
|
||||||
}
|
}
|
||||||
state Shoting5 {
|
state Shoting5 {
|
||||||
when ((IsttokOPSTATE != POS_WaitShot) && (IsttokShotCountdown == 160)) {
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
strcpy(msg, "Shoting5 Out");
|
strcpy(msg, "Shoting5 Out");
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
||||||
@@ -969,6 +984,13 @@ ss ShotSequence {
|
|||||||
} state Shoting6
|
} state Shoting6
|
||||||
}
|
}
|
||||||
state Shoting6 {
|
state Shoting6 {
|
||||||
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
|
strcpy(msg, "Shoting6 Out");
|
||||||
|
pvPut(msg);
|
||||||
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
|
WSHOTINGSTATE = WSHTST_NonShoting;
|
||||||
|
pvPut(WSHOTINGSTATE);
|
||||||
|
} state NonShoting
|
||||||
when (IsttokShotCountdown == -16) {
|
when (IsttokShotCountdown == -16) {
|
||||||
strcpy(msg, "CAPBANK Charge OFF" );
|
strcpy(msg, "CAPBANK Charge OFF" );
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
@@ -980,6 +1002,13 @@ ss ShotSequence {
|
|||||||
} state Shoting7
|
} state Shoting7
|
||||||
}
|
}
|
||||||
state Shoting7 {
|
state Shoting7 {
|
||||||
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
|
strcpy(msg, "Shoting7 Out");
|
||||||
|
pvPut(msg);
|
||||||
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
|
WSHOTINGSTATE = WSHTST_NonShoting;
|
||||||
|
pvPut(WSHOTINGSTATE);
|
||||||
|
} state NonShoting
|
||||||
when (IsttokShotCountdown == -11) {
|
when (IsttokShotCountdown == -11) {
|
||||||
strcpy(msg, "Buzzer 2-Sound" );
|
strcpy(msg, "Buzzer 2-Sound" );
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
@@ -996,15 +1025,13 @@ ss ShotSequence {
|
|||||||
} state Shoting8
|
} state Shoting8
|
||||||
}
|
}
|
||||||
state Shoting8 {
|
state Shoting8 {
|
||||||
/*
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
when ((IsttokOPSTATE != POS_WaitShot) && (IsttokShotCountdown == 160)) {
|
|
||||||
strcpy(msg, "Shoting8 Out");
|
strcpy(msg, "Shoting8 Out");
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
errlogSevPrintf(NO_ALARM, "%s\n",msg);
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
WSHOTINGSTATE = WSHTST_NonShoting;
|
WSHOTINGSTATE = WSHTST_NonShoting;
|
||||||
pvPut(WSHOTINGSTATE);
|
pvPut(WSHOTINGSTATE);
|
||||||
} state NonShoting
|
} state NonShoting
|
||||||
*/
|
|
||||||
when (IsttokShotCountdown == -4) {
|
when (IsttokShotCountdown == -4) {
|
||||||
strcpy(msg, "Toroidal PS Trigger");
|
strcpy(msg, "Toroidal PS Trigger");
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
@@ -1017,6 +1044,13 @@ ss ShotSequence {
|
|||||||
} state Shoting9
|
} state Shoting9
|
||||||
}
|
}
|
||||||
state Shoting9 {
|
state Shoting9 {
|
||||||
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
|
strcpy(msg, "Shoting9 Out");
|
||||||
|
pvPut(msg);
|
||||||
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
|
WSHOTINGSTATE = WSHTST_NonShoting;
|
||||||
|
pvPut(WSHOTINGSTATE);
|
||||||
|
} state NonShoting
|
||||||
when (IsttokShotCountdown == -2) {
|
when (IsttokShotCountdown == -2) {
|
||||||
strcpy(msg, "Ready for SHOT" );
|
strcpy(msg, "Ready for SHOT" );
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
@@ -1026,6 +1060,13 @@ ss ShotSequence {
|
|||||||
} state Shoting10
|
} state Shoting10
|
||||||
}
|
}
|
||||||
state Shoting10 {
|
state Shoting10 {
|
||||||
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
|
strcpy(msg, "Shoting10 Out");
|
||||||
|
pvPut(msg);
|
||||||
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
|
WSHOTINGSTATE = WSHTST_NonShoting;
|
||||||
|
pvPut(WSHOTINGSTATE);
|
||||||
|
} state NonShoting
|
||||||
when (IsttokShotCountdown == 0) {
|
when (IsttokShotCountdown == 0) {
|
||||||
strcpy(msg, "CAPBANK CrowBar Close" );
|
strcpy(msg, "CAPBANK CrowBar Close" );
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
@@ -1037,6 +1078,13 @@ ss ShotSequence {
|
|||||||
} state Shoting11
|
} state Shoting11
|
||||||
}
|
}
|
||||||
state Shoting11 {
|
state Shoting11 {
|
||||||
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
|
strcpy(msg, "Shoting11 Out");
|
||||||
|
pvPut(msg);
|
||||||
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
|
WSHOTINGSTATE = WSHTST_NonShoting;
|
||||||
|
pvPut(WSHOTINGSTATE);
|
||||||
|
} state NonShoting
|
||||||
when (IsttokShotCountdown == 1) {
|
when (IsttokShotCountdown == 1) {
|
||||||
strcpy(msg, "GIS Valves CLOSE" );
|
strcpy(msg, "GIS Valves CLOSE" );
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
@@ -1053,6 +1101,13 @@ ss ShotSequence {
|
|||||||
} state Shoting12
|
} state Shoting12
|
||||||
}
|
}
|
||||||
state Shoting12 {
|
state Shoting12 {
|
||||||
|
when (IsttokOPSTATE != POS_WaitShot) {
|
||||||
|
strcpy(msg, "Shoting6 Out");
|
||||||
|
pvPut(msg);
|
||||||
|
errlogSevPrintf(MINOR, "%s\n",msg);
|
||||||
|
WSHOTINGSTATE = WSHTST_NonShoting;
|
||||||
|
pvPut(WSHOTINGSTATE);
|
||||||
|
} state NonShoting
|
||||||
when (IsttokShotCountdown == 2) {
|
when (IsttokShotCountdown == 2) {
|
||||||
strcpy(msg, "Lights OFF and Recovering..." );
|
strcpy(msg, "Lights OFF and Recovering..." );
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
@@ -1064,7 +1119,7 @@ ss ShotSequence {
|
|||||||
} state ShotEnd
|
} state ShotEnd
|
||||||
}
|
}
|
||||||
state ShotEnd {
|
state ShotEnd {
|
||||||
when (IsttokShotCountdown > 160) {
|
when (IsttokShotCountdown > 160 || IsttokOPSTATE != POS_WaitShot) {
|
||||||
strcpy(msg, "Terminated");
|
strcpy(msg, "Terminated");
|
||||||
pvPut(msg);
|
pvPut(msg);
|
||||||
errlogSevPrintf(NO_ALARM, "%s\n", msg);
|
errlogSevPrintf(NO_ALARM, "%s\n", msg);
|
||||||
|
|||||||
Reference in New Issue
Block a user