L_TC2P_MoveHalfElliptical
|
|
|
|
L_TC2P_CmdMoveHalfElliptical |
|
|
|
|
|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
L_TC2P_CoordinatedMotion |
– |
|
itfCmdReceiver |
xCmdAccepted |
|
– |
BOOL |
|
ARRAY[1..12] OF LREAL |
– |
|
alrPosition |
|
|
|
|
|
L_MC4P_CoordSystem |
– |
|
eCoordSystem |
|
|
|
|
|
LREAL |
– |
|
lrBlendingRadius |
|
|
|
|
|
ARRAY[1..6] OF L_MC4P_AuxMode |
– |
|
aeAuxMode |
|
|
|
|
|
L_MC4P_Orientation_Mode |
– |
|
eOrientationMode |
|
|
|
|
|
ARRAY[1..6] OF MC_DIRECTION |
– |
|
aeDirection |
|
|
|
|
|
ARRAY[1..3] OF LREAL |
– |
|
alrEllipticalDirection |
|
|
|
|
|
LREAL |
– |
|
lrSemiAxis |
|
|
|
|
|
|
|
|
|
|
|
|
|
Inputs
|
Identifier Data type |
Description |
|---|---|
|
itfCmdReceiver L_TC2P_CoordinatedMotionState L_TX2P_PickAndPlaceBase |
Connection to the technology module - which interprets the command and executes the job/driving task.
|
|
alrPosition ARRAY[1..12] OF LREAL |
Array with absolute target coordinates in [Units].
Absolute target position of the movement
|
|
eCoordSystem L_MC4P_CoordSystem |
Selection of the coordinate system to be used:
|
|
lrBlendingRadius LREAL |
Blending radius for the profile. The value specifies at what distance from the target point the blending movement should start.
|
|
eOrientationMode L_MC4P_Orientation_Mode |
Presetting the orientation interpolation for the WCS axes
See also: Direction specification for modulo axes |
|
aeDirection ARRAY[1..6] OFMC_DIRECTION |
Direction specification for WCS rotary axes (A, B, C axis), which are parameterized as modulo. The parameter is evaluated only with For MoveLinear movements only the indices 4 ... 6 (main axes A, B, C) are used. Permissible selection:
The mcCurrentDirection, mcPositiveCycle and mcNegativeCycle modes are not supported.
See also:Direction specification for modulo axes (^ 700) |
|
aeAuxMode ARRAY[1..6] OF L_MC4P_AuxMode |
Mode for the auxiliary axes:
DiscreteRelative: Auxiliary object position is set at the end of each motion segment (similar to main axes). |
|
alrEllipticalDirection ARRAY[1..3] OF LREAL |
Destination direction from the starting point
|
|
lrSemiAxis LREAL |
Minor OR major semi-axis of the ellipse. The second semi-axis results from the Cartesian distance between the starting point and the target point. |
Outputs
|
Identifier Data type |
Description |
|
|---|---|---|
|
xCmdAccepted BOOL |
TRUE |
The command is valid and will be included in CmdReceiver. |
Method
|
Identifier Data type |
Description |
|
|---|---|---|
|
METHOD Execute : Bool |
Release of the order for the execution of the command. |
|
|
TRUE |
The command is valid and will be included in CmdReceiver. |
|
|
FALSE |
The command is not valid because no CmdReceiver is connected. |
|
Activate the command
Each command has the method Execute().
To execute the command, the Execute() method must be called. The method has the return value of data type BOOL. The return value = TRUE is set if a valid command receiver is connected to the itfCmdReceiver input.
The TM L_TC2P_CoordinatedMotion changes to the state MOVEELLIPTICAL when the motion task of the command is active.
If motion tasks are already executed in the TM L_TC2P_CoordinatedMotion, the motion task from the currently assigned command is added at the end of the waiting list. The waiting list is processed after the order.
The target position alrPosition from the command is approached absolutely.
Blending
Via the input lrBlendingRadius > 0 the target point alrPosition of the command is slept. The blending radius belongs to the point of the command that is currently activated.
Grouping of the commands
If several commands are activated in the same PLC clock. So these are concatenated in a path as a group. The call sequence of the Execute() method of the commands decides the processing sequence.
Determination of the ellipse
The height of the ellipse is set via lrSemiAxis. The input alrEllipticalDirection is used to set the normal vector (3-Dim) of the plane from which the ellipse is to start - i.e. the ellipse starts in the direction of the vector from the starting point.
Example 1: Half ellipse in the Z direction
VAR
/// Technology module:
TM_CoordMotion: L_TC2P_CoordinatedMotionState;
/// Commands:
Cmd_ProfilePar : L_TC2P_CmdBasicProfileParameter
:=( itfCmdReceiver := TM_CoordMotion);
Cmd_MoveHalfEllip : L_TC2P_L_TC2P_JobMoveHalfElliptical
:=( itfCmdReceiver := TM_CoordMotion);
/// state
wState : WORD;
END_VAR
CASE wState OF
10: /// send move elliptical command
/// set profile parameters
Cmd_ProfilePar.lrPathVel := 100;
Cmd_ProfilePar.lrPathAcc := 1000;
Cmd_ProfilePar.lrPathDec := 1000;
Cmd_ProfilePar.lrPathJerk := 100000;
Cmd_ProfilePar.Execute();
/// execute move elliptical
Cmd_MoveHalfEllip.lrBlendingRadius := 50;
Cmd_MoveHalfEllip.eCoordSystem := L_MC4P_
CoordSystem.WCS;
Cmd_MoveHalfEllip.lrSemiAxis := 100;
Cmd_MoveHalfEllip.alrEllipticalDirection[1] := 0;
Cmd_MoveHalfEllip.alrEllipticalDirection[2] := 0;
Cmd_MoveHalfEllip.alrEllipticalDirection[3] := 1;
Cmd_MoveHalfEllip.alrPosition[1] := 100; // x pos
Cmd_MoveHalfEllip.alrPosition[2] := 0; // y pos
Cmd_MoveHalfEllip.alrPosition[3] := 100; // z pos
Cmd_MoveHalfEllip.Execute();
wState := 20;
END_CASE
Example 2: Blending through the half ellipse with linear segments
VAR
/// Technology module:
TM_CoordMotion: L_TC2P_CoordinatedMotionState;
/// Commands:
Cmd_ProfilePar : L_TC2P_CmdBasicProfileParameter
:=( itfCmdReceiver := TM_CoordMotion);
Cmd_MoveHalfEllip : L_TC2P_L_TC2P_JobMoveHalfElliptical
:=( itfCmdReceiver := TM_CoordMotion);
Cmd_MoveLinAbs : L_TC2P_CmdMoveLinearAbsolute
:=( itfCmdReceiver := TM_CoordMotion);
/// state
wState : WORD;
END_VAR
CASE wState OF
10: /// send move elliptical command
/// set profile parameters
Cmd_ProfilePar.lrPathVel := 100;
Cmd_ProfilePar.lrPathAcc := 1000;
Cmd_ProfilePar.lrPathDec := 1000;
Cmd_ProfilePar.lrPathJerk := 100000;
Cmd_ProfilePar.Execute();
/// execute move elliptical
Cmd_MoveHalfEllip.lrBlendingRadius := 50;
Cmd_MoveHalfEllip.eCoordSystem := L_MC4P_
CoordSystem.WCS;
Cmd_MoveHalfEllip.lrSemiAxis := 100;
Cmd_MoveHalfEllip.alrEllipticalDirection[1] := 0;
Cmd_MoveHalfEllip.alrEllipticalDirection[2] := 0;
Cmd_MoveHalfEllip.alrEllipticalDirection[3] := 1;
Cmd_MoveHalfEllip.alrPosition[1] := 100; // x pos
Cmd_MoveHalfEllip.alrPosition[2] := 0; // y pos
Cmd_MoveHalfEllip.alrPosition[3] := 100; // z pos
Cmd_MoveHalfEllip.Execute();
/// execute move linear abs
Cmd_MoveLinAbs.lrBlendingRadius := 0;
Cmd_MoveLinAbs. eCoordSystem := L_MC4P_CoordSystem.WCS;
Cmd_MoveLinAbs.alrPosition[1] := 130; // x pos
Cmd_MoveLinAbs.alrPosition[2] := 0; // y pos
Cmd_MoveLinAbs.alrPosition[3] := 0; // z pos
Cmd_MoveLinAbs.Execute();
wState := 20;
END_CASE