RobotMotion (Object)

Represents a Robot Motion.

Role: The interface is used to retrieve and set the motion attributes of a Robot Motion.
The following code snippet can be used to obtain the Robot Motion from a Operation aggreagted under a Robot Task.
   Dim objOpr as Operation
   ...
   Dim objRobotmotion as RobotMotion
   objOpr.GetRobotMotion objRobotmotion
 

The Robot Motion can also be obtained from an activity of the type RobotMotion.
   Dim objActivity as Activity
   ...
   Dim objRobotmotion as RobotMotion
   Set objRobotmotion = objActivity.GetTechnologicalObject("RobotMotion" )
 

Methods


Sub GetAccuracyProfile( oAccuracyProfile)
Retrieves Accuracy profile.
Parameters:
oAccuracyProfile
The retrieved profile.
Returns:
An HRESULT.
Legal values:
S_OK
The Accuracy Profile was successfully set.
E_FAIL
The Accuracy Profile could not be set.
Example:
The following example retrieves the Accuracy Profile for the robot Accuracy.
   Dim objRobotMotion as RobotMotion
   Dim AccuracyProfile As String
   objRobotMotion.GetAccuracyProfile AccuracyProfile
   
Sub GetAuxillaryAxisHome( iDevice, iAuxillaryAxis, oHomeName)
Retrieves the underlying Auxillary device Home.
Parameters:
iDevice
The Auxillary Device.
iAuxillaryAxis
Name of the Auxillary Device.
oHomeName
Home name retrieved for the given Auxillary device.
Returns:
An HRESULT.
Legal values:
S_OK
The auxillary device target was successfully retrieved.
E_FAIL
The auxillary device target could not be retrieved.
Example:
The following example retrives the home name correspoding to the target of the auxillary device in a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim Device As Product
   ...
   Dim DeviceName As String
   DeviceName = "Mechanism.1"
   Dim HomeName As String
   objRobotmotion.GetAuxillaryAxisHome HomeName
   
Sub GetAuxillaryAxisValues( iDevice, iAuxillaryAxis, oAuxillaryAxisValues)
Retrieves the underlying Auxillary device Joint values.
Parameters:
iDevice
Auxillary device (Mechanism)
iAuxillaryAxis
Name of the auxillary device.
oAuxillaryAxisValues
List of Joint values retrieved for the given Auxillary device.
Returns:
An HRESULT.
Legal values:
S_OK
The auxillary device target was successfully retrieved.
E_FAIL
The auxillary device target could not be retrieved.
Example:
The following example sets the joint values correspoding to the target of the auxillary device in a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim Device As Product
   ...
   Dim DeviceName As String
   DeviceName = "Mechanism.1"
   Dim JointTarget(1)
   objRobotmotion.GetAuxillaryAxisValues Device,DeviceName,JointTarget
   
Sub GetCartesianTarget( oCartesianTarget)
Retrieves the Robot Cartesian target.
Parameters:
oCartesianTarget
Cartesian Target(The Variant array containing the values in the sequence X,Y,Z,Yaw,Pitch,Roll)
Returns:
Returns:
An HRESULT.
Legal values:
S_OK
The cartesian target was successfully retrieved.
E_FAIL
The cartesian target could not be retrieved.
Example:
The following example gets the cartesian target for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim CartesianTarget(5)
   objRobotmotion.GetCartesianTarget CartesianTarget
   
Sub GetConfig( oConfigNumber)
Retreives the Configuration.
Parameters:
oConfigNumber
The Config as a Number.
Returns:
An HRESULT.
Legal values:
S_OK
The Configuration was successfully retreived.
E_FAIL
The Configuration could not be retreived.
Example:
The following example retreives the Configuration for the robot motion.
   Dim objRobotmotion as RobotMotion
   Dim Config
   objRobotmotion.GetConfig Config
   
Sub GetJointTarget( oJointTarget)
Retrieves the Robot Joint target.
Parameters:
oJointTarget
The List of Joint DOF values.
Returns:
An HRESULT.
Legal values:
S_OK
The joint target was successfully retrieved.
E_FAIL
The joint target could not be retrieved.
Example:
The following example retrieves the joint target of a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim JointTarget(5)
   objRobotmotion.GetJointTarget JointTarget
   
Sub GetMotionProfile( oMotionProfile)
Retrieves Motion profile.
Parameters:
oMotionProfile
The retrieved profile.
Returns:
An HRESULT.
Legal values:
S_OK
The Motion Profile was successfully retrieved.
E_FAIL
The Motion Profile could not be retrieved.
Example:
The following example retrieves the Motion Profile for the robot motion.
   Dim objRobotmotion as RobotMotion
   Dim MotionProfile As String
   objRobotmotion.GetMotionProfile MotionProfile
   
Sub GetMotionType( index)
Retrieves the type of Motion.
Parameters:
index
The Motion Type (JointMOVE = 0, LINEARMOVE = 1 , PREDEFINED = 2, CIRCULAR = 3, CIRCULARVIA = 4, SLEW = 5).
Returns:
An HRESULT.
Legal values:
S_OK
The motion type was successfully obtained from the robot motion.
E_FAIL
The motion type could not be obtained.
Example:
The following example retrieves the motion type for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim MotionType
   objRobotmotion.GetMotionType MotionType
   
Sub GetObjectProfile( oObjProfile)
Retrieves Object profile.
Parameters:
oObjProfile
The retrieved profile.
Returns:
An HRESULT.
Legal values:
S_OK
The object Profile was successfully retrieved.
E_FAIL
The object Profile could not be retrieved.
Example:
The following example retrieves the object Profile for the robot motion.
   Dim objrobotmotion as robotmotion
   Dim objectProfile As String
   objrobotmotion.GetobjectProfile objectProfile
   
Sub GetOrientationMode( index)
Retrieves the TCP Orientation Mode.
Parameters:
index
Orientation Mode (OneAxis = 0, TwoAxis = 1, ThreeAxis = 2, WristAxis = 3)
Returns:
An HRESULT.
Legal values:
S_OK
The Orientation Mode was successfully retrieved.
E_FAIL
The Orientation Mode could not be retrieved.
Example:
The following example sets the orientation mode for the robot motion.
   Dim objRobotmotion as RobotMotion
   Dim OrientationMode
   objRobotmotion.GetOrientationMode OrientationMode
   
Sub GetTagTarget( oTag)
Retrieves the underlying Tag Target.
Parameters:
oTag
The underlying Tag.
Returns:
An HRESULT.
Legal values:
S_OK
The tag target was successfully retrieved.
E_FAIL
The tag target could not be retrieved.
Example:
The following example retrives the tag target for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim objTag as Tag
   objRobotmotion.GetTagTarget objTag
   
Sub GetTargetType( index)
Retrieves the Target Type.
Parameters:
index
Type of the Target (Cartesian = 0, Joint = 1, Tag = 2, Home = 3).
Returns:
An HRESULT.
Legal values:
S_OK
The target type was successfully obtained from the robot motion.
E_FAIL
The target type could not be obtained.
Example:
The following example retrieves the target type for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim TargetType
   objRobotmotion.GetTargetType TargetType
   
Sub GetToolProfile( oToolProfile)
Retrieves tool profile.
Parameters:
oToolProfile
The retrieved tool profile.
Returns:
An HRESULT.
Legal values:
S_OK
The Tool Profile was successfully retrieved.
E_FAIL
The Tool Profile could not be retrieved.
Example:
The following example retrieves the Tool Profile for the robot motion.
   Dim objRobotmotion as RobotMotion
   Dim ToolProfile As String
   objRobotmotion.GetToolProfile ToolProfile
   
Sub GetTurnNumbers( oTurnNumbers)
Retrieves the Turn Numbers(or Turn signs) of the robot motion.
Parameters:
oTurnNumbers
The underlying List of TurnNumbers (or turn signs).
Returns:
An HRESULT.
Legal values:
S_OK
The turn numbers were successfully obtained.
E_FAIL
The turn numbers could not be obtained.
Example:
The following example retrives the turn numbers for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim TurnNumbers(4)
   objRobotmotion.GetTurnNumbers TurnNumbers
   
Sub SetAccuracyProfile( iAccuracyProfile)
Sets the Accuracy profile.
Parameters:
iAccuracyProfile
The Accuracy profile.
Returns:
An HRESULT.
Legal values:
S_OK
The Accuracy Profile was successfully set.
E_FAIL
The Accuracy Profile could not be set.
Example:
The following example retrieves the Accuracy Profile for the robot Accuracy.
   Dim objRobotMotion as RobotMotion
   objRobotMotion.SetAccuracyProfile "Default"
   
Sub SetAuxillaryAxisHome( iDevice, iAuxillaryAxis, iHomeName)
Sets the underlying Auxillary device Home.
Parameters:
iDevice
The Auxillary Device.
iAuxillaryAxis
Name of the Auxillary Device.
iHomeName
Home name set for the given Auxillary device.
Returns:
An HRESULT.
Legal values:
S_OK
The auxillary device target was successfully set.
E_FAIL
The auxillary device target could not be set.
Example:
The following example sets the home name correspoding to the target of the auxillary device in a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim Device As Product
   ...
   Dim DeviceName As String
   DeviceName = "Mechanism.1"
   Dim HomeName As String
   HomeName = "Home.1"
   objRobotmotion.SetAuxillaryAxisHome HomeName
   
Sub SetAuxillaryAxisValues( iDevice, iAuxillaryAxis, iAuxillaryAxisValues)
Sets the Auxillary device Joint values.
Parameters:
iDevice
Auxillary device (Mechanism)
iAuxillaryAxis
Name of the Auxillary Device.
iAuxillaryAxisValues
List of joint values of the device.
Returns:
An HRESULT.
Legal values:
S_OK
The auxillary device target was successfully set.
E_FAIL
The auxillary device target could not be set.
Example:
The following example sets the joint values correspoding to the target of the auxillary device in a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim Device As Product
   ...
   Dim DeviceName As String
   DeviceName = "Mechanism.1"
   Dim JointTarget(1)
   JointTarget(0)=1.571
   JointTarget(1)=-0.785
   objRobotmotion.SetAuxillaryAxisValues Device,DeviceName,JointTarget
   
Sub SetCartesianTarget( iCartesianTarget)
Sets the Robot Cartesian target.
Parameters:
iCartesianTarget
Cartesian Target(The Variant array should contain the values in the sequence X,Y,Z,Yaw,Pitch,Roll)
Returns:
Returns:
An HRESULT.
Legal values:
S_OK
The cartesian target was successfully set.
E_FAIL
The cartesian target could not be set.
Example:
The following example Sets the cartesian target for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim CartesianTarget(5)
   CartesianTarget(0)=150
   CartesianTarget(1)=200
   CartesianTarget(2)=350
   CartesianTarget(3)=1.571
   CartesianTarget(4)=3.142
   CartesianTarget(5)=-0.785
   objRobotmotion.SetCartesianTarget CartesianTarget
   
Sub SetConfig( iConfigNumber)
Sets the Configuration for the robot motion.
Parameters:
iConfigNumber
The Config as a Number.
Returns:
An HRESULT.
Legal values:
S_OK
The Configuration was successfully set.
E_FAIL
The Configuration could not be set.
Example:
The following example sets the configuration for the robot motion.
   Dim objRobotmotion as RobotMotion
   objRobotmotion.SetConfig 1
   
Sub SetJointTarget( iJointTarget)
Sets the Robot Joint target.
Parameters:
iJointTarget
The List of Joint DOF values.
Returns:
An HRESULT.
Legal values:
S_OK
The joint target was successfully set.
E_FAIL
The joint target could not be set.
Example:
The following example sets the joint target for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim JointTarget(5)
   JointTarget(0)=1.571
   JointTarget(1)=-0.785
   JointTarget(2)=3.142
   JointTarget(3)=0.38
   JointTarget(4)=1.57
   JointTarget(5)=0.6
   objRobotmotion.SetJointTarget JointTarget
   
Sub SetMotionProfile( iMotionProfile)
Sets the Motion profile.
Parameters:
iMotionProfile
The Motion profile.
Returns:
An HRESULT.
Legal values:
S_OK
The Motion Profile was successfully set.
E_FAIL
The Motion Profile could not be set.
Example:
The following example retrieves the Motion Profile for the robot motion.
   Dim objRobotmotion as RobotMotion
   objRobotmotion.SetMotionProfile "Default"
   
Sub SetMotionType( index)
Sets the type of Motion.
Parameters:
index
The Motion Type (JointMOVE = 0, LINEARMOVE = 1 , PREDEFINED = 2, CIRCULAR = 3, CIRCULARVIA = 4, SLEW = 5).
Returns:
An HRESULT.
Legal values:
S_OK
The motion type was successfully set to the robot motion.
E_FAIL
The motion type could not be set.
Example:
The following example Sets the motion type for a robot motion.
   Dim objRobotmotion as RobotMotion
   objRobotmotion.SetMotionType 1
   
Sub SetObjectProfile( iObjProfile)
Sets the Object profile.
Parameters:
iObjProfile
The Object profile.
Returns:
An HRESULT.
Legal values:
S_OK
The Object Profile was successfully set.
E_FAIL
The Object Profile could not be set.
Example:
The following example retrieves the Object Profile for the robot Object.
   Dim objRobotMotion as RobotMotion
   Dim ObjectProfile As String
   objRobotMotion.SetObjectProfile "Default"
   
Sub SetOrientationMode( index)
Sets the TCP Orientation Mode.
Parameters:
index
Orientation Mode (OneAxis = 0, TwoAxis = 1, ThreeAxis = 2, WristAxis = 3)
Returns:
An HRESULT.
Legal values:
S_OK
The Orientation Mode was successfully set.
E_FAIL
The Orientation Mode could not be set.
Example:
The following example sets the orientation mode for the robot motion.
   Dim objRobotmotion as RobotMotion
   objRobotmotion.SetOrientationMode 1
   
Sub SetTagTarget( iTag)
Sets the Robot Tag target.
Parameters:
iTag
The Tag to Set as the target.
Returns:
An HRESULT.
Legal values:
S_OK
The tag target was successfully set.
E_FAIL
The tag target could not be set.
Example:
The following example sets the tag target for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim objTag as Tag
   ...
   objRobotmotion.SetTagTarget objTag
   
Sub SetToolProfile( iToolProfile)
Sets the Tool profile.
Parameters:
iToolProfile
The Tool profile.
Returns:
An HRESULT.
Legal values:
S_OK
The Tool Profile was successfully set.
E_FAIL
The Tool Profile could not be set.
Example:
The following example retrieves the Tool Profile for the robot motion.
   Dim objRobotmotion as RobotMotion
   objRobotmotion.SetToolProfile "Default"
   
Sub SetTurnNumbers( iTurnNumbers)
Sets Turn Numbers or Turn signs for the robot motion.
Parameters:
iTurnNumbers
The List of Turn numbers (or turn signs) to be set.
Returns:
An HRESULT.
Legal values:
S_OK
The turn numbers were successfully set.
E_FAIL
The turn numbers could not be set.
Example:
The following example sets the turn numbers for a robot motion.
   Dim objRobotmotion as RobotMotion
   Dim TurnNumbers(4)
   TurnNumbers(0)=1
   TurnNumbers(1)=-1
   TurnNumbers(2)=0
   TurnNumbers(3)=2
   objRobotmotion.SetTurnNumbers TurnNumbers