Skip to content

Commit

Permalink
ENH: add SL1K2 flow meter
Browse files Browse the repository at this point in the history
  • Loading branch information
nrwslac committed Jan 12, 2024
1 parent 7ef8c9c commit 2024f8b
Show file tree
Hide file tree
Showing 6 changed files with 94,136 additions and 947 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<Box File="EL3201_SL1K2_4.xti" Id="137">
<EtherCAT PortABoxInfo="#x01000088"/>
</Box>
<Box File="EL3052_SL1K2_FSW.xti" Id="227">
<Box File="EL3052_SL1K2_FWM.xti" Id="227">
<EtherCAT PortABoxInfo="#x01000089"/>
</Box>
<Box File="EL2004_SL1K2.xti" Id="138">
Expand Down
14 changes: 11 additions & 3 deletions lcls-plc-rixs-optics/_Config/PLC/rixs_optics.xti
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ External Setpoint Generation:
</DataType>
</DataTypes>
<Project GUID="{85BF455D-934D-415A-B04C-6D4CDD9FF10E}" Name="rixs_optics" PrjFilePath="..\..\rixs_optics\rixs_optics.plcproj" TmcFilePath="..\..\rixs_optics\rixs_optics.tmc" ReloadTmc="true" AmsPort="851" FileArchiveSettings="#x000e" SymbolicMapping="true">
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcPath="rixs_optics\rixs_optics.tmc" TmcHash="{BE74D994-8405-B176-63D0-EECA3F3D4747}">
<Instance Id="#x08502000" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcPath="rixs_optics\rixs_optics.tmc" TmcHash="{C3E2DF4B-9CE9-E69A-84A0-456E54356917}">
<Name>rixs_optics Instance</Name>
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
<Vars VarGrpType="1">
Expand Down Expand Up @@ -1845,6 +1845,11 @@ Emergency Stop for MR1K1]]></Comment>
<Comment><![CDATA[ Connect this input to the terminal]]></Comment>
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_SL1K2_EXIT.fbFlowMeter.iRaw</Name>
<Comment><![CDATA[ Connect this input to the terminal]]></Comment>
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_ST1K1_ZOS.fbZOS.fbDriveVirtual.MasterAxis.NcToPlc</Name>
<Type GUID="{25521FAA-EA5F-4C7F-8864-BBCCDACD2E98}" Namespace="MC">NCTOPLC_AXIS_REF</Type>
Expand Down Expand Up @@ -4298,6 +4303,9 @@ Emergency Stop for MR1K1]]></Comment>
<Link VarA="PlcTask Outputs^PRG_SL1K2_EXIT.bLEDPower" VarB="Channel 2^Output" AutoLink="true" Size="1"/>
<Link VarA="PlcTask Outputs^PRG_SL1K2_EXIT.fbGige.bGigePower" VarB="Channel 3^Output" AutoLink="true" Size="1"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Term 1 (EK1200)^E5 (EK1122)^SL1K2-EXIT (EK1100)^EL3052_SL1K2_FWM">
<Link VarA="PlcTask Inputs^PRG_SL1K2_EXIT.fbFlowMeter.iRaw" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Term 1 (EK1200)^E5 (EK1122)^SL1K2-EXIT (EK1100)^EL3201_SL1K2_1">
<Link VarA="PlcTask Inputs^PRG_SL1K2_EXIT.RTD_Crystal_TOP.bError" VarB="RTD^Status^Error" AutoLink="true" Size="1"/>
<Link VarA="PlcTask Inputs^PRG_SL1K2_EXIT.RTD_Crystal_TOP.bOverrange" VarB="RTD^Status^Overrange" AutoLink="true" Size="1"/>
Expand Down Expand Up @@ -4337,8 +4345,8 @@ Emergency Stop for MR1K1]]></Comment>
<Link VarA="PlcTask Inputs^Main.M23.nRawEncoderULINT" VarB="FB Inputs Channel 1^Position" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Term 1 (EK1200)^E5 (EK1122)^SL1K2-EXIT (EK1100)^EL7047_SL1K2_GAP">
<Link VarA="PlcTask Inputs^Main.M22.bLimitBackwardEnable" VarB="STM Status^Status^Digital input 1" AutoLink="true" Size="1"/>
<Link VarA="PlcTask Inputs^Main.M22.bLimitForwardEnable" VarB="STM Status^Status^Digital input 2" AutoLink="true" Size="1"/>
<Link VarA="PlcTask Inputs^Main.M22.bLimitBackwardEnable" VarB="STM Status^Status^Digital input 2" AutoLink="true" Size="1"/>
<Link VarA="PlcTask Inputs^Main.M22.bLimitForwardEnable" VarB="STM Status^Status^Digital input 1" AutoLink="true" Size="1"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Term 1 (EK1200)^E5 (EK1122)^SL1K2-EXIT (EK1100)^EL7047_SL1K2_PITCH">
<Link VarA="PlcTask Inputs^Main.M19.bLimitBackwardEnable" VarB="STM Status^Status^Digital input 1" AutoLink="true" Size="1"/>
Expand Down
2 changes: 1 addition & 1 deletion lcls-plc-rixs-optics/lcls-plc-rixs-optics.tsproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<ManualSelect>{BF78CFC7-2E63-42C3-8C07-BB6C346BFB8B}</ManualSelect>
<ManualSelect>{3EBB9639-5FF3-42B6-8847-35C70DC013C8}</ManualSelect>
<TargetSelect TargetId="2">{BF78CFC7-2E63-42C3-8C07-BB6C346BFB8B}</TargetSelect>
<TargetSelect TargetId="2">{66689887-CCBD-452C-AC9A-039D997C6E66}</TargetSelect>
<TargetSelect TargetId="2">{BCA6EE0A-9CE1-4D3F-98CA-413ABC0D94FD}</TargetSelect>
<TargetSelect TargetId="2">{66689887-CCBD-452C-AC9A-039D997C6E66}</TargetSelect>
<TargetSelect TargetId="2">{3EBB9639-5FF3-42B6-8847-35C70DC013C8}</TargetSelect>
<TargetSelect TargetId="2">{777F1598-583B-4503-99BB-7C02E0ABD97E}</TargetSelect>
<TargetSelect TargetId="2">{520DE751-9DB6-47CB-8240-BD5C466E7E64}</TargetSelect>
Expand Down
9 changes: 8 additions & 1 deletion lcls-plc-rixs-optics/rixs_optics/POUs/PRG_SL1K2_EXIT.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ VAR
.bGigePower := TIIB[EL2004_SL1K2]^Channel 3^Output'}
fbGige: FB_PPM_Gige;
{attribute 'pytmc' :='pv: SL1K2:EXIT:FWM'}
{attribute 'TcLinkTo' := '.iRaw := TIIB[EL3052_SL1K2_FWM]^AI Standard Channel 1^Value'}
fbFlowMeter: FB_AnalogInput := (iTermBits:=15, fTermMax:=60, fTermMin:=0);
bInit : BOOL:=TRUE;
(*Motion Parameters*)
Expand Down Expand Up @@ -174,7 +178,10 @@ fbGige();
RTD_Crystal_TOP(fResolution:=0.01);
RTD_Crystal_BOTTOM(fResolution:=0.01);
RTD_YAG(fResolution:=0.01);
RTD_HeatSync(fResolution:=0.01);]]></ST>
RTD_HeatSync(fResolution:=0.01);
//Cooling
fbFlowMeter();]]></ST>
</Implementation>
</POU>
</TcPlcObject>
Loading

0 comments on commit 2024f8b

Please sign in to comment.