Add DUT RestorePosition in tc_mca_std_lib
Also adjusted code in MAIN.STARTUP to adapt to the new type variable instead of the int previously.
This commit is contained in:
@@ -74,8 +74,8 @@ ERROR();]]></ST>
|
||||
</Implementation>
|
||||
<Action Name="AXES" Id="{7eb32732-9b53-4934-8cd9-20ba971dd8ff}">
|
||||
<Implementation>
|
||||
<ST><![CDATA[gvl.axes[1].config.eRestorePosition:=1;
|
||||
gvl.axes[2].config.eRestorePosition:=2;
|
||||
<ST><![CDATA[gvl.axes[1].config.eRestorePosition:=RestorePosition.RestoreWithoutHome;
|
||||
gvl.axes[2].config.eRestorePosition:=RestorePosition.RestoreWithHome;
|
||||
|
||||
FOR GVL.iAxis:=1 TO gvl_app.axisNum DO
|
||||
aFbAxes[GVL.iAxis](stAxisStruct:=gvl.axes[GVL.iAxis]);
|
||||
@@ -199,8 +199,8 @@ IF bColdstartDone = FALSE THEN
|
||||
FOR i:=1 TO gvl_app.axisNum DO
|
||||
IF fbReadEncRefSys[i].Value = 0 THEN
|
||||
CASE GVL.axes[i].config.eRestorePosition OF
|
||||
1: fbRestorePosition[i].Execute:=TRUE;
|
||||
2: gvl.axes[i].control.bExecute:=TRUE;
|
||||
RestorePosition.RestoreWithoutHome: fbRestorePosition[i].Execute:=TRUE;
|
||||
RestorePosition.RestoreWithHome: gvl.axes[i].control.bExecute:=TRUE;
|
||||
END_CASE
|
||||
END_IF
|
||||
END_FOR
|
||||
@@ -209,11 +209,11 @@ IF bColdstartDone = FALSE THEN
|
||||
FOR i:=1 TO gvl_app.axisNum DO
|
||||
IF fbReadEncRefSys[i].Value = 0 THEN
|
||||
CASE gvl.axes[i].config.eRestorePosition OF
|
||||
1:
|
||||
RestorePosition.RestoreWithoutHome:
|
||||
IF NOT fbRestorePosition[i].Done THEN
|
||||
RETURN;
|
||||
END_IF
|
||||
2:
|
||||
RestorePosition.RestoreWithHome:
|
||||
IF NOT gvl.axes[i].status.bHomed THEN
|
||||
RETURN;
|
||||
END_IF
|
||||
@@ -239,8 +239,7 @@ END_IF]]></ST>
|
||||
<LineId Id="81" Count="1" />
|
||||
</LineIds>
|
||||
<LineIds Name="MAIN.AXES">
|
||||
<LineId Id="19" Count="0" />
|
||||
<LineId Id="18" Count="0" />
|
||||
<LineId Id="19" Count="1" />
|
||||
<LineId Id="3" Count="0" />
|
||||
<LineId Id="1" Count="0" />
|
||||
<LineId Id="4" Count="0" />
|
||||
|
||||
Submodule solution/tc_project_app/tc_mca_std_lib updated: 4d01140cfa...9e31e77d29
@@ -30,6 +30,9 @@
|
||||
<Compile Include="POUs\MAIN.TcPOU">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tc_mca_std_lib\DUTs\RestorePosition.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="tc_mca_std_lib\DUTs\ST_AxisConfig.TcDUT">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
@@ -342,8 +345,8 @@
|
||||
<ProjectExtensions>
|
||||
<PlcProjectOptions>
|
||||
<XmlArchive>
|
||||
<Data>
|
||||
<o xml:space="preserve" t="OptionKey">
|
||||
<Data>
|
||||
<o xml:space="preserve" t="OptionKey">
|
||||
<v n="Name">"<ProjectRoot>"</v>
|
||||
<d n="SubKeys" t="Hashtable" ckt="String" cvt="OptionKey">
|
||||
<v>{192FAD59-8248-4824-A8DE-9177C94C195A}</v>
|
||||
@@ -394,15 +397,15 @@
|
||||
</d>
|
||||
<d n="Values" t="Hashtable" />
|
||||
</o>
|
||||
</Data>
|
||||
<TypeList>
|
||||
<Type n="Boolean">System.Boolean</Type>
|
||||
<Type n="Hashtable">System.Collections.Hashtable</Type>
|
||||
<Type n="Int32">System.Int32</Type>
|
||||
<Type n="OptionKey">{54dd0eac-a6d8-46f2-8c27-2f43c7e49861}</Type>
|
||||
<Type n="String">System.String</Type>
|
||||
</TypeList>
|
||||
</XmlArchive>
|
||||
</Data>
|
||||
<TypeList>
|
||||
<Type n="Boolean">System.Boolean</Type>
|
||||
<Type n="Hashtable">System.Collections.Hashtable</Type>
|
||||
<Type n="Int32">System.Int32</Type>
|
||||
<Type n="OptionKey">{54dd0eac-a6d8-46f2-8c27-2f43c7e49861}</Type>
|
||||
<Type n="String">System.String</Type>
|
||||
</TypeList>
|
||||
</XmlArchive>
|
||||
</PlcProjectOptions>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user