Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: AL foil valve #22

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ qRIXS_ROUGH_VRC_01: FB_VRC;
io: io
'}
qRIXS_ROUGH_VRC_02: FB_VRC;
{attribute 'pytmc' := '
(*{attribute 'pytmc' := '
pv: QRIXS:SA:VRC:01
'}
qRIXS_SA_VRC_01 : FB_VRC_NO_FFO; // Is the Window valve NO

*)
(* MOved to PAX
//// Connected to B950-310-WALL-W-DRL-02 (Mechanical Room )
{attribute 'pytmc' := ' pv: QRIXS:PRO:01 '}
Expand Down Expand Up @@ -183,7 +183,7 @@ qRIXS_SC_VGC_04 : FB_VGC;
.i_xClsLS := TIIB[EL1004_01_05]^Channel 4^Input;
.q_xCLS_DO := TIIB[EL2004_01_04]^Channel 2^Output
'}
qRIXS_SC_VGC_05 : FB_VRC_NO;
qRIXS_SC_VGC_05 : FB_VRC_NO; // AL foil valve

//PTM
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[EL1004_01_13]^Channel 1^Input;
Expand Down Expand Up @@ -321,6 +321,28 @@ qRIXS_OPT_PIP_01: FB_PIP_Gamma;
qRIXS_DET_PIP_01: FB_PIP_Gamma;


{attribute 'pytmc' := '
pv: QRIXS:CRYO:PIP:01
io: io
'}
{attribute 'TcLinkTo' := '.q_xHVEna_DO := TIIB[EL2794_00_07]^Channel 3^Output;
.i_iPRESS := TIIB[EL3064_00_06]^AI Standard Channel 3^Value;
.i_xSP_DI := TIIB[EL1004_00_08]^Channel 3^Input
'}

qRIXS_CRYO_PIP_01: FB_PIP_Gamma;

{attribute 'pytmc' := '
pv: QRIXS:DET:PIP:03
io: io
'}
{attribute 'TcLinkTo' := '.q_xHVEna_DO := TIIB[EL2794_00_07]^Channel 4^Output;
.i_iPRESS := TIIB[EL3064_00_06]^AI Standard Channel 4^Value;
.i_xSP_DI := TIIB[EL1004_00_08]^Channel 4^Input
'}
qRIXS_DET_PIP_03: FB_PIP_Gamma;



END_VAR]]></Declaration>
</GVL>
Expand Down
331 changes: 173 additions & 158 deletions lcls-plc-qrix-vac/lcls-plc-qrix-vac/PLC_QRIX_VAC/PLC_QRIX_VAC.tmc

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ CASE state OF

E_STATES.INIT:
qRIXS_SC_VGC_04.M_Set_OPN_SW(FALSE); //Isolation Valve closed
qRIXS_SA_VRC_01.M_Set_CLS_SW(FALSE); // Window valve OPEN
qRIXS_SC_VGC_04.i_xOverrideMode := qRIXS_SA_VRC_01.i_xOverrideMode := FALSE;
qRIXS_SC_VGC_05.M_Set_CLS_SW(FALSE); // Window valve OPEN
qRIXS_SC_VGC_04.i_xOverrideMode := qRIXS_SC_VGC_05.i_xOverrideMode := FALSE;
//Transition
if (qRIXS_SC_VGC_04.M_IsClosed() AND qRIXS_SA_VRC_01.M_IsOpen()) THEN
if (qRIXS_SC_VGC_04.M_IsClosed() AND qRIXS_SC_VGC_05.M_IsOpen()) THEN
state:= E_STATES.NOT_SAFE;
END_IF

E_STATES.NOT_SAFE: // System is not allowed to actuate, i.e all interlocks are in effect
qRIXS_SC_VGC_04.M_Set_OPN_SW(qRIXS_SC_VGC_04.iq_stValve.q_xOPN_DO );
//C_1.i_xExt_OK := VGC_1.i_xEPS_OPN_OK := VGC_1.i_xEPS_CLS_OK:= FALSE;
qRIXS_SA_VRC_01.i_xExtILK_OK:= FALSE;
qRIXS_SC_VGC_04.i_xOverrideMode := qRIXS_SA_VRC_01.i_xOverrideMode := FALSE;
qRIXS_SC_VGC_05.i_xExtILK_OK:= FALSE;
qRIXS_SC_VGC_04.i_xOverrideMode := qRIXS_SC_VGC_05.i_xOverrideMode := FALSE;

//Transition
//IF (US_GCC.IG.xAT_VAC AND DS_GCC.IG.xAT_VAC) THEN state:= E_STATES.READY; END_IF
Expand All @@ -55,23 +55,23 @@ E_STATES.NOT_SAFE: // System is not allowed to actuate, i.e all interlocks are i
// Release the external interlock so the differential pressure inlk is in effect
qRIXS_SC_VGC_04.i_xExt_OK:= qRIXS_SC_VGC_04.i_xEPS_OK :=TRUE;
//permission to insert window valve only when US vacuum is good??
qRIXS_SA_VRC_01.i_xExtILK_OK:= bExtPress;
qRIXS_SC_VGC_05.i_xExtILK_OK:= bExtPress;
// Valves alternate positions.
If (qRIXS_SA_VRC_01.M_IsClosed()) THEN qRIXS_SC_VGC_04.M_Set_OPN_SW(TRUE);
ELSIF (qRIXS_SA_VRC_01.M_IsOpen()) THEN qRIXS_SC_VGC_04.M_Set_OPN_SW(FALSE);
If (qRIXS_SC_VGC_05.M_IsClosed()) THEN qRIXS_SC_VGC_04.M_Set_OPN_SW(TRUE);
ELSIF (qRIXS_SC_VGC_05.M_IsOpen()) THEN qRIXS_SC_VGC_04.M_Set_OPN_SW(FALSE);
END_IF

// bOverride := TRUE;
E_STATES.OVERRIDE:
// Override Mode is enabled for all valves
qRIXS_SC_VGC_04.i_xOverrideMode :=qRIXS_SA_VRC_01.i_xOverrideMode := TRUE;
qRIXS_SC_VGC_04.i_xOverrideMode :=qRIXS_SC_VGC_05.i_xOverrideMode := TRUE;
// Exit of Override mode always goes back to init
IF NOT(xSAOverrideMode) THEN state:= E_STATES.INIT; END_IF


E_STATES.SETUP:
// Window valve remains retracted
qRIXS_SA_VRC_01.i_xExtILK_OK := FALSE;
qRIXS_SC_VGC_05.i_xExtILK_OK := FALSE;
// Isolation valves operates like standard gate valves
qRIXS_SC_VGC_04.i_xExt_OK := TRUE;
// exit to init just to be safe?
Expand Down Expand Up @@ -111,16 +111,10 @@ qRIXS_SC_VGC_04(
);


qRIXS_SA_VRC_01(
qRIXS_SC_VGC_05(
i_xExtILK_OK:= ,
i_xOverrideMode:= ,
iq_stValve=> ,
io_fbFFHWO:= g_FastFaultOutputNA,
fbArbiter:= g_fbArbiterNA ,
i_xPMPS_OK:= TRUE,
i_xIsAperture:= TRUE ,
i_sDevName:= ,
i_nTransitionRootID:= );
iq_stValve=> );


]]></ST>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
(* Gamma Ion Pump *)
qRIXS_OPT_PIP_01(i_stGauge:=qRIXS_OPT_GCC_01.IG, i_xOverrideMode:= xSystemOverrideMode);
qRIXS_DET_PIP_01(i_stGauge:=qRIXS_DET_GPI_01.PG, i_xOverrideMode:= xSystemOverrideMode);
qRIXS_DET_PIP_03(i_stGauge:=qRIXS_DET_GPI_01.PG, i_xOverrideMode:= xSystemOverrideMode);

Check warning on line 18 in lcls-plc-qrix-vac/lcls-plc-qrix-vac/PLC_QRIX_VAC/POUs/PRG_SPA.TcPOU

View workflow job for this annotation

GitHub Actions / standard / Style check / Leading tabs

Leading tabs

(* Pirani MKS 275 Gauges *)
qRIXS_OPT_GPI_01(PG=>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ qRIXS_SA_GCP_02();
//ION Pumps
qRIXS_SC_PIP_01(i_stGauge:=qRIXS_SC_GPI_01.PG, i_xOverrideMode:= xSystemOverrideMode);
qRIXS_SC_PIP_02(i_stGauge:=qRIXS_SC_GPI_01.PG, i_xOverrideMode:= xSystemOverrideMode);
qRIXS_CRYO_PIP_01(i_stGauge:=qRIXS_SC_GPI_01.PG, i_xOverrideMode:= xSystemOverrideMode);


//Pfiffer Turbo



Expand Down Expand Up @@ -122,6 +123,8 @@ qRIXS_SC_VRC_30.i_xExtILK_OK := qRIXS_SC_PTM_30.iq_stPTM.eState = E_PumpState.p

qRIXS_SC_VRC_30(i_xOverrideMode:=xSystemOverrideMode , iq_stValve=> );


//Pfiffer Turbo
//PTM ILK
//qRIXS_SC_PTM_10_ILK(i_stValve:=qRIXS_ROUGH_VRC_02.iq_stValve, i_stPump:=qRIXS_SC_PTM_10.iq_stPTM, tDelay:=T#200S, bILK=>);
qRIXS_SC_PTM_10(i_xExtIlkOK:= qRIXS_ROUGH_VRC_02.M_IsOpen()
Expand Down
Loading
Loading