DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
matthewd92

Thank you Annick_Mottard. Will you be able to direct me to some instruction on setting up the variables you are talking about.
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. 

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?