Home Programming


Left ArrowBack to discussions page
SadanandaSadananda Posts: 5 Apprentice
I want to make a programm with operator entering the values of legth bredth and thickness of the sheet and gripping position to be based on the lengths enterd by the operator exactly moving to the centre of the sheet. I belive this can be done using variables. but I am not able to add an integer value to position. can someone help me out with this problem ?

Best Answer

  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,157 Handy
    Accepted Answer
    You either need to create a pose with the values that you want to add using either pose_add, base frame of reference, or pose_trans, first arguments frame of reference.  The shape of a pose variable is p[x.y.z.rx.ry.rz]

    So you could take a variable and add to the current tool position like this

    var deltaX = 0.03 (meters)
    var deltaY = 0.1 (meters)
    var newPoint = pose_trans(get_actual_tcp_pose(),p[deltaX, deltaY, 0,0,0,0]) (this would add the deltaX and deltaY variables to the tools current X and Y axes, not the base coordinate, if you wanted the base coordinates then you use pose_add

    Then you could move to the variable newPoint using moveJ, moveL or moveP

    The rotation units in the pose are radians for rx, ry, rz


Sign In or Register to comment.
Left ArrowBack to discussions page