Skip to content

Commit

Permalink
setup EPS for LI2K4
Browse files Browse the repository at this point in the history
  • Loading branch information
tongju12 committed Mar 21, 2024
1 parent b959735 commit 5120ed4
Show file tree
Hide file tree
Showing 9 changed files with 955 additions and 861 deletions.
6 changes: 2 additions & 4 deletions plc-tmo-motion/_Config/NC/Axes/Axis 45 LI2K4-MMS-Y.xti
Original file line number Diff line number Diff line change
Expand Up @@ -1325,15 +1325,14 @@ External Setpoint Generation:
<Name>__FILENAME__</Name>
<AxisPara>
<Dynamic Acceleration="2" Deceleration="2"/>
<Velo Maximum="27"/>
<Velo RefSearch="0.1" RefSync="0.1" SlowManual="0.1" FastManual="0.1" Maximum="27"/>
<PositionAreaControl Range="0.05"/>
<TargetPosControl Range="0.1"/>
<OtherSettings AllowMotionCmdToSlave="true"/>
<OtherSettings AllowMotionCmdToSlave="true" PulseDistancePos="0.1" PulseDistanceNeg="0.1"/>
</AxisPara>
<Encoder Name="Enc" EncType="29">
<EncPara ScaleFactorNumerator="5e-05" Offset="-214569.724" MaxCount="#xffffffff">
<Inc RefSoftSyncMask="#x0000ffff"/>
<ParameterChanged>21</ParameterChanged>
</EncPara>
<Vars VarGrpType="1">
<Name>Inputs</Name>
Expand Down Expand Up @@ -1378,7 +1377,6 @@ External Setpoint Generation:
<DrvPara>
<Analog VeloReferenz="25.4" ScaleFactorActTorque="0.1"/>
<TimeComp TaskDelayCycles="1"/>
<ParameterChanged>6</ParameterChanged>
</DrvPara>
<Vars VarGrpType="1">
<Name>Inputs</Name>
Expand Down
6 changes: 4 additions & 2 deletions plc-tmo-motion/_Config/NC/Axes/Axis 46 LI2K4-MMS-X.xti
Original file line number Diff line number Diff line change
Expand Up @@ -1324,12 +1324,14 @@ External Setpoint Generation:
<Axis Id="46" CreateSymbols="true" AxisType="1" AxisFolder="LI2K4">
<Name>__FILENAME__</Name>
<AxisPara>
<Velo Maximum="7"/>
<Velo RefSearch="0.1" RefSync="0.1" SlowManual="0.1" FastManual="0.1" Maximum="7"/>
<PositionAreaControl Range="0.1"/>
<OtherSettings AllowMotionCmdToSlave="true"/>
<OtherSettings AllowMotionCmdToSlave="true" PulseDistancePos="0.1" PulseDistanceNeg="0.1"/>
</AxisPara>
<Encoder Name="Enc" EncType="29">
<EncPara ScaleFactorNumerator="5e-05" Offset="-214728.674" MaxCount="#xffffffff">
<SoftEndMinControl Enable="true" Range="-4"/>
<SoftEndMaxControl Enable="true" Range="1.5"/>
<Inc RefSoftSyncMask="#x0000ffff"/>
</EncPara>
<Vars VarGrpType="1">
Expand Down
72 changes: 36 additions & 36 deletions plc-tmo-motion/_Config/PLC/tmo_motion.xti
Original file line number Diff line number Diff line change
Expand Up @@ -7104,7 +7104,7 @@ External Setpoint Generation:
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbMotionCF1K4.fbDriveVirtual.MasterAxis.NcToPlc</Name>
<Name>PRG_CF1K4_IP1.fbMotionCF1K4.fbDriveVirtual.MasterAxis.NcToPlc</Name>
<Type GUID="{6A65C767-34E5-42BF-AD87-E1A503EAC7BE}" Namespace="MC">NCTOPLC_AXIS_REF</Type>
<SubVar>
<Name>AxisState</Name>
Expand Down Expand Up @@ -7153,7 +7153,7 @@ External Setpoint Generation:
</SubVar>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].Axis.NcToPlc</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].Axis.NcToPlc</Name>
<Type GUID="{6A65C767-34E5-42BF-AD87-E1A503EAC7BE}" Namespace="MC">NCTOPLC_AXIS_REF</Type>
<SubVar>
<Name>AxisState</Name>
Expand Down Expand Up @@ -7202,56 +7202,56 @@ External Setpoint Generation:
</SubVar>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].bLimitForwardEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].bLimitForwardEnable</Name>
<Comment>
<![CDATA[ NC Forward Limit Switch: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].bLimitBackwardEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].bLimitBackwardEnable</Name>
<Comment>
<![CDATA[ NC Backward Limit Switch: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].bHome</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].bHome</Name>
<Comment>
<![CDATA[ NO Home Switch: TRUE if at home]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].bHardwareEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].bHardwareEnable</Name>
<Comment>
<![CDATA[ NC STO Input: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].nRawEncoderULINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].nRawEncoderULINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for ULINT (Biss-C)]]>
</Comment>
<Type>ULINT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].nRawEncoderUINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].nRawEncoderUINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for UINT (Relative Encoders)]]>
</Comment>
<Type>UINT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].nRawEncoderINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].nRawEncoderINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for INT (LVDT)]]>
</Comment>
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].Axis.NcToPlc</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].Axis.NcToPlc</Name>
<Type GUID="{6A65C767-34E5-42BF-AD87-E1A503EAC7BE}" Namespace="MC">NCTOPLC_AXIS_REF</Type>
<SubVar>
<Name>AxisState</Name>
Expand Down Expand Up @@ -7300,56 +7300,56 @@ External Setpoint Generation:
</SubVar>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].bLimitForwardEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].bLimitForwardEnable</Name>
<Comment>
<![CDATA[ NC Forward Limit Switch: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].bLimitBackwardEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].bLimitBackwardEnable</Name>
<Comment>
<![CDATA[ NC Backward Limit Switch: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].bHome</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].bHome</Name>
<Comment>
<![CDATA[ NO Home Switch: TRUE if at home]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].bHardwareEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].bHardwareEnable</Name>
<Comment>
<![CDATA[ NC STO Input: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].nRawEncoderULINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].nRawEncoderULINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for ULINT (Biss-C)]]>
</Comment>
<Type>ULINT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].nRawEncoderUINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].nRawEncoderUINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for UINT (Relative Encoders)]]>
</Comment>
<Type>UINT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].nRawEncoderINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].nRawEncoderINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for INT (LVDT)]]>
</Comment>
<Type>INT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].Axis.NcToPlc</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].Axis.NcToPlc</Name>
<Type GUID="{6A65C767-34E5-42BF-AD87-E1A503EAC7BE}" Namespace="MC">NCTOPLC_AXIS_REF</Type>
<SubVar>
<Name>AxisState</Name>
Expand Down Expand Up @@ -7398,49 +7398,49 @@ External Setpoint Generation:
</SubVar>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].bLimitForwardEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].bLimitForwardEnable</Name>
<Comment>
<![CDATA[ NC Forward Limit Switch: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].bLimitBackwardEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].bLimitBackwardEnable</Name>
<Comment>
<![CDATA[ NC Backward Limit Switch: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].bHome</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].bHome</Name>
<Comment>
<![CDATA[ NO Home Switch: TRUE if at home]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].bHardwareEnable</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].bHardwareEnable</Name>
<Comment>
<![CDATA[ NC STO Input: TRUE if ok to move]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].nRawEncoderULINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].nRawEncoderULINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for ULINT (Biss-C)]]>
</Comment>
<Type>ULINT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].nRawEncoderUINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].nRawEncoderUINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for UINT (Relative Encoders)]]>
</Comment>
<Type>UINT</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].nRawEncoderINT</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].nRawEncoderINT</Name>
<Comment>
<![CDATA[ Raw encoder IO for INT (LVDT)]]>
</Comment>
Expand Down Expand Up @@ -12884,37 +12884,37 @@ External Setpoint Generation:
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbMotionCF1K4.fbDriveVirtual.MasterAxis.PlcToNc</Name>
<Name>PRG_CF1K4_IP1.fbMotionCF1K4.fbDriveVirtual.MasterAxis.PlcToNc</Name>
<Type GUID="{63A84524-72E3-41C8-BEAB-4CCE44690A13}" Namespace="MC">PLCTONC_AXIS_REF</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].Axis.PlcToNc</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].Axis.PlcToNc</Name>
<Type GUID="{63A84524-72E3-41C8-BEAB-4CCE44690A13}" Namespace="MC">PLCTONC_AXIS_REF</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[1].bBrakeRelease</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[1].bBrakeRelease</Name>
<Comment>
<![CDATA[ NC Brake Output: TRUE to release brake]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].Axis.PlcToNc</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].Axis.PlcToNc</Name>
<Type GUID="{63A84524-72E3-41C8-BEAB-4CCE44690A13}" Namespace="MC">PLCTONC_AXIS_REF</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[2].bBrakeRelease</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[2].bBrakeRelease</Name>
<Comment>
<![CDATA[ NC Brake Output: TRUE to release brake]]>
</Comment>
<Type>BOOL</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].Axis.PlcToNc</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].Axis.PlcToNc</Name>
<Type GUID="{63A84524-72E3-41C8-BEAB-4CCE44690A13}" Namespace="MC">PLCTONC_AXIS_REF</Type>
</Var>
<Var>
<Name>PRG_CF1K4_CAL.fbCF1K4States.astMotionStageMax[3].bBrakeRelease</Name>
<Name>PRG_CF1K4_IP1.fbCF1K4States.astMotionStageMax[3].bBrakeRelease</Name>
<Comment>
<![CDATA[ NC Brake Output: TRUE to release brake]]>
</Comment>
Expand All @@ -12924,10 +12924,6 @@ 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 @@ -13066,6 +13062,10 @@ 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
12 changes: 6 additions & 6 deletions plc-tmo-motion/tmo_motion/GVLs/Main.TcGVL
Original file line number Diff line number Diff line change
Expand Up @@ -312,43 +312,43 @@ VAR_GLOBAL
.bLimitBackwardEnable := TIIB[LI2K4Y-EL7047-E1]^STM Status^Status^Digital input 2;
.nRawEncoderULINT := TIIB[LI2K4-EL5042-E2]^FB Inputs Channel 1^Position'}
{attribute 'pytmc' := '
pv: LI2K4:MMS:Y
pv: LI2K4:IP1:MMS:Y
'}
M45: ST_MotionStage := (
bHardwareEnable:=TRUE,
bPowerSelf:=TRUE,
nEnableMode:=ENUM_StageEnableMode.DURING_MOTION,
nHomingMode := ENUM_EpicsHomeCmd.NONE,
sName := 'LI2K4:MMS:Y');
sName := 'LI2K4:IP1:MMS:Y');
// LI2K4-MMS: X
{attribute 'TcLinkTo' := '.bLimitForwardEnable := TIIB[LI2K4X-EL7047-E3]^STM Status^Status^Digital input 1;
.bLimitBackwardEnable := TIIB[LI2K4X-EL7047-E3]^STM Status^Status^Digital input 2;
.nRawEncoderULINT := TIIB[LI2K4-EL5042-E2]^FB Inputs Channel 2^Position'}
{attribute 'pytmc' := '
pv: LI2K4:MMS:X
pv: LI2K4:IP1:MMS:X
'}
M46: ST_MotionStage := (
bHardwareEnable:=TRUE,
bPowerSelf:=TRUE,
nEnableMode:=ENUM_StageEnableMode.DURING_MOTION,
nHomingMode := ENUM_EpicsHomeCmd.NONE,
sName := 'LI2K4:MMS:X');
sName := 'LI2K4:IP1:MMS:X');
//CF1K4-MMS-FILT
{attribute 'pytmc' := 'pv: CF1K4:MMS:FILT'}
{attribute 'TcLinkTo' := '.bLimitForwardEnable := TIIB[CF1K4-EL7047-E4]^STM Status^Status^Digital input 1;
.bLimitBackwardEnable := TIIB[CF1K4-EL7047-E4]^STM Status^Status^Digital input 2;
.nRawEncoderULINT := TIIB[CF1K4-EL5042-E5]^FB Inputs Channel 1^Position'}
{attribute 'pytmc' := '
pv: CF1K4:MMS:FILT
pv: CF1K4:IP1:MMS
'}
M47: ST_MotionStage := (
bHardwareEnable:=TRUE,
bPowerSelf:=TRUE,
nEnableMode:=ENUM_StageEnableMode.DURING_MOTION,
nHomingMode := ENUM_EpicsHomeCmd.NONE,
sName := 'CF1K4:MMS:FILT');
sName := 'CF1K4:IP1:MMS');
END_VAR]]></Declaration>
</GVL>
Expand Down
2 changes: 1 addition & 1 deletion plc-tmo-motion/tmo_motion/POUs/PRG_1_PlcTask.TcPOU
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PRG_TM1K4();
PRG_TM2K4();
PRG_SP1K4();
PRG_LI2K4_IP1();
PRG_CF1K4_CAL();
PRG_CF1K4_IP1();
PRG_3_PMPS_POST();
PRG_4_LOG();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1" ProductVersion="3.1.4022.18">
<POU Name="PRG_CF1K4_CAL" Id="{3b3608b5-fe23-47f9-92d0-d7907172c21f}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM PRG_CF1K4_CAL
<POU Name="PRG_CF1K4_IP1" Id="{3b3608b5-fe23-47f9-92d0-d7907172c21f}" SpecialFunc="None">
<Declaration><![CDATA[PROGRAM PRG_CF1K4_IP1
VAR
fbMotionCF1K4: FB_MotionStage;{attribute 'pytmc' := '
pv: CF1K4:IP1
Expand Down
Loading

0 comments on commit 5120ed4

Please sign in to comment.