did some minor editorial changes

This commit is contained in:
kleines
2020-06-18 18:37:43 +02:00
parent 5d79e74e6c
commit 064d2c1728
2 changed files with 62 additions and 62 deletions

View File

@@ -13,37 +13,37 @@ END_VAR]]></Declaration>
<Method Name="mDisableAxis" Id="{22a3dd98-69f0-4b92-8109-1b0c2fe2344d}">
<Declaration><![CDATA[METHOD mDisableAxis: BOOL
VAR_INPUT
iAxisIndex: UINT; //The idex of the axis to action the method on.
nAxisIndex: UINT; //The idex of the axis to action the method on.
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[GVL.astAxes[iAxisIndex].stControl.bEnable := FALSE;]]></ST>
<ST><![CDATA[GVL.astAxes[nAxisIndex].stControl.bEnable := FALSE;]]></ST>
</Implementation>
</Method>
<Method Name="mEnableAxis" Id="{12e91532-7139-4c17-998e-4c670b584b9d}">
<Declaration><![CDATA[METHOD mEnableAxis: BOOL
VAR_INPUT
iAxisIndex: UINT; //The idex of the axis to action the method on.
nAxisIndex: UINT; //The idex of the axis to action the method on.
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[GVL.astAxes[iAxisIndex].stControl.bEnable := TRUE;]]></ST>
<ST><![CDATA[GVL.astAxes[nAxisIndex].stControl.bEnable := TRUE;]]></ST>
</Implementation>
</Method>
<Method Name="mExecute" Id="{010bd927-5568-40db-a7c5-fcfe995a5cb1}">
<Declaration><![CDATA[METHOD mExecute: BOOL
VAR_INPUT
iAxisIndex: UINT; //The idex of the axis to action the method on.
nAxisIndex: UINT; //The idex of the axis to action the method on.
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[GVL.astAxes[iAxisIndex].stControl.bExecute := TRUE;]]></ST>
<ST><![CDATA[GVL.astAxes[nAxisIndex].stControl.bExecute := TRUE;]]></ST>
</Implementation>
</Method>
<Method Name="mExecute_SetFALSE" Id="{cc074392-b19d-414a-9010-72a4fa4d5f7a}">
<Declaration><![CDATA[METHOD mExecute_SetFALSE: BOOL
VAR_INPUT
iAxisIndex: UINT; //The idex of the axis to action the method on.
nAxisIndex: UINT; //The idex of the axis to action the method on.
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[GVL.astAxes[iAxisIndex].stControl.bExecute := TRUE;]]></ST>
<ST><![CDATA[GVL.astAxes[nAxisIndex].stControl.bExecute := TRUE;]]></ST>
</Implementation>
</Method>
<Method Name="mGearOut" Id="{65c5860b-0759-45a5-a8a4-27fe9453aa76}">
@@ -60,28 +60,28 @@ END_VAR
<Declaration><![CDATA[METHOD mPrepareDefaultMove
VAR_INPUT
iAxisIndex: UINT; //The idex of the axis to action the method on.
nAxisIndex: UINT; //The idex of the axis to action the method on.
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[//Prepare an axis so it is ready to action a move using target defaults when executed.
GVL.astAxes[iAxisIndex].stControl.bEnable := TRUE;
GVL.astAxes[iAxisIndex].stControl.eCommand := E_MotionFunctions.eMoveAbsolute;
GVL.astAxes[nAxisIndex].stControl.bEnable := TRUE;
GVL.astAxes[nAxisIndex].stControl.eCommand := E_MotionFunctions.eMoveAbsolute;
GVL.astAxes[iAxisIndex].stInputs.bLimitBwd := TRUE;
GVL.astAxes[iAxisIndex].stInputs.bLimitFwd := TRUE;
GVL.astAxes[nAxisIndex].stInputs.bLimitBwd := TRUE;
GVL.astAxes[nAxisIndex].stInputs.bLimitFwd := TRUE;
GVL.astAxes[iAxisIndex].stConfig.fVelocity := tcUNIT_GVL.fDEFAULT_TARGET_VELOCITY;
GVL.astAxes[iAxisIndex].stConfig.fAcceleration := tcUNIT_GVL.fDEFAULT_TARGET_ACCELERATION;
GVL.astAxes[iAxisIndex].stConfig.fDeceleration := tcUNIT_GVL.fDEFAULT_TARGET_DECCELERATION;
GVL.astAxes[iAxisIndex].stConfig.fOverride := tcUNIT_GVL.fDEFAULT_TARGET_OVERRIDE;
GVL.astAxes[iAxisIndex].stConfig.fPosition := tcUNIT_GVL.fDEFAULT_POSITION;]]></ST>
GVL.astAxes[nAxisIndex].stConfig.fVelocity := tcUNIT_GVL.fDEFAULT_TARGET_VELOCITY;
GVL.astAxes[nAxisIndex].stConfig.fAcceleration := tcUNIT_GVL.fDEFAULT_TARGET_ACCELERATION;
GVL.astAxes[nAxisIndex].stConfig.fDeceleration := tcUNIT_GVL.fDEFAULT_TARGET_DECCELERATION;
GVL.astAxes[nAxisIndex].stConfig.fOverride := tcUNIT_GVL.fDEFAULT_TARGET_OVERRIDE;
GVL.astAxes[nAxisIndex].stConfig.fPosition := tcUNIT_GVL.fDEFAULT_POSITION;]]></ST>
</Implementation>
</Method>
<Method Name="mPrepareGearInMultiMaster" Id="{b94784af-8414-4f79-a0cd-7d3b82710c1e}">
<Declaration><![CDATA[METHOD mPrepareGearInMultiMaster
VAR_INPUT
iAxisIndex: UINT; // The idex of the axis to action the method on.
nAxisIndex: UINT; // The idex of the axis to action the method on.
astGearAxis: ARRAY[1..4] OF ST_GearAxis;
END_VAR
VAR
@@ -89,30 +89,30 @@ VAR
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[// Prepare the axis so it is ready to be coupled
GVL.astAxes[iAxisIndex].stControl.eCommand := E_MotionFunctions.eGearInMultiMaster;
GVL.astAxes[nAxisIndex].stControl.eCommand := E_MotionFunctions.eGearInMultiMaster;
FOR i:= 1 TO tcUNIT_GVL.nMAX_MASTERS DO
GVL.astAxes[iAxisIndex].stConfig.astMultiMasterAxis[i].nIndex:=astGearAxis[i].nIndex;
GVL.astAxes[iAxisIndex].stConfig.astMultiMasterAxis[i].fRatio:=astGearAxis[i].fRatio;
GVL.astAxes[nAxisIndex].stConfig.astMultiMasterAxis[i].nIndex:=astGearAxis[i].nIndex;
GVL.astAxes[nAxisIndex].stConfig.astMultiMasterAxis[i].fRatio:=astGearAxis[i].fRatio;
END_FOR]]></ST>
</Implementation>
</Method>
<Method Name="mPrepareHome" Id="{29a1cce2-2fc4-48e1-86f6-27b6dd699cd2}">
<Declaration><![CDATA[METHOD mPrepareHome
VAR_INPUT
iAxisIndex: UINT; // The idex of the axis to action the method on.
nAxisIndex: UINT; // The idex of the axis to action the method on.
eHomingRoutine: E_HomingRoutines;
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[GVL.astAxes[iAxisIndex].stControl.eCommand := E_MotionFunctions.eHome;
GVL.astAxes[iAxisIndex].stConfig.eHomeSeq:= eHomingRoutine;]]></ST>
<ST><![CDATA[GVL.astAxes[nAxisIndex].stControl.eCommand := E_MotionFunctions.eHome;
GVL.astAxes[nAxisIndex].stConfig.eHomeSeq:= eHomingRoutine;]]></ST>
</Implementation>
</Method>
<Method Name="mPrepareMove" Id="{97bd5417-d0a1-4d32-8732-16310a863fcc}">
<Declaration><![CDATA[METHOD mPrepareMove
VAR_INPUT
iAxisIndex: UINT; //The idex of the axis to action the method on.
nAxisIndex: UINT; //The idex of the axis to action the method on.
fTargetVelocity: LREAL;
fTargetAcceleration: LREAL;
fTargetDeceleration: LREAL;
@@ -122,22 +122,22 @@ END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[//Prepare the axis so it is ready to action a move when executed for a given motion strategy.
GVL.astAxes[iAxisIndex].stControl.bEnable := FALSE;
GVL.astAxes[iAxisIndex].stControl.eCommand := eMotionStrategy;
GVL.astAxes[nAxisIndex].stControl.bEnable := FALSE;
GVL.astAxes[nAxisIndex].stControl.eCommand := eMotionStrategy;
GVL.astAxes[iAxisIndex].stInputs.bLimitBwd := TRUE;
GVL.astAxes[iAxisIndex].stInputs.bLimitFwd := TRUE;
GVL.astAxes[nAxisIndex].stInputs.bLimitBwd := TRUE;
GVL.astAxes[nAxisIndex].stInputs.bLimitFwd := TRUE;
GVL.astAxes[iAxisIndex].stConfig.fVelocity := fTargetVelocity;
GVL.astAxes[iAxisIndex].stConfig.fAcceleration := fTargetAcceleration;
GVL.astAxes[iAxisIndex].stConfig.fDeceleration := fTargetDeceleration;
GVL.astAxes[iAxisIndex].stConfig.fPosition := fTargetPosition;]]></ST>
GVL.astAxes[nAxisIndex].stConfig.fVelocity := fTargetVelocity;
GVL.astAxes[nAxisIndex].stConfig.fAcceleration := fTargetAcceleration;
GVL.astAxes[nAxisIndex].stConfig.fDeceleration := fTargetDeceleration;
GVL.astAxes[nAxisIndex].stConfig.fPosition := fTargetPosition;]]></ST>
</Implementation>
</Method>
<Method Name="mReset" Id="{59e8bfe4-ab50-4ad3-9095-95e359837091}">
<Declaration><![CDATA[METHOD mReset : BOOL
VAR_INPUT
iAxisIndex: UINT; // The idex of the axis to action the method on.
nAxisIndex: UINT; // The idex of the axis to action the method on.
END_VAR
VAR
iCycles: UINT;
@@ -145,10 +145,10 @@ VAR
END_VAR
]]></Declaration>
<Implementation>
<ST><![CDATA[GVL.astAxes[iAxisIndex].stControl.bExecute := FALSE;
<ST><![CDATA[GVL.astAxes[nAxisIndex].stControl.bExecute := FALSE;
FOR iCycles:= 1 TO iMaxCycles DO
GVL.astAxes[iAxisIndex].stControl.bReset := TRUE;
IF GVL.astaxes[iAxisIndex].stStatus.bError := FALSE THEN
GVL.astAxes[nAxisIndex].stControl.bReset := TRUE;
IF GVL.astaxes[nAxisIndex].stStatus.bError := FALSE THEN
EXIT;
END_IF
END_FOR]]></ST>
@@ -158,39 +158,39 @@ END_FOR]]></ST>
<Declaration><![CDATA[METHOD mSetAxisDefaults
VAR_INPUT
iAxisIndex: UINT; //The idex of the axis to action the method on.
nAxisIndex: UINT; //The idex of the axis to action the method on.
END_VAR]]></Declaration>
<Implementation>
<ST><![CDATA[// Set PLC default values for the axis. Note: Status values can take multiple cycles to updated. This is not an instant reset.
IF GVL.astAxes[iAxisIndex].stStatus.bBusy THEN
GVL.astAxes[iAxisIndex].stControl.bStop := TRUE;
IF GVL.astAxes[nAxisIndex].stStatus.bBusy THEN
GVL.astAxes[nAxisIndex].stControl.bStop := TRUE;
END_IF
IF GVL.astAxes[iAxisIndex].stStatus.bError THEN
GVL.astAxes[iAxisIndex].stControl.bReset := TRUE;
IF GVL.astAxes[nAxisIndex].stStatus.bError THEN
GVL.astAxes[nAxisIndex].stControl.bReset := TRUE;
END_IF
IF NOT GVL.astAxes[iAxisIndex].stControl.bEnable AND GVL.astAxes[iAxisIndex].stControl.bStop THEN
GVL.astAxes[iAxisIndex].stControl.bStop := FALSE;
IF NOT GVL.astAxes[nAxisIndex].stControl.bEnable AND GVL.astAxes[nAxisIndex].stControl.bStop THEN
GVL.astAxes[nAxisIndex].stControl.bStop := FALSE;
END_IF
GVL.astAxes[iAxisIndex].stControl.bEnable := FALSE;
GVL.astAxes[iAxisIndex].stControl.bExecute := FALSE;
GVL.astAxes[iAxisIndex].stControl.bReset := FALSE;
GVL.astAxes[iAxisIndex].stControl.bJogFwd := FALSE;
GVL.astAxes[iAxisIndex].stControl.bJogBwd := FALSE;
GVL.astAxes[iAxisIndex].stControl.bStop := FALSE;
GVL.astAxes[iAxisIndex].stControl.eCommand := E_MotionFunctions.eMoveAbsolute;
GVL.astAxes[nAxisIndex].stControl.bEnable := FALSE;
GVL.astAxes[nAxisIndex].stControl.bExecute := FALSE;
GVL.astAxes[nAxisIndex].stControl.bReset := FALSE;
GVL.astAxes[nAxisIndex].stControl.bJogFwd := FALSE;
GVL.astAxes[nAxisIndex].stControl.bJogBwd := FALSE;
GVL.astAxes[nAxisIndex].stControl.bStop := FALSE;
GVL.astAxes[nAxisIndex].stControl.eCommand := E_MotionFunctions.eMoveAbsolute;
GVL.astAxes[iAxisIndex].stConfig.fVelocity := 0.0;
GVL.astAxes[iAxisIndex].stConfig.fAcceleration := 0.0;
GVL.astAxes[iAxisIndex].stConfig.fDeceleration := 0.0;
GVL.astAxes[iAxisIndex].stConfig.fPosition := 0;
GVL.astAxes[iAxisIndex].stConfig.fOverride := 0.0;
GVL.astAxes[iAxisIndex].stConfig.eHomeSeq := 0;
GVL.astAxes[nAxisIndex].stConfig.fVelocity := 0.0;
GVL.astAxes[nAxisIndex].stConfig.fAcceleration := 0.0;
GVL.astAxes[nAxisIndex].stConfig.fDeceleration := 0.0;
GVL.astAxes[nAxisIndex].stConfig.fPosition := 0;
GVL.astAxes[nAxisIndex].stConfig.fOverride := 0.0;
GVL.astAxes[nAxisIndex].stConfig.eHomeSeq := 0;
GVL.astAxes[iAxisIndex].stInputs.bLimitBwd := FALSE;
GVL.astAxes[iAxisIndex].stInputs.bLimitFwd := FALSE;
GVL.astAxes[iAxisIndex].stInputs.bHomeSensor := FALSE;]]></ST>
GVL.astAxes[nAxisIndex].stInputs.bLimitBwd := FALSE;
GVL.astAxes[nAxisIndex].stInputs.bLimitFwd := FALSE;
GVL.astAxes[nAxisIndex].stInputs.bHomeSensor := FALSE;]]></ST>
</Implementation>
</Method>
<LineIds Name="FB_tcUNIT_common">