Fanuc Vision system

  • Hello,


    So I'm a student working on research and I'm posting because of a coding error I have run into.


    A few months ago during the summer I programed A Fanuc robotic arm with a vision system to do basic sorting of shapes. I left it for about a month month and a half and have come back to find that the system isn't working.


    What is happening is that the robot's 'aim' is completely off. I have set up a vision system where it identifies a triangle but now when it goes to pick up said triangle it moves to the left side of the work area, instead of going for the triangle. I have tried: resetting the calibration of the vision system, redefining what a triangle is, and have gone over the code to see if someone has messed with it while I was away, checked the user frame and reference positions . None of it works despite it working a month and a half ago.


    The only thing I have changed is the size of the triangles because they were too small for the suction cup to pick up. I made them a lot bigger and redefined the triangle in the vision system. There are students learning how to use the arm however to my knowledge they have not messed around with any of it.

    I'm not sure if this is a coding bug or if it a settings bug but any help and suggestions would be appreciated. I posted my code below


    1. ! Vision Sort
    2. !------------------------
    3. UFRAME_NUM=1
    4. UTOOL_NUM=5
    5. PAYLOAD[1]
    6. OVERRIDE=20%
    7. ! Establishes User & Tool frames, Payload and Speed
    8. J PR[1] 100% FINE
    9. VISION RUN_FIND ‘TRIANGLE’
    10. VISION GET_OFFSET ‘TRIANGLE’ VR[1] JMP LBL[999]
    11. !GO TO HOME AND USE CAMERA TO FIND A TRIANGLE
    12. !IF NO TRIANGLE IS FOUND JUMP TO 999
    13. L PR[4] 200mm/sec CNT25 OFFSET, PR[3] VOFFSET, VR[1]
    14. !Position above the triangle
    15. L PR[4] 225mm/sec FINE VOFFSET, VR[1]
    16. !Moves down to triangle
    17. WAIT 3.00 (sec)
    18. RO[1]=ON
    19. WAIT 3.00 (sec)
    20. !Turns suction on
    21. L PR[4] 225mm/sec CNT25 OFFSET, PR[3] VOFFSET,VR[1]
    22. ! Lifts triangle
    23. J PR[1] 100% FINE
    24. !Go home
    25. LBL[999]
  • If you changed the vision pattern you would likely need to touch up the pick position PR[4] also.


    If the height of the part changed then you would also need to update the vision Z height parameter.

  • HI

    Usually what you described is a UF issue.

    I know it was working but:

    Can you check the grid size ? Can you teach the UF5 again ? or make sure that matches what you did using the right tool ?

    Teach PR4 again


    Your program logic looks good

    Retired but still helping

  • Thank you both for the quick reply and suggestions


    I checked the user frame and the reference height for the shapes. I did reprint larger shapes to be the same height but I double check anyway.

    I haven't been able to do many tests on it due to limited time I have in the lab but it is working slightly better.
    the aim is off by about an inch which is a big improvement but, it now only moves to one place. I can continue to work on it next week when I have more time

    Thank you very much for your help

  • Hello All,


    So I found the problem at hand and it had to do with a mix up between the vision grid calibration and the user frame calibration. In one I defined positive X going one way and in the other I defined it going in a completely different direction.


    Thank you for all the help and assistance that was given during this process.

Advertising from our partners