@Nerials the Robotiq Wrist Camera use a single command line, Camera Locate.
Camera Locate node act like an "if" statement, so if you detect an object (Camera Locate is "true) everything under the camera locate node is executed.
For example this is a pick and place with camera and counting the number of parts:
MoveJ
Snapshot_position
Camera Locate
part_counter = part_counter+1
MoveL
Approach_pick
Pick
Gripper Close
MoveJ
Approach_place
Gripper Open
In that example, if you don't have any parts, the part counting, the pick and the place are skipped (they are under the camera locate).You could also do a program with an if and else to count if you are having parts or not:
MoveJ
Snapshot_position
If Camera Locate
part_counter = part_counter+1
MoveL
Approach_pick
Pick
Gripper Close
MoveJ
Approach_place
Gripper Open
Else
no_parts = no_parts+1
The task I want to do:
If object detected proceed further with program
If object is not detected do something else
How to write program like that?