OFFSET CONDITION Change Help

  • 1:WAIT DI[113]:ON
    2:CALL HOME2
    3:OFFSET CONDITION PR[36]
    4:CALL PY3075
    5:OFFSET CONDITION PR[37]
    6:CALL PY3075
    7:OFFSET CONDITION PR[38]
    8:CALL PY3075
    9:CALL HOME1
    10:END


    I want to change the contents of the "offset condition PR [36]" points called in the program. There are 64 PRs in my robot. This number is not enough for us. Therefore, it is possible to change the XYZ positions within the program when calling the PR? :help:

  • Place your Ad here!
  • How do you calculate/initialize each PR[]?


    You are calling the same process routine but with a different offset each time .....


    You might just called the routine with arguments


    You can use the PR number as argument for example, or use the X,Y,Z etc. values as arguments


    Then inside the routine use this arguments to offset your motion instructions


    For example:


    In this case PR[36] is initialized before calling the routine


    CALL PY3075(36)


    inside your routine:


    L P[1] 50mm/s FINE Offset PR[AR[1]]


    or


    In this example, the x,y,z offset are used as arguments. PR[36] is initialized inside the routine using these arguments


    CALL PY3075(x,y,z)


    inside your routine:


    PR[36]=LPOS
    PR[36]=PR[36]-PR[36]
    PR[36,1]=AR[1]
    PR[36,2]=AR[2]
    PR[36,3]=AR[3]


    L P[1] 50mm/s FINE Offset PR[36]



    If you use the same code repeatedly, you might consider simplifying your code by looping instead of multiple calls

  • Robotero,
    You're right about that. But my robot's "AR [..]" arguments property is not in the menu. That's why I have to use a formula like this when calling "PR [...]".


    1:WAIT DI[113]:ON
    2:CALL HOME2
    3:PR[36,1]=0 !Real Value
    4:PR[36,2]=(-420) !Real Value
    5:PR[36,1]=PR[36,1]+10 !mm to be added
    6:PR[36,2]=PR[36,2]+7 !mm to be added
    7:OFFSET CONDITION PR[36]
    8:CALL PY3075
    9:PR[37,1]=0 !Real Value
    10:PR[37,2]=(-490) !Real Value
    11:PR[37,1]=PR[37,1]+10 !mm to be added
    12:PR[37,2]=PR[37,2]+7 !mm to be added
    13:OFFSET CONDITION PR[37]
    14:CALL PY3075
    15:CALL HOME1
    16:END


    That was the solution.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners