Skip to content

Commit

Permalink
Merge pull request #38 from ghalym/SPO
Browse files Browse the repository at this point in the history
ENH: The new SPO FFaults evaluates the bender range.
  • Loading branch information
ghalym authored Mar 26, 2021
2 parents 9bd9e7d + cd367cd commit 5ac05fb
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 45 deletions.
32 changes: 16 additions & 16 deletions lcls-plc-rixs-optics/_Config/PLC/rixs_optics.xti
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@
</Format>
</DataType>
<DataType>
<Name GUID="{763B62AC-E3AC-443E-BD75-D238A6458348}" Namespace="lcls_twincat_motion" AutoDeleteType="true">EL5042_Status</Name>
<Name GUID="{6DDDB6E4-230F-461C-98E9-FE09EB6E0CFC}" Namespace="lcls_twincat_motion" AutoDeleteType="true">EL5042_Status</Name>
<BitSize>0</BitSize>
<BaseType GUID="{FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF}"/>
<Hides>
<Hide GUID="{636EB87C-05A9-4D99-A11F-3962AB9E960F}"/>
<Hide GUID="{763B62AC-E3AC-443E-BD75-D238A6458348}"/>
</Hides>
</DataType>
<DataType>
<Name GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion" AutoDeleteType="true">ST_RenishawAbsEnc</Name>
<Name GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion" AutoDeleteType="true">ST_RenishawAbsEnc</Name>
<Comment>
<![CDATA[ Renishaw BiSS-C absolute encoder used with an EL5042]]>
</Comment>
Expand All @@ -106,7 +106,7 @@
</SubItem>
<SubItem>
<Name>Status</Name>
<Type GUID="{763B62AC-E3AC-443E-BD75-D238A6458348}" Namespace="lcls_twincat_motion">EL5042_Status</Type>
<Type GUID="{6DDDB6E4-230F-461C-98E9-FE09EB6E0CFC}" Namespace="lcls_twincat_motion">EL5042_Status</Type>
<Comment>
<![CDATA[ Status struct placeholder]]>
</Comment>
Expand All @@ -123,7 +123,7 @@
<BitOffs>64</BitOffs>
</SubItem>
<Hides>
<Hide GUID="{AD0663CC-36C8-4FCF-9A0B-76AB59193420}"/>
<Hide GUID="{C212C34F-7A58-4053-B17F-6665057D8451}"/>
</Hides>
</DataType>
<DataType>
Expand Down Expand Up @@ -1314,7 +1314,7 @@ External Setpoint Generation:
<Comment>
<![CDATA[ Encoders]]>
</Comment>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand All @@ -1336,7 +1336,7 @@ External Setpoint Generation:
</Var>
<Var>
<Name>PRG_MR1K1_BEND.M1K1.fbRunHOMS.stYdwnEnc</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand All @@ -1358,7 +1358,7 @@ External Setpoint Generation:
</Var>
<Var>
<Name>PRG_MR1K1_BEND.M1K1.fbRunHOMS.stXupEnc</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand All @@ -1380,7 +1380,7 @@ External Setpoint Generation:
</Var>
<Var>
<Name>PRG_MR1K1_BEND.M1K1.fbRunHOMS.stXdwnEnc</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand Down Expand Up @@ -1600,7 +1600,7 @@ Emergency Stop for MR1K1]]>
<Comment>
<![CDATA[ Encoders]]>
</Comment>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand All @@ -1622,7 +1622,7 @@ Emergency Stop for MR1K1]]>
</Var>
<Var>
<Name>PRG_MR1K2_SWITCH.M1K2.fbRunHOMS.stYdwnEnc</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand All @@ -1644,7 +1644,7 @@ Emergency Stop for MR1K1]]>
</Var>
<Var>
<Name>PRG_MR1K2_SWITCH.M1K2.fbRunHOMS.stXupEnc</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand All @@ -1666,7 +1666,7 @@ Emergency Stop for MR1K1]]>
</Var>
<Var>
<Name>PRG_MR1K2_SWITCH.M1K2.fbRunHOMS.stXdwnEnc</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand Down Expand Up @@ -2123,7 +2123,7 @@ External Setpoint Generation:
</Var>
<Var>
<Name>PRG_SP1K1_MONO.mpi_upe</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand All @@ -2145,7 +2145,7 @@ External Setpoint Generation:
</Var>
<Var>
<Name>PRG_SP1K1_MONO.gpi_upe</Name>
<Type GUID="{C212C34F-7A58-4053-B17F-6665057D8451}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<Type GUID="{8E2EFB40-61D7-46CF-8D5D-253EC63308EE}" Namespace="lcls_twincat_motion">ST_RenishawAbsEnc</Type>
<SubVar>
<Name>Count</Name>
<Comment>
Expand Down Expand Up @@ -6352,8 +6352,8 @@ External Setpoint Generation:
</UnrestoredVarLinks>
<TaskPouOids>
<TaskPouOid Prio="1" OTCID="#x08502001"/>
<TaskPouOid Prio="3" OTCID="#x08502002"/>
<TaskPouOid Prio="20" OTCID="#x08502003"/>
<TaskPouOid Prio="3" OTCID="#x08502002"/>
</TaskPouOids>
</Instance>
</Project>
Expand Down
12 changes: 6 additions & 6 deletions lcls-plc-rixs-optics/rixs_optics/POUs/PRG_SPO_PMPS.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ END_VAR
<Implementation>
<ST><![CDATA[
//MR1K1 height
ffMR1K1Height.i_xOK := (M12.nEncoderCount > nLowerMR1K1Height ) AND (M12.nEncoderCount < nUpperMR1K1Height );
ffMR1K1Height.i_xOK := PRG_MR1K1_BEND_BENDER.ffBenderRange.i_xOK OR ((M12.nEncoderCount > nLowerMR1K1Height ) AND (M12.nEncoderCount < nUpperMR1K1Height ));
ffMR1K1Height(io_fbFFHWO := GVL_PMPS.fbFastFaultOutput1);
//MR1K1 pitch
ffMR1K1Pitch.i_xOK := (M16.nEncoderCount > nLowerMR1K1Pitch) AND ( M16.nEncoderCount < nUpperMR1K1Pitch);
ffMR1K1Pitch.i_xOK := PRG_MR1K1_BEND_BENDER.ffBenderRange.i_xOK OR ( (M16.nEncoderCount > nLowerMR1K1Pitch) AND ( M16.nEncoderCount < nUpperMR1K1Pitch));
ffMR1K1Pitch(io_fbFFHWO := GVL_PMPS.fbFastFaultOutput1);
//SP1K1 mirror pitch
ffSP1K1MPitch.i_xOK := (M6.nEncoderCount > nLowerSP1K1MPitch) AND (M6.nEncoderCount < nUpperSP1K1MPitch);
ffSP1K1MPitch.i_xOK := PRG_MR1K1_BEND_BENDER.ffBenderRange.i_xOK OR ((M6.nEncoderCount > nLowerSP1K1MPitch) AND (M6.nEncoderCount < nUpperSP1K1MPitch));
ffSP1K1MPitch(io_fbFFHWO := GVL_PMPS.fbFastFaultOutput1);
//SP1K1 grating pitch
ffSP1K1GPitch.i_xOK := (M7.nEncoderCount < nUpperSP1K1GPitch);
ffSP1K1GPitch.i_xOK := PRG_MR1K1_BEND_BENDER.ffBenderRange.i_xOK OR ((M7.nEncoderCount < nUpperSP1K1GPitch));
ffSP1K1GPitch(io_fbFFHWO := GVL_PMPS.fbFastFaultOutput1);
//SP1K1 Grating horizontal
ffSP1K1GHorisontal.i_xOK := (M9.nEncoderCount > nLowerSP1K1GH) AND (M9.nEncoderCount < nUpperSP1K1GH);
ffSP1K1GHorisontal.i_xOK := PRG_MR1K1_BEND_BENDER.ffBenderRange.i_xOK OR ((M9.nEncoderCount > nLowerSP1K1GH) AND (M9.nEncoderCount < nUpperSP1K1GH));
ffSP1K1GHorisontal(io_fbFFHWO := GVL_PMPS.fbFastFaultOutput1);
//ST1K1 ZOS
ffZos.i_xOK := M24.nEncoderCount < nZOSLower; //encoder counts decreases as value in mm increases
ffZos.i_xOK := PRG_MR1K1_BEND_BENDER.ffBenderRange.i_xOK OR (M24.nEncoderCount <= nZOSLower); //encoder counts decreases as value in mm increases
ffZos(io_fbFFHWO := GVL_PMPS.fbFastFaultOutput1);]]></ST>
</Implementation>
</POU>
Expand Down
46 changes: 23 additions & 23 deletions lcls-plc-rixs-optics/rixs_optics/rixs_optics.tmc

Large diffs are not rendered by default.

0 comments on commit 5ac05fb

Please sign in to comment.