Home› Programming
Discussion
Back to discussions page
chriskearsley
Posts: 15 Apprentice
Camlocate and depalletising |
52 views
|
Answered | |
/ Most recent by chriskearsley
in Programming
|
4 comments |

in Programming
Hi
I have created a small test program to take parts from a wire basket to a tray, the pick basket (picture is example curently im using 72mm od parts)


(The reflection is our enemy here)
We are up lighting and adjusting the cameras white balance and exposure.
So what I have tried to do is create a cam locate and instead of doing the auto pick a put a pallet template instead and taught every position on the 1st layer to depalletize,
it seemed to work apart from the parts that moved during the pick so what I would like to know, is the a way of putting some logic into it.
for example use the depalletisng coordinates, then check on gripper opening distance to check if its picked a part if not goes to do a cam locate and revert to the cam location coordinates. to pick the part?
I have created a small test program to take parts from a wire basket to a tray, the pick basket (picture is example curently im using 72mm od parts)

(The reflection is our enemy here)
We are up lighting and adjusting the cameras white balance and exposure.
So what I have tried to do is create a cam locate and instead of doing the auto pick a put a pallet template instead and taught every position on the 1st layer to depalletize,
it seemed to work apart from the parts that moved during the pick so what I would like to know, is the a way of putting some logic into it.
for example use the depalletisng coordinates, then check on gripper opening distance to check if its picked a part if not goes to do a cam locate and revert to the cam location coordinates. to pick the part?
I create a support ticket to follow and advise on this project.
As i know theres only 12 parts n the 1st layer i thought i would put a pick counter by 1st putting a part_counter variable in the before sequence = 0, then i created a event that i thought would count how many times the grippers detected the part, but it seems only add 1 part and not count the rest
what am i doing wrong?
There are 2 things:
1/part_counter:=+1 does not work as you expect. We often see in programming expressions like "var+=1" to increment a variable but it is not working in this case. part_counter:=+1 is same as part_counter:=1
2/event node execute code when the condition is true. If you increment the counter when rq_is_object_detected() retrun true, you will increment the variable every 2ms during all the time the gripper is closed on the object.
I would recommend to use a thread instead. Here below is a proposal of code.