multi gearing logic improved. Status logic changed to array of pointers for easier scaling. Homing added

This commit is contained in:
SCooper
2022-07-13 11:30:28 +01:00
parent 0808f6c41b
commit f0dff8ea56
4 changed files with 22 additions and 2 deletions

View File

@@ -1425,6 +1425,7 @@ External Setpoint Generation:
<Axis Id="1" CreateSymbols="true" AxisType="1">
<Name>Axis 1</Name>
<AxisPara>
<Velo RefSearch="5" RefSync="5"/>
<OtherSettings AllowMotionCmdToSlave="true"/>
</AxisPara>
<Encoder Name="Enc" EncType="1">

View File

@@ -965,7 +965,7 @@ External Setpoint Generation:
</DataType>
</DataTypes>
<Project GUID="{FB261665-FD20-4BF2-97F8-2854C82B752D}" Name="tc_project_app" PrjFilePath="..\..\tc_project_app\tc_project_app.plcproj" TmcFilePath="..\..\tc_project_app\tc_project_app.tmc" ReloadTmc="true" AmsPort="852" FileArchiveSettings="#x000e" SymbolicMapping="true">
<Instance Id="#x08502040" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcPath="tc_project_app\tc_project_app.tmc" TmcHash="{D08C0AE8-F819-88BD-5289-8C92F29439B9}">
<Instance Id="#x08502040" TcSmClass="TComPlcObjDef" KeepUnrestoredLinks="2" TmcPath="tc_project_app\tc_project_app.tmc" TmcHash="{E784E0E4-5985-E12E-6141-072BCA8B3B28}">
<Name>tc_project_app Instance</Name>
<CLSID ClassFactory="TcPlc30">{08500001-0000-0000-F000-000000000064}</CLSID>
<Vars VarGrpType="1">

View File

@@ -98,6 +98,18 @@ Axis_Template();
//Application program calls
//Application_Template();
IF astAxes[1].stStatus.fActPosition > 50 THEN
astAxes[1].stInputs.bLimitFwd := FALSE;
ELSE
astAxes[1].stInputs.bLimitFwd := TRUE;
END_IF
IF astAxes[1].stStatus.fActPosition < -5 THEN
astAxes[1].stInputs.bLimitBwd := FALSE;
ELSE
astAxes[1].stInputs.bLimitBwd := TRUE;
END_IF
]]></ST>
</Implementation>
</Action>
@@ -265,6 +277,13 @@ END_FOR]]></ST>
<LineId Id="10" Count="0" />
<LineId Id="9" Count="0" />
<LineId Id="3" Count="0" />
<LineId Id="14" Count="0" />
<LineId Id="13" Count="0" />
<LineId Id="15" Count="0" />
<LineId Id="17" Count="1" />
<LineId Id="16" Count="0" />
<LineId Id="20" Count="4" />
<LineId Id="19" Count="0" />
<LineId Id="11" Count="0" />
</LineIds>
<LineIds Name="MAIN.RESTORE_POSITIONS">