Skip to content

Commit

Permalink
FIX: AL foil valve VGC:05 automation is now activated and tested in t…
Browse files Browse the repository at this point in the history
…he code.
  • Loading branch information
ghalym committed Aug 22, 2024
1 parent c183d1d commit d3b91a4
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 114 deletions.
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
123 changes: 63 additions & 60 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
51 changes: 18 additions & 33 deletions lcls-plc-qrix-vac/lcls-plc-qrix-vac/_Config/PLC/PLC_QRIX_VAC.xti
Original file line number Diff line number Diff line change
Expand Up @@ -622,17 +622,6 @@
<Name>GVL_Devices.qRIXS_ROUGH_VRC_02.i_xClsLS</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SA_VRC_01.i_xOpnLS</Name>
<Comment>
<![CDATA[IO]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SA_VRC_01.i_xClsLS</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VRC_10.i_xOpnLS</Name>
<Comment>
Expand Down Expand Up @@ -710,6 +699,17 @@
<Name>GVL_Devices.qRIXS_SC_VGC_04.i_xClsLS</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VGC_05.i_xOpnLS</Name>
<Comment>
<![CDATA[IO]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VGC_05.i_xClsLS</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_PTM_10.i_xAtSpd</Name>
<Comment>
Expand Down Expand Up @@ -1086,10 +1086,6 @@
<Name>GVL_Devices.qRIXS_ROUGH_VRC_02.q_xOPN_DO</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SA_VRC_01.q_xCLS_DO</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VRC_10.q_xOPN_DO</Name>
<Type>BOOL</Type>
Expand Down Expand Up @@ -1122,6 +1118,10 @@
<Name>GVL_Devices.qRIXS_SC_VGC_04.q_xOPN_DO</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VGC_05.q_xCLS_DO</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_PTM_10.q_RunDO</Name>
<Comment>
Expand Down Expand Up @@ -1318,17 +1318,6 @@
</Comment>
<Type>INT</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VGC_05.i_xOpnLS</Name>
<Comment>
<![CDATA[IO]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VGC_05.i_xClsLS</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SDS_VRC_01.i_xOpnLS</Name>
<Comment>
Expand Down Expand Up @@ -1384,10 +1373,6 @@
<Name>GVL_COM.E2_stComOut</Name>
<Type GUID="{E40E9657-F46E-473A-A561-FDB8B575D641}" Namespace="Tc2_SerialCom">EL6outData22B</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SC_VGC_05.q_xCLS_DO</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_Devices.qRIXS_SDS_VRC_01.q_xOPN_DO</Name>
<Type>BOOL</Type>
Expand Down Expand Up @@ -1704,10 +1689,10 @@
<Link VarA="PlcTask Inputs^GVL_Devices.qRIXS_SC_VRC_30.i_xOpnLS" VarB="Channel 1^Input" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^B950_233_WALL_S_DRL_04^EL1004_01_05">
<Link VarA="CommTask Inputs^GVL_Devices.qRIXS_SC_VGC_05.i_xClsLS" VarB="Channel 4^Input" AutoLink="true"/>
<Link VarA="CommTask Inputs^GVL_Devices.qRIXS_SC_VGC_05.i_xOpnLS" VarB="Channel 3^Input" AutoLink="true"/>
<Link VarA="PlcTask Inputs^GVL_Devices.qRIXS_SC_VGC_04.i_xClsLS" VarB="Channel 2^Input" AutoLink="true"/>
<Link VarA="PlcTask Inputs^GVL_Devices.qRIXS_SC_VGC_04.i_xOpnLS" VarB="Channel 1^Input" AutoLink="true"/>
<Link VarA="PlcTask Inputs^GVL_Devices.qRIXS_SC_VGC_05.i_xClsLS" VarB="Channel 4^Input" AutoLink="true"/>
<Link VarA="PlcTask Inputs^GVL_Devices.qRIXS_SC_VGC_05.i_xOpnLS" VarB="Channel 3^Input" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^B950_233_WALL_S_DRL_04^EL1004_01_07">
<Link VarA="PlcTask Inputs^GVL_Devices.qRIXS_SC_VGC_01.i_xClsLS" VarB="Channel 4^Input" AutoLink="true"/>
Expand Down Expand Up @@ -1738,8 +1723,8 @@
<Link VarA="PlcTask Outputs^GVL_Devices.qRIXS_SC_VRC_20.q_xOPN_DO" VarB="Channel 2^Output" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^B950_233_WALL_S_DRL_04^EL2004_01_04">
<Link VarA="CommTask Outputs^GVL_Devices.qRIXS_SC_VGC_05.q_xCLS_DO" VarB="Channel 2^Output" AutoLink="true"/>
<Link VarA="PlcTask Outputs^GVL_Devices.qRIXS_SC_VGC_04.q_xOPN_DO" VarB="Channel 1^Output" AutoLink="true"/>
<Link VarA="PlcTask Outputs^GVL_Devices.qRIXS_SC_VGC_05.q_xCLS_DO" VarB="Channel 2^Output" AutoLink="true"/>
<Link VarA="PlcTask Outputs^GVL_Devices.qRIXS_SC_VRC_30.q_xOPN_DO" VarB="Channel 4^Output" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^B950_233_WALL_S_DRL_04^EL2004_01_08">
Expand Down

0 comments on commit d3b91a4

Please sign in to comment.