# Cognex multi-object detection

**URL:** <https://forum.universal-robots.com/t/cognex-multi-object-detection/30769>\
**Category:** 3rd party tools\
**Created:** [October 5, 2023, 6:27pm UTC](https://forum.universal-robots.com/t/cognex-multi-object-detection/30769 "2023-10-05T18:27:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon79216798](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@anon79216798](https://forum.universal-robots.com/u/anon79216798)\
**Post date:** [October 5, 2023, 6:27pm UTC](https://forum.universal-robots.com/t/cognex-multi-object-detection/30769/1 "2023-10-05T18:27:42Z")

</div>

Hey,

We’ve got a cognex In-sight cam and would like to detect multiple patterns (an objects front vs back side) and

using Cognex + URCap we are only getting one pattern back via the script we’ve written

Program  
Robot Program  
MoveJ  
home  
CGX\_result:=CameraPose  
Job Pass  
MoveL  
CGX\_result  
Set DO[0]=On  
MoveL  
grab\_move  
‘Until (tool\_contact\_detection)’  
MoveL  
Above\_bin  
MoveL  
Waypoint\_1  
Set DO[0]=Off  
MoveJ  
home  
Job Fail  
Popup: No object detected  
No Response  
Popup: No response from camera

How can we query the second pattern?

We attempted to look at the cognex cardbox server implemented on the lower level, but we still don’t know how to query for a second object.

Thanks for you help!
