Skip to content

Commit

Permalink
Dev: Adding devices and inl for PTM with rough VRC
Browse files Browse the repository at this point in the history
  • Loading branch information
ghalym committed Apr 19, 2024
1 parent c286fd5 commit 9ee889b
Show file tree
Hide file tree
Showing 9 changed files with 377 additions and 369 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ qRIXS_SSL_GCP_20: FB_972;
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[EL3174-0002_01_24]^AI Standard Channel 2^Value'}
qRIXS_SSL_GCP_30: FB_972;
{attribute 'pytmc' := ' pv: QRIXS:SDS:GCP:01 '}
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[EL3174-0002_02_13]^AI Standard Channel 1^Value'}
qRIXS_SDS_GCP_01 : FB_972;
//MKS-275

Check warning on line 66 in lcls-plc-qrix-vac/lcls-plc-qrix-vac/PLC_QRIX_VAC/GVLs/GVL_Devices.TcGVL

View workflow job for this annotation

GitHub Actions / standard / Style check / Trailing whitespace

Trailing whitespace
{attribute 'pytmc' := ' pv: QRIXS:ROUGH:GPI:03 '}
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[EL3174-0002_02_13]^AI Standard Channel 2^Value'}
qRIXS_ROUGH_GPI_03 : FB_MKS275;
{attribute 'pytmc' := ' pv: QRIXS:ROUGH:GPI:04 '}
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[EL3174-0002_02_13]^AI Standard Channel 3^Value'}
qRIXS_ROUGH_GPI_04 : FB_MKS275;
{attribute 'pytmc' := ' pv: QRIXS:SDS:GPI:01 '}
{attribute 'TcLinkTo' := '.i_iPRESS_R := TIIB[EL3174-0002_02_13]^AI Standard Channel 1^Value'}
qRIXS_SDS_GPI_01 : FB_MKS275;
Expand Down Expand Up @@ -138,12 +138,7 @@ qRIXS_SC_VRC_20 : FB_VRC;
'}
{attribute 'pytmc' := ' pv: QRIX:SC:VRC:30 '}
qRIXS_SC_VRC_30 : FB_VRC;
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[EL1004_01_09]^Channel 1^Input;
.i_xClsLS := TIIB[EL1004_01_09]^Channel 2^Input;
.q_xOPN_DO := TIIB[EL2004_01_10]^Channel 1^Output
'}
{attribute 'pytmc' := ' pv: QRIX:SC:VRC:31 '}
qRIXS_SC_VRC_31 : FB_VRC;
//VGC
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[EL1004_01_07]^Channel 3^Input;
.i_xClsLS := TIIB[EL1004_01_07]^Channel 4^Input;
Expand All @@ -166,13 +161,14 @@ qRIXS_SC_VGC_02 : FB_VGC;
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[EL1004_01_03]^Channel 3^Input;
.i_xClsLS := TIIB[EL1004_01_03]^Channel 4^Input;
.q_xOPN_DO := TIIB[EL2004_01_02]^Channel 4^Output;
.q_xCls_DO := TIIB[EL2004_01_02]^Channel 3^Output
.q_xCls_DO := TIIB[EL2004_01_10]^Channel 1^Output
'}
{attribute 'pytmc' := '
pv: QRIX:SC:VGC:03
io: io
'}
qRIXS_SC_VGC_03 : FB_VGC;
qRIXS_SC_VGC_03 : FB_VRC_DA;
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[EL1004_01_05]^Channel 1^Input;
.i_xClsLS := TIIB[EL1004_01_05]^Channel 2^Input;
.q_xOPN_DO := TIIB[EL2004_01_04]^Channel 1^Output

Check warning on line 174 in lcls-plc-qrix-vac/lcls-plc-qrix-vac/PLC_QRIX_VAC/GVLs/GVL_Devices.TcGVL

View workflow job for this annotation

GitHub Actions / standard / Style check / Trailing whitespace

Trailing whitespace
Expand All @@ -182,15 +178,10 @@ qRIXS_SC_VGC_04 : FB_VGC;
{attribute 'pytmc' := ' pv: QRIXS:SC:VGC:05 '}
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[EL1004_01_05]^Channel 3^Input;
.i_xClsLS := TIIB[EL1004_01_05]^Channel 4^Input;
.q_xOPN_DO := TIIB[EL2004_01_04]^Channel 2^Output
.q_xCLS_DO := TIIB[EL2004_01_04]^Channel 2^Output
'}
qRIXS_SC_VGC_05 : FB_VGC;
//VVC
{attribute 'TcLinkTo' := '.q_xOPN_DO := TIIB[qRIXS_PNL1_E1_EL1004]^Channel 1^Input }
{attribute 'pytmc' := ' pv: QRIXS:SC:VVC:01 '}
qRIXS_SC_VVC_01 : FB_VVC;
{attribute 'pytmc' := ' pv: QRIXS:SC:VVC:02 '}
qRIXS_SC_VVC_02 : FB_VVC;
qRIXS_SC_VGC_05 : FB_VRC_NO;
//PTM
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[EL1004_01_13]^Channel 1^Input;
.i_xFaultNC := TIIB[EL1004_01_13]^Channel 3^Input;
Expand Down Expand Up @@ -270,11 +261,10 @@ qRIXS_SC_PTM_20 : FB_PTM_Pfeiffer;
'}
qRIXS_SC_PTM_30 : FB_PTM_Pfeiffer;
//PTM- Turbo Pump
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[qRIXS_PLC_EP01_EP2338-0002]^Channel 1^Input;
.i_xFaultNC := TIIB[qRIXS_PLC_EP01_EP2338-0002]^Channel 2^Input;
.i_xRemote := TIIB[qRIXS_PLC_EP01_EP2338-0002]^Channel 3^Input;
.q_RunDO := TIIB[qRIXS_PLC_EP02_EP2624-0002]^Channel 1^Output;
.q_xReset := TIIB[qRIXS_PLC_EP02_EP2624-0002]^Channel 2^Output
{attribute 'TcLinkTo' := '.i_xAtSpd := TIIB[EL1004_02_08]^Channel 2^Input;
.i_xFaultNC := TIIB[EL1004_02_08]^Channel 1^Input;
.q_RunDO := TIIB[EL2794_02_09]^Channel 1^Output;
.q_xReset := TIIB[EL2794_02_09]^Channel 2^Output
'}
{attribute 'pytmc' := '
pv: QRIXS:SDS:PTM:10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ VAR_GLOBAL
pv: QRIXS:BLW:VRC:01
io: io
'}
qRIXS_SA_VWC_01: FB_VRC;
qRIXS_SA_VWC_01: FB_VGC;
{attribute 'TcLinkTo' := '.i_xOpnLS := TIIB[qRIXS_PNL1_E2_EL1004]^Channel 1^Input;
.i_xClsLS := TIIB[qRIXS_PNL1_E2_EL1004]^Channel 2^Input;
Expand Down
365 changes: 182 additions & 183 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 @@ -9,8 +9,8 @@ END_VAR
<ST><![CDATA[///Calling programs
PRG_Roughing();
PRG_SampleChamber();
PRG_SA_WINDOW();
//PRG_SDS();
//PRG_SA_WINDOW();
PRG_SDS();
PRG_SPA();
PRG_2_PMPS();
PRG_3_LOG();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ qRIXS_SC_VGC_04(
);
qRIXS_SA_VRC_01(
qRIXS_SC_VGC_05(
i_xExtILK_OK:= ,
i_xOverrideMode:= ,
iq_stValve=> ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,15 @@
<POU Name="PRG_SDS" Id="{c071bd61-3fce-43c9-a399-7bab2178258d}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM PRG_SDS
VAR
QRIX_MOT_SDS_MMS_H_BACKWARD_EN: INT;
rPressSP : REAL := 0.0001;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[
//MKS 275 Gauges
fb_QRIX_SDS_GPI_01(PG=>);
fb_QRIX_ROUGH_GPI_03(PG=>);
fb_QRIX_ROUGH_GPI_04(PG=>);
//MKS Gauges
qRIXS_SDS_GCP_01(PG=>);
//VVC
fb_QRIX_SDS_VVC_01(i_xExtILK_OK := TRUE, i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
fb_QRIX_SDS_VVC_02(i_xExtILK_OK := TRUE, i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
//VRC
(*fb_QRIX_SDS_VRC_01(i_xOverrideMode := xSystemOverrideMode, iq_stValve =>);
Expand All @@ -23,7 +20,18 @@ fb_QRIX_SDS_VRC_01.i_xExtILK_OK := F_TurboGateValve_Protection_ILK( i_Turbo := Q
ScrollPump := fb_QRIX_PRO_01 );
*)
]]></ST>
qRIXS_SDS_PTM_10(i_xExtIlkOK:= qRIXS_ROUGH_VRC_01.M_IsOpen()
AND F_TurboExtILKLogic_2(Turbo:=qRIXS_SDS_PTM_10.iq_stPTM,BackingGauge:=qRIXS_ROUGH_GPI_02.PG, InletGauge:=qRIXS_SDS_GCP_01.PG, ScrollPump:= qRIXS_PRO_01.stPump) );
qRIXS_SC_VGC_03(
i_OPN_OK:= qRIXS_SDS_GCP_01.PG.rPRESS > rPressSP, // need to get requirements on this interlock
i_CLS_OK:= GVL_Interface.QRIX_MOT_SDS_MMS_H_BACKWARD_EN AND NOT (GVL_Interface.QRIX_MOT_SDS_MMS_H_FORWARD_EN ),
ibCntrlHold:= ,
i_xOverrideMode:= ,
iq_stValve=> );]]></ST>
</Implementation>
</POU>
</TcPlcObject>
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,24 @@ END_VAR
// (*
// Calc pressure Difference
xExtILK_OK_BLW := ( qRIXS_OPT_VGC_01.iq_stValve.i_xClsLS AND qRIXS_OPT_GPI_01.PG.xPRESS_OK AND qRIXS_SA_GCP_01.PG.xPRESS_OK AND (qRIXS_OPT_GPI_01.PG.rPRESS - qRIXS_SA_GCP_01.PG.rPRESS) < iPressTorrerance)
OR (qRIXS_OPT_GCC_01.IG.xPRESS_OK AND qRIXS_SA_GCP_01.PG.xPRESS_OK AND (qRIXS_OPT_GCC_01.IG.rPRESS - qRIXS_SA_GCP_01.PG.rPRESS) < iPressTorrerance);
OR (qRIXS_OPT_GCC_01.IG.xPRESS_OK AND qRIXS_SA_GCP_01.PG.xPRESS_OK AND (qRIXS_OPT_GCC_01.IG.rPRESS - qRIXS_SA_GCP_01.PG.rPRESS) < iPressTorrerance);
qRIXS_SA_VWC_01(
i_xExtILK_OK := xExtILK_OK_BLW,
i_xOverrideMode:=xSystemOverrideMode,
iq_stValve =>
i_stUSG:= qRIXS_SA_GCP_01.PG ,
i_stDSG:= qRIXS_OPT_GCC_01.IG ,
i_xDis_DPIlk:= FALSE ,
i_xPMPS_OK:= TRUE ,
i_xEPS_OK:= ,
i_xExt_OK:= xExtILK_OK_BLW ,
i_xOverrideMode:= ,
i_xReset:= ,
i_xIsAperture:= TRUE,
i_sDevName:= ,
i_nTransitionRootID:= ,
iq_stValve=> ,
xMPS_OK=> ,
io_fbFFHWO:=GVL_PMPS.fbFastFaultOutput1 ,
fbArbiter:= GVL_PMPS.fbArbiter
);
// *)
// (*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ VAR
iWatchdog: UDINT;
RIX_TV4K2_GFS_1:FB_TGCC_ADS;
RIX_IM5K2_PPM_GCC_1:FB_TGCC_ADS;
RIX_VAC_WD: FB_ADS_WATCHDOG;
//PTM interlocks
qRIXS_SC_PTM_10_ILK : FB_ChemRIXS_Turbo_ILK;
Expand All @@ -30,6 +31,9 @@ RIX_IM5K2_PPM_GCC_1(
iWatchdog:= iWatchdog ,
IG=> ,
bError=> );
RIX_VAC_WD(sNetId:= '172.21.140.69.1.1', nPort:=851 , sVarName:= 'PRG_KFE_RIX_VAC.iWatchdog', bError=> );
//MKS 275 Gauges
qRIXS_SC_GPI_01.M_SetBits(30518);
Expand All @@ -46,22 +50,16 @@ qRIXS_SSL_GCP_20.M_SetBits(30518);
qRIXS_SSL_GCP_20();
qRIXS_SSL_GCP_30.M_SetBits(30518);
qRIXS_SSL_GCP_30();
qRIXS_SA_GCP_02.M_SetBits(30518);
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);
//Pfiffer Turbo
//VVC
qRIXS_SC_VVC_01.i_xExtILK_OK := qRIXS_SC_PTM_10.iq_stPTM.eState = E_PumpState.pumpSTOPPED
AND qRIXS_SC_PTM_20.iq_stPTM.eState = E_PumpState.pumpSTOPPED
AND qRIXS_SC_PTM_30.iq_stPTM.eState = E_PumpState.pumpSTOPPED;
qRIXS_SC_VVC_01(i_xExtILK_OK := , i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
qRIXS_SC_VVC_02.i_xExtILK_OK := qRIXS_SC_PTM_10.iq_stPTM.eState = E_PumpState.pumpSTOPPED
AND qRIXS_SC_PTM_20.iq_stPTM.eState = E_PumpState.pumpSTOPPED
AND qRIXS_SC_PTM_30.iq_stPTM.eState = E_PumpState.pumpSTOPPED;
qRIXS_SC_VVC_02(i_xExtILK_OK := , i_xOverrideMode := xSystemOverrideMode, iq_stValve => );
//VGC Valves
///VGC on Beamline
Expand Down Expand Up @@ -126,16 +124,16 @@ qRIXS_SC_VRC_30(i_xOverrideMode:=xSystemOverrideMode , iq_stValve=> );
//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_10(i_xExtIlkOK:= qRIXS_ROUGH_VRC_02.M_IsOpen()
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_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_20(i_xExtIlkOK:= qRIXS_ROUGH_VRC_02.M_IsOpen()
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_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) );
qRIXS_SC_PTM_30(i_xExtIlkOK:= qRIXS_ROUGH_VRC_02.M_IsOpen()
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) );
//Pfeiffer Turbo Serial
Expand Down
Loading

0 comments on commit 9ee889b

Please sign in to comment.