Skip to content

Commit

Permalink
Merge pull request #84 from pcdshub/addTurboFunction
Browse files Browse the repository at this point in the history
Add turbo pump function with TOF: F_TurboExtILK_TOF
  • Loading branch information
jyin999 authored Oct 13, 2021
2 parents d628e0a + 0ecb107 commit 2fae1cf
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 22 deletions.
3 changes: 3 additions & 0 deletions L2SIVacuum/L2SIVacuum.plcproj
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,9 @@
<Compile Include="POUs\Functions\Pumps\functions\F_TurboExtILK_NO_1.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\Functions\Pumps\functions\F_TurboExtILK_TOF.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\Functions\Pumps\Interfaces\FB_PIP_Interface_In.TcPOU">
<SubType>Code</SubType>
</Compile>
Expand Down
49 changes: 27 additions & 22 deletions L2SIVacuum/L2SIVacuum.tmc

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions L2SIVacuum/POUs/Functions/Pumps/functions/F_TurboExtILK_TOF.TcPOU
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4022.18">
<POU Name="F_TurboExtILK_TOF" Id="{478f05ff-d78f-4875-bc1c-d39d73e76d5d}" SpecialFunc="None">
<Declaration><![CDATA[(* This function evaluates the Turbo ILK logic when no isolation valve between turbo and chamber and no gauge between roughing valve and turbo to measuring turbo backing pressure*)
(* The Turbo shall not Run if the scroll pump is not running*)
(* The function switches off the Turbo if the Inlet pressure or the backing Pressure*)
(* are higher than the configured set point*)
(* The Turbo shall not Run if the roughing valve is closed, add delay timer to keep turbo running for a short period after roughing valve closed *)
FUNCTION F_TurboExtILK_TOF : BOOL
VAR_INPUT
Turbo : ST_PTM;
BackingGauge : ST_VG;
InletGauge : ST_VG;
ScrollPump : ST_RoughPump;
RoughingValve : ST_VRC;
tDelay : TIME;
END_VAR
VAR
tofDelay : TOF;
bValveOpenILK : BOOL;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[
tofDelay.IN :=RoughingValve.i_xOpnLS OR (Turbo.eState = pumpSTOPPED); // Start timer when valve closes (IN goes low)
tofDelay.PT := tDelay;
tofDelay();
bValveOpenILK := tofDelay.Q;
F_TurboExtILK_TOF := ( ScrollPump.q_xRunDo and ScrollPump.eState = pumpRUNNING )
AND (InletGauge.xPRESS_OK and InletGauge.rPRESS < Turbo.rInletPressureSP) AND (BackingGauge.xPRESS_OK and BackingGauge.rPRESS < Turbo.rBackingPressureSP)
AND bValveOpenILK;]]></ST>
</Implementation>
<LineIds Name="F_TurboExtILK_TOF">
<LineId Id="23" Count="0" />
<LineId Id="29" Count="0" />
<LineId Id="24" Count="1" />
<LineId Id="19" Count="0" />
<LineId Id="28" Count="0" />
<LineId Id="26" Count="0" />
<LineId Id="7" Count="0" />
<LineId Id="17" Count="0" />
<LineId Id="34" Count="0" />
</LineIds>
</POU>
</TcPlcObject>

0 comments on commit 2fae1cf

Please sign in to comment.