LPOS

  • If something is written like this what it will do while running the program..

    Skip DI=ON

    LP[1] 60mm/sec skip,LBL[200]

    PR[12]=LPOS

  • That is called a skip. It will move until the input comes on, then stop and record the robots current position.


    Skip DI=ON (set skip condition to if that DI is on)


    LP[1] 60mm/sec skip,LBL[200] (move towards P[1]. If skip condition is met stop and skip to the next line of code. If not met, complete move then jump to label 200)


    PR[12]=LPOS (record current position into PR[12]

  • How it will help me This current position(LPOS) in further program....or how to use this saved LPOS

    In this case, the robot is recording its current position as soon as the skip condition triggers. This is often used for picking material an unknown distance away from the robots end effector. Lets say you're picking cardboard sheets out of a rack, you set your skip condition for a photo eye on the robot tool. Then, starting from somewhere above the rack you add a linear move to the bottom. As soon as the photo eye trips on the top sheet you stop the motion and record the position. You are now a set distance away from the sheets and can offset the newly recorded position.


    This is just a common example but this is a very common code snippet.

  • @HawkME


    Hi together,


    i gone through your privious conversation. and i have qestion.


    Step :1


    PR[14]=LPOS. after excuate this programm robot save the current position in PR[14], but i want to know in which co-ordinate system robot has saved his current posiiotn?


    Step :2


    after save the current positon i want to put limit for PR[14,1] , PR[14,2] ,PR[14,3] and then i want to check if my robot is in perticular area which i set with (PR[14,1] , PR[14,2] ,PR[14,3] ) .


    at this moment i have qestion if i put the value of PR[14,1] , PR[14,2] ,PR[14,3] , in which co-ordinate system , i have to put(set) the value?

  • LPOS to save in coordinates with the current frame / tool (XYZWPR)
    JPOS to save the current joint position (J1,J2,J3,J4,J5,J6...)


    So, to compare the current position with the one you want, you need to compare PR[14,...] with the value you need.

  • theRoach


    Thank you so much for your reply.


    So if i write programm like,


    PR[14] = LPOS (it menas robot has saved his current position with active tool and fram (am i right?))


    now i want to chek the the value of PR[14,1] is in range or note so i can write my programm like,


    IF(PR[14,1]<1225 OR PR[14,1] > 12159, CALL ABORT (in this PR[14,1], hier i have to set value according to same user fram and same user tool or?)

  • Yep! If PR[14,1] is above or below those values, the program will abort, and yes, with values of that frame and tool

  • In order to use the OR function, and depending on your controller version, you may first have to move PR[14,X] into a register:


    R[X] = PR[14,X]


    Then your code for calling your abort program would just look like this:


    IF(R[X]<1225 OR R[X] >12159), CALL ABORT


    I think the latest controllers can do the direct code with the PR, but on older controllers, you will first have to move the individual element of the array into a register.

Advertising from our partners