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
- ! Vision Sort
- !------------------------
- UFRAME_NUM=1
- UTOOL_NUM=5
- PAYLOAD[1]
- OVERRIDE=20%
- ! Establishes User & Tool frames, Payload and Speed
- J PR[1] 100% FINE
- VISION RUN_FIND ‘TRIANGLE’
- VISION GET_OFFSET ‘TRIANGLE’ VR[1] JMP LBL[999]
- !GO TO HOME AND USE CAMERA TO FIND A TRIANGLE
- !IF NO TRIANGLE IS FOUND JUMP TO 999
- L PR[4] 200mm/sec CNT25 OFFSET, PR[3] VOFFSET, VR[1]
- !Position above the triangle
- L PR[4] 225mm/sec FINE VOFFSET, VR[1]
- !Moves down to triangle
- WAIT 3.00 (sec)
- RO[1]=ON
- WAIT 3.00 (sec)
- !Turns suction on
- L PR[4] 225mm/sec CNT25 OFFSET, PR[3] VOFFSET,VR[1]
- ! Lifts triangle
- J PR[1] 100% FINE
- !Go home
- LBL[999]