Skip to content

Commit

Permalink
Dev: More devices and interlocks
Browse files Browse the repository at this point in the history
  • Loading branch information
ghalym committed Jan 20, 2023
1 parent 516dfa7 commit 2b5a4db
Show file tree
Hide file tree
Showing 9 changed files with 697 additions and 539 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ qRIXS_ROUGH_GPI_01 : FB_MKS275;
//VRO
{attribute 'pytmc' := ' pv: QRIXS:ROUGH:VRO:01 '}
{attribute 'TcLinkTo' := '.q_xOPN_DO := TIIB[EL2212_03_E4]^DOX Control Channel 1^Control^Output '}
{attribute 'TcLinkTo' := '.q_xOPN_DO := TIIB[EL2212_03_04]^DOX Control Channel 1^Control^Output'}
QRIX_ROUGH_VRO_01 : FB_VVC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
<Compile Include="PlcTask.TcTTO">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\FB_ChemRIXS_Turbo_ILK.TcPOU">
<SubType>Code</SubType>
</Compile>
<Compile Include="POUs\Main.TcPOU">
<SubType>Code</SubType>
</Compile>
Expand Down Expand Up @@ -95,49 +98,70 @@
</ItemGroup>
<ItemGroup>
<PlaceholderResolution Include="LCLS General">
<Resolution>LCLS General, * (SLAC)</Resolution>
<Resolution>LCLS General, 2.6.0 (SLAC)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="LCLS Vacuum">
<Resolution>LCLS Vacuum, * (SLAC - LCLS)</Resolution>
<Resolution>LCLS Vacuum, 2.1.0 (SLAC - LCLS)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="LCLSVacuumSerialDriverLib">
<Resolution>LCLSVacuumSerialDriverLib, 1.2.2 (SLAC - LCLS)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="PMPS">
<Resolution>PMPS, * (SLAC - LCLS)</Resolution>
<Resolution>PMPS, 2.2.2 (SLAC - LCLS)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="SysDir">
<Resolution>SysDir, 3.5.8.0 (System)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="SysFile">
<Resolution>SysFile, 3.5.9.0 (System)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_DataExchange">
<Resolution>Tc2_DataExchange, 3.3.5.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_EtherCAT">
<Resolution>Tc2_EtherCAT, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_EtherCAT, 3.3.15.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_IoFunctions">
<Resolution>Tc2_IoFunctions, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_IoFunctions, 3.3.13.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_Math">
<Resolution>Tc2_Math, 3.3.1.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_MC2">
<Resolution>Tc2_MC2, 3.3.42.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_ModbusSrv">
<Resolution>Tc2_ModbusSrv, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_ModbusSrv, 3.3.2.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_SerialCom">
<Resolution>Tc2_SerialCom, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_SerialCom, 3.3.7.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_Standard">
<Resolution>Tc2_Standard, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_Standard, 3.3.3.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_System">
<Resolution>Tc2_System, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_System, 3.4.24.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_TcpIp">
<Resolution>Tc2_TcpIp, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_TcpIp, 3.3.6.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc2_Utilities">
<Resolution>Tc2_Utilities, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc2_Utilities, 3.3.41.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc3_EventLogger">
<Resolution>Tc3_EventLogger, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc3_EventLogger, 3.1.24.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc3_Interfaces">
<Resolution>Tc3_Interfaces, 3.4.3.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc3_JsonXml">
<Resolution>Tc3_JsonXml, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc3_JsonXml, 3.3.14.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="Tc3_Module">
<Resolution>Tc3_Module, * (Beckhoff Automation GmbH)</Resolution>
<Resolution>Tc3_Module, 3.3.21.0 (Beckhoff Automation GmbH)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="TcUnit">
<Resolution>TcUnit, * (www.tcunit.org)</Resolution>
<Resolution>TcUnit, 1.1.0.0 (www.tcunit.org)</Resolution>
</PlaceholderResolution>
</ItemGroup>
<ItemGroup>
Expand Down
859 changes: 477 additions & 382 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
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4022.18">
<POU Name="FB_ChemRIXS_Turbo_ILK" Id="{aec3d1d6-1fd1-4003-aa2e-6283ccf339ab}" SpecialFunc="None">
<Declaration><![CDATA[FUNCTION_BLOCK FB_ChemRIXS_Turbo_ILK
VAR_INPUT
i_stValve : ST_ValveBase;
i_stPump : ST_PTM;
tDelay : TIME;
END_VAR
VAR_OUTPUT
bILK : BOOL;
END_VAR
VAR
tofDelay : TOF;
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[tofDelay.IN := i_stValve.i_xOpnLS OR (i_stPump.eState = pumpSTOPPED); // Start timer when valve closes (IN goes low)
tofDelay.PT := tDelay;
tofDelay();
bILK := tofDelay.Q; // Assign turbopump output to timer output. When the valve is closed the turbo pump ILK will go False after time elapses.
// Intended to be connected to pump OK to run bit.]]></ST>
</Implementation>
</POU>
</TcPlcObject>
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ END_VAR
<ST><![CDATA[// Roughing devices
//MKS 275 Gauges
qRIXS_ROUGH_GPI_01.M_SetBits(30518);
qRIXS_ROUGH_GPI_01(); // Roughing guage near BL
qRIXS_ROUGH_GPI_01(); // Roughing guage near pro
qRIXS_ROUGH_GPI_02.M_SetBits(30518);
qRIXS_ROUGH_GPI_02(); // Roughing guage near BL
//VRC 02
qRIXS_ROUGH_VRC_02(i_xExtILK_OK := TRUE, i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
//VRC 02 backing Main Sample Chamber
qRIXS_ROUGH_VRC_02(i_xExtILK_OK := qRIXS_PRO_01.stPump.eState = E_PumpState.pumpRUNNING, i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
//VRC 01
qRIXS_ROUGH_VRC_01(i_xExtILK_OK := TRUE, i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
//VRC 01 backing Sample Delivery Chamber
qRIXS_ROUGH_VRC_01(i_xExtILK_OK := qRIXS_PRO_01.stPump.eState = E_PumpState.pumpRUNNING, i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
qRIXS_PRO_01(i_stBPGauge := qRIXS_ROUGH_GPI_01.PG, i_xVlvOpn := TRUE, i_xExtIlkOK := TRUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ VAR
iWatchdog: UDINT;
RIX_TV4K2_GFS_1:FB_TGCC_ADS;
RIX_IM5K2_PPM_GCC_1:FB_TGCC_ADS;
//PTM interlocks
qRIXS_SC_PTM_10_ILK : FB_ChemRIXS_Turbo_ILK;
qRIXS_SC_PTM_20_ILK : FB_ChemRIXS_Turbo_ILK;
qRIXS_SC_PTM_30_ILK : FB_ChemRIXS_Turbo_ILK;
END_VAR
]]></Declaration>
<Implementation>
Expand Down Expand Up @@ -117,11 +122,18 @@ qRIXS_SC_VRC_30.i_xExtILK_OK := F_TurboGateValve_Protection_ILK( i_Turbo := qRIX
qRIXS_SC_VRC_30(i_xOverrideMode:=xSystemOverrideMode , iq_stValve=> );
qRIXS_SC_PTM_10(i_xExtIlkOK:=TRUE);
//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_SC_PTM_10_ILK.bILK
AND *)F_TurboExtILKLogic_2(Turbo:=qRIXS_SC_PTM_10.iq_stPTM,BackingGauge:=qRIXS_ROUGH_GPI_02.PG, InletGauge:=qRIXS_SC_GPI_01.PG, ScrollPump:= qRIXS_PRO_01.stPump) );
qRIXS_SC_PTM_20(i_xExtIlkOK:=TRUE);
//qRIXS_SC_PTM_20_ILK(i_stValve:=qRIXS_ROUGH_VRC_02.iq_stValve, i_stPump:=qRIXS_SC_PTM_20.iq_stPTM, tDelay:=T#200S, bILK=>);
qRIXS_SC_PTM_20(i_xExtIlkOK:=(*qRIXS_SC_PTM_20_ILK.bILK
AND *)F_TurboExtILKLogic_2(Turbo:=qRIXS_SC_PTM_20.iq_stPTM,BackingGauge:=qRIXS_ROUGH_GPI_02.PG, InletGauge:=qRIXS_SSL_GCP_20.PG, ScrollPump:= qRIXS_PRO_01.stPump) );
qRIXS_SC_PTM_30(i_xExtIlkOK:=TRUE);
//qRIXS_SC_PTM_30_ILK(i_stValve:=qRIXS_ROUGH_VRC_02.iq_stValve, i_stPump:=qRIXS_SC_PTM_30.iq_stPTM, tDelay:=T#200S, bILK=>);
qRIXS_SC_PTM_30(i_xExtIlkOK:=(*qRIXS_SC_PTM_30_ILK.bILK
AND*) F_TurboExtILKLogic_2(Turbo:=qRIXS_SC_PTM_30.iq_stPTM,BackingGauge:=qRIXS_ROUGH_GPI_02.PG, InletGauge:=qRIXS_SSL_GCP_30.PG, ScrollPump:= qRIXS_PRO_01.stPump) );
]]></ST>
</Implementation>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TcSmItem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.beckhoff.com/schemas/2012/07/TcSmItem" TcSmVersion="1.0" TcVersion="3.1.4022.30" ClassName="CDevEtherCATDef" SubType="111">
<Device Id="1" DevType="111" DevFlags="#x0003" AmsPort="28673" AmsNetId="172.21.140.43.2.1" RemoteName="Device 1 (EtherCAT)">
<Device Id="1" DevType="111" DevFlags="#x0003" AmsPort="28673" AmsNetId="0.0.0.0.2.1" RemoteName="Device 1 (EtherCAT)">
<Name>__FILENAME__</Name>
<AddressInfo>
<Ccat>
Expand Down
Loading

0 comments on commit 2b5a4db

Please sign in to comment.