Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Flow Meter for Imagers IM3/4/5/6K4 #94

Merged
merged 2 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 54 additions & 27 deletions plc-tmo-motion/_Config/PLC/tmo_motion.xti
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,10 @@ External Setpoint Generation:
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_IM2K4_PPM.fbIM2K4.fbFlowMeter.fRaw</Name>
<Name>PRG_IM2K4_PPM.fbIM2K4.fbFlowMeter.iRaw</Name>
<Comment>
<![CDATA[ Connect this input to the terminal]]>
</Comment>
<Type>INT</Type>
</Var>
<Var>
Expand Down Expand Up @@ -1429,7 +1432,10 @@ External Setpoint Generation:
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_IM3K4_PPM.fbIM3K4.fbFlowMeter.fRaw</Name>
<Name>PRG_IM3K4_PPM.fbIM3K4.fbFlowMeter.iRaw</Name>
<Comment>
<![CDATA[ Connect this input to the terminal]]>
</Comment>
<Type>INT</Type>
</Var>
<Var>
Expand Down Expand Up @@ -1532,7 +1538,10 @@ External Setpoint Generation:
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_IM4K4_PPM.fbIM4K4.fbFlowMeter.fRaw</Name>
<Name>PRG_IM4K4_PPM.fbIM4K4.fbFlowMeter.iRaw</Name>
<Comment>
<![CDATA[ Connect this input to the terminal]]>
</Comment>
<Type>INT</Type>
</Var>
<Var>
Expand Down Expand Up @@ -1635,7 +1644,10 @@ External Setpoint Generation:
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_IM5K4_PPM.fbIM5K4.fbFlowMeter.fRaw</Name>
<Name>PRG_IM5K4_PPM.fbIM5K4.fbFlowMeter.iRaw</Name>
<Comment>
<![CDATA[ Connect this input to the terminal]]>
</Comment>
<Type>INT</Type>
</Var>
<Var>
Expand Down Expand Up @@ -1738,7 +1750,10 @@ External Setpoint Generation:
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_IM6K4_PPM.fbIM6K4.fbFlowMeter.fRaw</Name>
<Name>PRG_IM6K4_PPM.fbIM6K4.fbFlowMeter.iRaw</Name>
<Comment>
<![CDATA[ Connect this input to the terminal]]>
</Comment>
<Type>INT</Type>
</Var>
<Var>
Expand Down Expand Up @@ -2284,14 +2299,6 @@ External Setpoint Generation:
</Comment>
</SubVar>
</Var>
<Var>
<Name>PRG_SP1K4.bHallInput1</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bHallInput2</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SL2K4_SCATTER.fbSL2K4.fbTopBlade.fbDriveVirtual.MasterAxis.NcToPlc</Name>
<Type GUID="{6A65C767-34E5-42BF-AD87-E1A503EAC7BE}" Namespace="MC">NCTOPLC_AXIS_REF</Type>
Expand Down Expand Up @@ -2510,6 +2517,22 @@ External Setpoint Generation:
</Comment>
</SubVar>
</Var>
<Var>
<Name>PRG_SP1K4.bHallInput1</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bHallInput2</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bTL1High</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bTL1Low</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_ST4K4_TMO_TERM.ST4K4.i_xInsertedLS</Name>
<Comment>
Expand All @@ -2522,11 +2545,11 @@ External Setpoint Generation:
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bTL1High</Name>
<Name>PRG_SP1K4.bTL2High</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bTL1Low</Name>
<Name>PRG_SP1K4.bTL2Low</Name>
<Type>BOOL</Type>
</Var>
<Var>
Expand Down Expand Up @@ -2643,14 +2666,6 @@ External Setpoint Generation:
<Name>PRG_TM1K4.fbTM1K4.fbThermoCouple1.iRaw</Name>
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bTL2High</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_SP1K4.bTL2Low</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_TM2K4.fbTM2K4.fbYStage.fbDriveVirtual.MasterAxis.NcToPlc</Name>
<Type GUID="{6A65C767-34E5-42BF-AD87-E1A503EAC7BE}" Namespace="MC">NCTOPLC_AXIS_REF</Type>
Expand Down Expand Up @@ -8799,6 +8814,10 @@ External Setpoint Generation:
<Name>GVL_PMPS.PMPS_ST4K4_IN</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_PMPS.PMPS_ST4K4_OUT</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_3_PMPS_POST.fbArbiterIO.q_stRequestedBP</Name>
<Type GUID="{292CD354-C7C0-4A61-AAD0-1C85DD69646B}">ST_BeamParams_IO</Type>
Expand Down Expand Up @@ -8937,10 +8956,6 @@ External Setpoint Generation:
<Name>GVL_PMPS.fbFastFaultOutput2.q_xFastFaultOut</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>GVL_PMPS.PMPS_ST4K4_OUT</Name>
<Type>BOOL</Type>
</Var>
<Var>
<Name>Main.M1.Axis.PlcToNc</Name>
<Type GUID="{63A84524-72E3-41C8-BEAB-4CCE44690A13}" Namespace="MC">PLCTONC_AXIS_REF</Type>
Expand Down Expand Up @@ -9530,6 +9545,9 @@ External Setpoint Generation:
<Link VarA="PlcTask Outputs^Main.M15.bBrakeRelease" VarB="Channel 1^Output" AutoLink="true"/>
<Link VarA="PlcTask Outputs^PRG_IM3K4_PPM.fbIM3K4.fbGige.bGigePower" VarB="Channel 2^Output" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 1(EK1100)^PLC Junction 5 (EK1122)^IM3K4-PPM (EK1100)^IM3K4-EL3052-E5">
<Link VarA="PlcTask Inputs^PRG_IM3K4_PPM.fbIM3K4.fbFlowMeter.iRaw" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 1(EK1100)^PLC Junction 5 (EK1122)^IM3K4-PPM (EK1100)^IM3K4-EL3062-E6">
<Link VarA="PlcTask Inputs^PRG_IM3K4_PPM.fbIM3K4.fbPowerMeter.iVoltageINT" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
Expand Down Expand Up @@ -9557,6 +9575,9 @@ External Setpoint Generation:
<Link VarA="PlcTask Outputs^Main.M16.bBrakeRelease" VarB="Channel 1^Output" AutoLink="true"/>
<Link VarA="PlcTask Outputs^PRG_IM4K4_PPM.fbIM4K4.fbGige.bGigePower" VarB="Channel 2^Output" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 1(EK1100)^PLC Junction 5 (EK1122)^IM4K4-PPM (EK1100)^IM4K4-EL3052-E5">
<Link VarA="PlcTask Inputs^PRG_IM4K4_PPM.fbIM4K4.fbFlowMeter.iRaw" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 1(EK1100)^PLC Junction 5 (EK1122)^IM4K4-PPM (EK1100)^IM4K4-EL3062-E6">
<Link VarA="PlcTask Inputs^PRG_IM4K4_PPM.fbIM4K4.fbPowerMeter.iVoltageINT" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
Expand Down Expand Up @@ -9615,6 +9636,9 @@ External Setpoint Generation:
<Link VarA="PlcTask Outputs^Main.M27.bBrakeRelease" VarB="Channel 1^Output" AutoLink="true"/>
<Link VarA="PlcTask Outputs^PRG_IM6K4_PPM.fbIM6K4.fbGige.bGigePower" VarB="Channel 2^Output" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 2 (EK1100)^PLC Junction 10 (EK1122)^Granite3 (EK1100)^PLC Junction 12 (EK1122)^IM6K4 (EK1100)^IM6K4-EL3052-E5">
<Link VarA="PlcTask Inputs^PRG_IM6K4_PPM.fbIM6K4.fbFlowMeter.iRaw" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 2 (EK1100)^PLC Junction 10 (EK1122)^Granite3 (EK1100)^PLC Junction 12 (EK1122)^IM6K4 (EK1100)^IM6K4-EL3062-E6">
<Link VarA="PlcTask Inputs^PRG_IM6K4_PPM.fbIM6K4.fbPowerMeter.iVoltageINT" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
Expand Down Expand Up @@ -9697,6 +9721,9 @@ External Setpoint Generation:
<Link VarA="PlcTask Outputs^Main.M17.bBrakeRelease" VarB="Channel 1^Output" AutoLink="true"/>
<Link VarA="PlcTask Outputs^PRG_IM5K4_PPM.fbIM5K4.fbGige.bGigePower" VarB="Channel 2^Output" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 2 (EK1100)^PLC Junction 8 (EK1122)^IM5K4-PPM (EK1100)^IM5K4-EL3052-E5">
<Link VarA="PlcTask Inputs^PRG_IM5K4_PPM.fbIM5K4.fbFlowMeter.iRaw" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
<OwnerB Name="TIID^Device 1 (EtherCAT)^Power (EK1200)^PLC Junction 2 (EK1122)^PLC Coupler 2 (EK1100)^PLC Junction 8 (EK1122)^IM5K4-PPM (EK1100)^IM5K4-EL3062-E6">
<Link VarA="PlcTask Inputs^PRG_IM5K4_PPM.fbIM5K4.fbPowerMeter.iVoltageINT" VarB="AI Standard Channel 1^Value" AutoLink="true"/>
</OwnerB>
Expand Down
3 changes: 2 additions & 1 deletion plc-tmo-motion/tmo_motion/POUs/PRG_IM3K4_PPM.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ VAR
.fbYagThermoCouple.bError := TIIB[IM3K4-EL3314-E4]^TC Inputs Channel 2^Status^Error;
.fbYagThermoCouple.bUnderrange := TIIB[IM3K4-EL3314-E4]^TC Inputs Channel 2^Status^Underrange;
.fbYagThermoCouple.bOverrange := TIIB[IM3K4-EL3314-E4]^TC Inputs Channel 2^Status^Overrange;
.fbYagThermoCouple.iRaw := TIIB[IM3K4-EL3314-E4]^TC Inputs Channel 2^Value'}
.fbYagThermoCouple.iRaw := TIIB[IM3K4-EL3314-E4]^TC Inputs Channel 2^Value;
.fbFlowMeter.iRaw := TIIB[IM3K4-EL3052-E5]^AI Standard Channel 1^Value'}
fbIM3K4: FB_PPM;
fStartupVelo: LREAL := 12;
END_VAR
Expand Down
4 changes: 3 additions & 1 deletion plc-tmo-motion/tmo_motion/POUs/PRG_IM4K4_PPM.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ VAR
.fbYagThermoCouple.bError := TIIB[IM4K4-EL3314-E4]^TC Inputs Channel 2^Status^Error;
.fbYagThermoCouple.bUnderrange := TIIB[IM4K4-EL3314-E4]^TC Inputs Channel 2^Status^Underrange;
.fbYagThermoCouple.bOverrange := TIIB[IM4K4-EL3314-E4]^TC Inputs Channel 2^Status^Overrange;
.fbYagThermoCouple.iRaw := TIIB[IM4K4-EL3314-E4]^TC Inputs Channel 2^Value'}
.fbYagThermoCouple.iRaw := TIIB[IM4K4-EL3314-E4]^TC Inputs Channel 2^Value;
.fbFlowMeter.iRaw := TIIB[IM4K4-EL3052-E5]^AI Standard Channel 1^Value'}
fbIM4K4: FB_PPM;
fStartupVelo: LREAL := 15;
END_VAR
Expand Down Expand Up @@ -60,6 +61,7 @@ fbIM4K4(
stYStage := Main.M16,
sPmpsDeviceName := 'IM4K4:PPM',
sTransitionKey := 'IM4K4:PPM-TRANSITION',
fFlowOffset := 0.4
);]]></ST>
</Implementation>
</POU>
Expand Down
4 changes: 3 additions & 1 deletion plc-tmo-motion/tmo_motion/POUs/PRG_IM5K4_PPM.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ VAR
.fbYagThermoCouple.bError := TIIB[IM5K4-EL3314-E4]^TC Inputs Channel 2^Status^Error;
.fbYagThermoCouple.bUnderrange := TIIB[IM5K4-EL3314-E4]^TC Inputs Channel 2^Status^Underrange;
.fbYagThermoCouple.bOverrange := TIIB[IM5K4-EL3314-E4]^TC Inputs Channel 2^Status^Overrange;
.fbYagThermoCouple.iRaw := TIIB[IM5K4-EL3314-E4]^TC Inputs Channel 2^Value'}
.fbYagThermoCouple.iRaw := TIIB[IM5K4-EL3314-E4]^TC Inputs Channel 2^Value;
.fbFlowMeter.iRaw := TIIB[IM5K4-EL3052-E5]^AI Standard Channel 1^Value'}
fbIM5K4: FB_PPM;
fStartupVelo: LREAL := 12;
END_VAR
Expand Down Expand Up @@ -55,6 +56,7 @@ fbIM5K4(
stYStage := Main.M17,
sPmpsDeviceName := 'IM5K4:PPM',
sTransitionKey := 'IM5K4:PPM-TRANSITION',
fFlowOffset := 0.8,

);]]></ST>
</Implementation>
Expand Down
4 changes: 3 additions & 1 deletion plc-tmo-motion/tmo_motion/POUs/PRG_IM6K4_PPM.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ VAR
.fbYagThermoCouple.bError := TIIB[IM6K4-EL3314-E4]^TC Inputs Channel 2^Status^Error;
.fbYagThermoCouple.bUnderrange := TIIB[IM6K4-EL3314-E4]^TC Inputs Channel 2^Status^Underrange;
.fbYagThermoCouple.bOverrange := TIIB[IM6K4-EL3314-E4]^TC Inputs Channel 2^Status^Overrange;
.fbYagThermoCouple.iRaw := TIIB[IM6K4-EL3314-E4]^TC Inputs Channel 2^Value'}
.fbYagThermoCouple.iRaw := TIIB[IM6K4-EL3314-E4]^TC Inputs Channel 2^Value;
.fbFlowMeter.iRaw := TIIB[IM6K4-EL3052-E5]^AI Standard Channel 1^Value'}
fbIM6K4: FB_PPM;
fStartupVelo: LREAL := 13;
END_VAR
Expand Down Expand Up @@ -54,6 +55,7 @@ fbIM6K4(
stYStage := Main.M27,
sPmpsDeviceName := 'IM6K4:PPM',
sTransitionKey := 'IM6K4:PPM-TRANSITION',
fFlowOffset := 0.6,
);]]></ST>
</Implementation>
</POU>
Expand Down
4 changes: 2 additions & 2 deletions plc-tmo-motion/tmo_motion/tmo_motion.plcproj
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@
</ItemGroup>
<ItemGroup>
<PlaceholderResolution Include="LCLS General">
<Resolution>LCLS General, 2.8.2 (SLAC)</Resolution>
<Resolution>LCLS General, 2.9.0 (SLAC)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="lcls-twincat-motion">
<Resolution>lcls-twincat-motion, 3.0.1 (SLAC)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="lcls2-cc-lib">
<Resolution>lcls2-cc-lib, 2.0.0 (SLAC)</Resolution>
<Resolution>lcls2-cc-lib, 2.1.0 (SLAC)</Resolution>
</PlaceholderResolution>
<PlaceholderResolution Include="PMPS">
<Resolution>PMPS, 3.0.14 (SLAC - LCLS)</Resolution>
Expand Down
Loading