Skip to content

Commit

Permalink
Merge pull request #95 from jyin999/VAT590
Browse files Browse the repository at this point in the history
Vat590
  • Loading branch information
jyin999 authored Mar 28, 2022
2 parents 0ecdade + 739f887 commit 0f355e7
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion L2SIVacuum/L2SIVacuum.tmc
Original file line number Diff line number Diff line change
Expand Up @@ -970,4 +970,4 @@ This function provides ILK and Set Point Protection for the Cold Cathode]]></Com
</Value></Property><Property><Name>TcVarGlobal</Name></Property></Properties><BitOffs>3072000</BitOffs></Symbol><Symbol><Name>PMPS_GVL.AccumulatedFF</Name><Comment><![CDATA[ Any time a FF occurs]]></Comment><BitSize>32</BitSize><BaseType>UDINT</BaseType><Properties><Property><Name>pytmc</Name><Value>
pv: @(PREFIX)AccumulatedFastFaults
io: i
</Value></Property><Property><Name>TcVarGlobal</Name></Property></Properties><BitOffs>3072032</BitOffs></Symbol></DataArea></DataAreas><Deployment /><EventClasses><EventClass><Type GUID="{97CF8247-B59C-4E2C-B4B0-7350D0471457}">LCLSGeneralEventClass</Type></EventClass></EventClasses><Properties><Property><Name>ApplicationName</Name><Value>Port_851</Value></Property><Property><Name>ChangeDate</Name><Value>2022-03-21T17:52:07</Value></Property><Property><Name>GeneratedCodeSize</Name><Value>659456</Value></Property><Property><Name>GlobalDataSize</Name><Value>65368064</Value></Property></Properties></Module></Modules></TcModuleClass>
</Value></Property><Property><Name>TcVarGlobal</Name></Property></Properties><BitOffs>3072032</BitOffs></Symbol></DataArea></DataAreas><Deployment /><EventClasses><EventClass><Type GUID="{97CF8247-B59C-4E2C-B4B0-7350D0471457}">LCLSGeneralEventClass</Type></EventClass></EventClasses><Properties><Property><Name>ApplicationName</Name><Value>Port_851</Value></Property><Property><Name>ChangeDate</Name><Value>2022-03-28T15:31:02</Value></Property><Property><Name>GeneratedCodeSize</Name><Value>659456</Value></Property><Property><Name>GlobalDataSize</Name><Value>65368064</Value></Property></Properties></Module></Modules></TcModuleClass>
25 changes: 22 additions & 3 deletions L2SIVacuum/POUs/Functions/Gauges/FB_901_ECAT.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@ VAR
xPress_OK AT%I* : BOOL;
xOverrange AT%I* : BOOL;
xUnderrange AT%I* : BOOL;
i_iPRESS_R AT%I* :REAL; // input Pressure // Link to analog Input
i_iPRESS_R AT%I* : REAL; // input Pressure // Link to analog Input
bWcstate AT%I* : BOOL; // 0: date valid, 1: date invalid
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[(* Standard MKS 9XX series conversion *)
(* works for 901 with Ethercat interface*)
// no div by zero
PG.rPRESS :=i_iPRESS_R;
PG.xPRESS_OK := xPress_OK;
PG.xPRESS_OK := xPress_OK and NOT bWcstate ;
IF xPress_OK THEN
PG.xPRESS_OK := TRUE;
PG.eState := Valid; //Press OK
Expand Down Expand Up @@ -59,7 +61,9 @@ END_IF]]></ST>
</Action>
<Action Name="ACT_IO" Id="{afe7d8e6-827d-4f4d-895b-401bfcc2f6f0}">
<Implementation>
<ST><![CDATA[PG.i_iPRESS_R := REAL_TO_INT(i_iPRESS_R);]]></ST>
<ST><![CDATA[PG.i_iPRESS_R := REAL_TO_INT(i_iPRESS_R);
PG.sPath := sPath;
]]></ST>
</Implementation>
</Action>
<Action Name="ACT_Logger" Id="{4887216a-c77e-43cb-a418-2b8dd97c0d8a}">
Expand Down Expand Up @@ -90,5 +94,20 @@ IF ePrevState <> PG.eState THEN
]]></ST>
</Implementation>
</Action>
<LineIds Name="FB_901_ECAT">
<LineId Id="3" Count="20" />
<LineId Id="2" Count="0" />
</LineIds>
<LineIds Name="FB_901_ECAT.ACT_Init">
<LineId Id="2" Count="4" />
<LineId Id="1" Count="0" />
</LineIds>
<LineIds Name="FB_901_ECAT.ACT_IO">
<LineId Id="1" Count="2" />
</LineIds>
<LineIds Name="FB_901_ECAT.ACT_Logger">
<LineId Id="2" Count="22" />
<LineId Id="1" Count="0" />
</LineIds>
</POU>
</TcPlcObject>
5 changes: 3 additions & 2 deletions L2SIVacuum/POUs/Functions/Gauges/FB_972.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ ACT_IO();]]></ST>
</Implementation>
<Action Name="ACT_IO" Id="{57edb1c8-c4ce-46a6-8329-dd1927c8ce8e}">
<Implementation>
<ST><![CDATA[PG.i_iPRESS_R :=i_iPRESS_R;]]></ST>
<ST><![CDATA[PG.i_iPRESS_R :=i_iPRESS_R;
PG.sPath := sPath;]]></ST>
</Implementation>
</Action>
<Action Name="ACT_Logger" Id="{e27f7c5d-a6a0-44f8-9f5b-d0a5d2ac0c45}">
Expand Down Expand Up @@ -95,7 +96,7 @@ END_VAR
<LineId Id="2" Count="0" />
</LineIds>
<LineIds Name="FB_972.ACT_IO">
<LineId Id="1" Count="0" />
<LineId Id="1" Count="1" />
</LineIds>
<LineIds Name="FB_972.ACT_Logger">
<LineId Id="2" Count="22" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,18 @@ VAR_INPUT
END_VAR
VAR
tofDelay : TOF;
bValveOpenILK : BOOL;
bRunOk : 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.IN :=RoughingValve.i_xOpnLS OR (Turbo.eState = pumpSTOPPED); // allow to restart turbo when roughing valve is open, start a TOF timer to keep turbo running if valve is closing (IN goes low),
tofDelay.PT := tDelay;
tofDelay();
bValveOpenILK := tofDelay.Q;
bRunOk := 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)
OR bValveOpenILK;]]></ST>
F_TurboExtILK_TOF := bRunOk;]]></ST>
</Implementation>
<LineIds Name="F_TurboExtILK_TOF">
<LineId Id="23" Count="0" />
Expand All @@ -41,8 +39,6 @@ F_TurboExtILK_TOF := ( ScrollPump.q_xRunDo and ScrollPump.eState = pumpRUNNING )
<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>
Expand Down

0 comments on commit 0f355e7

Please sign in to comment.