Robot Class

The global Robot Class provides a means for GPL programs to access functions and properties specific to each robot configured in the system.  The Robot is provided as a global class to simplify its access since many systems have only a single robot and many applications are written to access and control the robot from a single thread.  Since this class is global, it does not have any properties or fields that have values that are local to a specific routine or program scope.  So, the Robot Class can be referenced directly without the need for creating instances of Robot Objects. 

The Robot Class provides properties and methods for reading the current position of a robot, initiating a homing sequence from a program, forcing a rapid deceleration of any in-process motion, retrieving data from the trajectory generator for the robot, setting and getting the robot’s base and tool offsets, etc.

The most important operations of the Robot Class are to associate a specific robot with a specific thread and to give exclusive control of a robot to a thread.  Most read-only robot operations require that a statement either explicitly specify a robot or have a previously Selected robot.  For example, to read the current position of a robot, the Selected robot will be accessed if no robot is specified.  On the other hand, in order to control or move a robot, a thread must first be Attached to a robot in order to gain exclusive access to it.  Typically, if a project is intended to control a robot, the GPL software development environment can be configured to automatically generate the statements to ensure the robot will be Attached at the start of program execution and un-Attached when the program is terminated or pauses execution.

All of the properties and methods for the Robot Class are discussed in detail in the Reference Documentation section. Table 19-22 summarizes the members of the class.

Table 19-22: Robot Class, Summary

Member Type Description

Robot.Attached

Property

Sets and gets the number of the robot that is exclusively controlled by a thread.

Robot.Base

Property

Sets and gets the position and orientation offset for the base of the robot.

Robot.CartMode

Property

Gets an Integer that contains flag bits that indicate if any special Cartesian trajectory modes are active.

Robot.Custom

Property

Sets and gets elements of a parameter array whose interpretation is specific to each kinematic module.

Robot.DefLinComp

Method

Defines internal table of motor encoder "Linearity compensation" correction values that are automatically applied to encoder values.

Robot.Dest

Property

Gets the Cartesian Location that is the final destination for the previously executed motion.

Robot.DestAngles

Property

Gets the Angles Location that is the final destination for the previously execution motion.

Robot.Home

Method

Homes the Attached robot to establish the reference positions for each axes.

Robot.HomeAll

Method

Homes all robots to establish the reference positions for each of their axes.

Robot.JointToMotor

Method

Converts an array of axis joint angles (in degrees or millimeters) to an equivalent array of motor positions (in encoder counts).

Robot.LastProfile

Property

Returns a Profile Object whose properties are equal to those of the currently executing motion or the last executed motion if no motion is active.

Robot.MotorTempStatus

Property

Returns a code that indicates the temperature status of a motor.

Robot.MotorToJoint

Method

Converts an array of motor positions (in encoder counts) to an equivalent array of axis joint angles (in degrees or millimeters).

Robot.Payload

Property

Asserts or retrieves the last asserted value that specifies the mass of the payload being carried by the robot.

Robot.RapidDecel

Property

Sets the Boolean flag that forces any in-process motion for a robot to be rapidly decelerated to a stop.

Robot.RealTimeModAcm

Property

Returns a Cartesian Location whose value is equal to the accumulated modifications generated by the Real-time Trajectory Modification mode.

Robot.RestartBase

Property

Gets the position and orientation offset for the base of the robot that was set when the controller was restarted.

Robot.RestartTool

Property

Gets the position and orientation offset for the tool or gripper of the robot that was set when the controller was restarted.

Robot.Selected

Property

Sets and gets the number of the robot that will be accessed for read-only operations by default.

Robot.Source

Property

Returns a Cartesian Location whose value is equal to the initial position and orientation of the previously executed motion.

Robot.SourceAngles

Property

Returns an Angles Location whose value is equal to the initial axes positions of the previously executed motion.

Robot.SpeedAngles

Property

Returns an Angles Location whose components contain the instantaneous speed of each axis.

Robot.Tool

Property

Sets and gets the position and orientation offset for the tool or gripper of the robot.

Robot.TrajState

Property

Gets the Integer that indicates the current state of the trajectory generator for a given robot.

Robot.Where

Property

Gets a Cartesian Location whose value indicates the current position and orientation of a robot.

Robot.WhereAngles

Property

Gets an Angles Location whose value indicates the current position of each axes of a robot.