@Minchan if you are using Robotiq's Wrist Camera, you can download and install a software package meant for use over Universal Robots (CB3.1 controllers only). This software package contains a Camera Locate feature that is able to perform part and feature detection. You can teach objects to the Wrist Camera within a Camera Locate node and use it in a Robot Program.
The Camera Locate feature adds a node in your Robot Program and acts as an ''If'' statement. When the program gets to the Camea Locate node, the Wrist Camera will look for the part taught in its predefined snapshot position (which consists of a robot position and a work plane). If the part is detected, the program will go and execute the commands in the Camera Locate node. If no part is detected, the program does not go within the Camera Locate node and continues with the following commands. Therefore, you can use this logic to verify if a part was indeed in the predefined work plane.
Feel free to post below if you have other questions.
matthewd92
To set up the flag variable you're just going to use the assignment mode from the advanced tab. This will allow you to create a variable and call it found_part_flag or something. You will assign this as False before your locate node, then inside your locate node you will assign it True if you enter the node. That way the robot will know I have found a part. Then you can use the value of this to determine if you run the conveyor or not. You can go to the installation tab and create a variable there that you will use as the counter. This is so that the value is saved to memory between program starts and stops. You can use a set command to automatically increment installation variables.cbrissette said:Thank you Annick_Mottard. Will you be able to direct me to some instruction on setting up the variables you are talking about.
Pseudo code would look something like this.
found_part_flag = False
Camera Locate
found_part_flag = True
Increment number_of_times +1
if found_part_flag == False or number_of_times > 3
number_of_times = 0
run the conveyor
I'd also recommend just as a safeguard placing a sensor on the end of the conveyor that causes the conveyornto not be able to run if a part reaches the end. Are you running the conveyor in a thread or in the main program?
Is there any command as script to return some values like checking whether the object is on the area or not?
We are using UR robots.