SetGravity (Library) [Version1.2 or later]


Compensates for the static load (gravity torque) applied to each joint and attains balance with gravity torque.


SetGravity


Each joint of the robot undergoes downward static load (gravity torque) due to earth gravity. The effects of the gravity torque will vary depending upon the mass of payload (end-effector and workpiece), the payload center of gravity, and robot figures.
If you limit the motor output torque by setting its drive current limit so that the limited torque becomes lower than the gravity torque, then the robot will move down towards the earth. To prevent it, this statement compensates the limited torque for the gravity torque, keeping the balance of torque.


Requires <pacman.h> file.



  • Write this command in a TAKEARMed task that has obtained arm-semaphore. If this command is executed without arm-semaphore obtained, Error 21F7 will result.
  • Set the mass of payload and the payload center of gravity accurately. Otherwise, the robot may move down due to gravity if you set a low current limit value (e.g., less than 30). For the entry procedure of the mass of payload and the payload center of gravity, refer to p.4-15, " 4.7 Setting the Master Control Parameters in User Preferences."
  • If you do not know the accurate mass of payload or its center of gravity or if the robot moves down in spite of accurate settings, then use the gravity offset function (SetGrvOffset) that compensates for the gravity compensation value.
  • If you set the gravity offset setting to "1" on the teach pendant, the gravity offset function becomes enabled. The setting made on the teach pendant will take effect immediately following the completion of calibration after the robot controller is powered on.


CALL SetGravity
'Enables gravity compensation function.
Delay 100
'Waits for gravity compensation to take effect.
CALL SetCurLmt (2,30)
'Sets the current limit value of the 2nd axis to 30%.


Top