Just want to share with you a little trick to get the number of object detected by the camera in a variable.In the back the camera use a variable name "f". "f" is a list which contain the following information:f[0] -> Number of detected objectsf[1...6] -> Current object location X,Y,Z,Rx,Ry,Rzf[7] -> Current object edge detection scoreJust call f[0] to get the number of object detected in the last camlocate node.
Hi ok I have a tray with 48 parts in the 1st cam locate picks up 25, under that node in the if statement parts not found, I added another cam locate for the remainder of the 23 parts left in the tray , and in the second cam locate if statement I have created a pop asking the operator to submit a yes or no answer . so if no the operator would place another tray in place and click no and and loop the program if yes it will return the robot to home position.The problem I am having the 1st cam locate works 25 parts get picked up. then it goes to the second cam locate node which is set up to see just the remaining 23 parts it picks the 23 parts then goes to snapshot. which then should pick up that there isn't any more and jump to the if statement at the end. but it doesn't it just goes and carry's on picking up parts from fresh air
You may have a problem of wrong part detection. You can monitor the detection done by the camera in the camera view of the installation menu.I create a support ticket to follow your request.
I changed something on the 2nd locate in the if part not found, and it stopped after the 23 parts I will check what I did and update the thread.
chriskearsley said: I changed something on the 2nd locate in the if part not found, and it stopped after the 23 parts I will check what I did and update the thread. Did you manage to make your program with the camera ?
yes, we figured out just put quantity of 10 in the locate settings. and after the ten it goes back to the snapshot takes another picture finds 10 more so that solved our problem thanks
Just want to share with you a little trick to get the number of object detected by the camera in a variable.
In the back the camera use a variable name "f". "f" is a list which contain the following information:
- f[0] -> Number of detected objects
- f[1...6] -> Current object location X,Y,Z,Rx,Ry,Rz
- f[7] -> Current object edge detection score
Just call f[0] to get the number of object detected in the last camlocate node.