Add FB_CustomAxis example and update pointer

This commit is contained in:
Federico Rojas
2022-10-04 17:11:37 +02:00
parent 33c2c06338
commit 99a3efce66
3 changed files with 6 additions and 10 deletions
Binary file not shown.
+5 -9
View File
@@ -34,25 +34,21 @@ AXES();]]></ST>
<Folder Name="POSITION_RECOVERY" Id="{3561f6ef-e145-4ed3-9839-f17334bd2d97}" />
<Action Name="AXES" Id="{7eb32732-9b53-4934-8cd9-20ba971dd8ff}">
<Implementation>
<ST><![CDATA[
//First cycle, assign FB_axis to interface array
<ST><![CDATA[//First cycle, assign FB_axis to interface array
IF _TaskInfo[fbGetCurTaskIndex.index].FirstCycle THEN
FOR GVL.iAxis := 1 TO GVL_APP.nAXIS_NUM DO
afbAxes[GVL.iAxis].stAxis REF= astAxes[GVL.iAxis];
//aIAxes[GVL.iAxis] := afbAxes[GVL.iAxis];
aIAxes[GVL.iAxis] := afbAxes[GVL.iAxis];
END_FOR
//Custom axis types defined and linked to aiAxes here
//fbCustomAxis extends FB_axis
//FB_CustomAxis extends FB_axis
//fbCustomAxis.stAxis REF= astAxes[x];
//aIAxes[x] := fbCustomAxis;
END_IF
//Execute FB_Axis logic
FOR GVL.iAxis := 1 TO GVL_APP.nAXIS_NUM DO
afbAxes[GVL.iAxis].Run();
//aIAxes[GVL.iAxis].Run();
//Run the Run() of the custom axis
//fbCustomAxis.Run();
aIAxes[GVL.iAxis].Run();
END_FOR
//Execute Pneumatic Axis logic