Can you use Voffset on an entire subroutine?

  • Hey Guys,


    I have a simple application where i'm using iRvision to find the position of a weld location to account for any part shift. So what i had done previously, would be to use the Voffset[] to apply the vision shift at each point during the program. Now, i am getting ready to productionize this robot so i am setting all my programming as subroutines so i can use it more quickly for other products.


    To get to the point, can you use the Voffset directly on the subroutine or do you have to still apply that to each point that is in the subroutine individually?

  • You have a couple options.
    1. Apply the offset to each point
    2. Set an offset Condition at the beginning of the subroutine. You still have to add an offset command on each point but it is defined in one place.
    3. Use the voffset combined with your user frame, to dynamically generate a new user frame. Then all of your points will be relative and not need an offset at all. This is a bit more complex, but can work very well if done right.


    Sent from my VS985 4G using Tapatalk

  • wait, you can dynamically create a new user frame??? so lets say i really, really liked option 3 for several reasons i could think of, how would one go about creating a new user frame on the fly like that? I am still a pretty green rookie so i had no idea you could do that, but i can think of several places(with my application) to use this. any more info would be much appreciated!!

  • I used a dynamically created UFRAME to pick parts out of tray that was found using a vision process. The vision process application and offset frame must be set to 0 for this to work correctly. Sample code below creates UF 7 dynamically, and uses PR[9] as a temporary position register to manipulate the data. I set PR[9,4] and PR[9,5] to zero, these are the w & p rotations, which must be set in the program because your 2D vision process is only going to give you X, Y, Z, and R. (Z is set as a fixed height in the 2D vision process). Instead of hard coding p & r values like I did, you should get them from your existing User Frame.



  • I used a dynamically created UFRAME to pick parts out of tray that was found using a vision process. The vision process application and offset frame must be set to 0 for this to work correctly. Sample code below creates UF 7 dynamically, and uses PR[9] as a temporary position register to manipulate the data. I set PR[9,4] and PR[9,5] to zero, these are the w & p rotations, which must be set in the program because your 2D vision process is only going to give you X, Y, Z, and R. (Z is set as a fixed height in the 2D vision process). Instead of hard coding p & r values like I did, you should get them from your existing User Frame.



    hello
    at first would you please explain vision you use? 2D or 3D ?
    explain second find tray program?
    thank you

    Life is too short ! Take it easy ...

  • It is 2D robot mounted vision system.


    FIND_TRAY is not a TP program, it is a vision process that is called. Nothing special about it. You could replace that line of code with Run Find ..., Get offset ...


    After the vision process is run it stores the found position into PR[9]. A new UFRAME[7] is then set equal to the PR[9].


    This program assumes that the vision offset frame is parallel to the world frame, hence the 4th and 5th elements = 0. I am working on an improved version that can work with any offset frame. If you are interested I will post it when completed.

Advertising from our partners