Cognex Camera Integration with U5

Hi, new to the U5 Robot + Cognex camera integration. I need some help. Not a programmer.
I would like to use the U5 with the 7600c Cognex camera as a simple trigger, to wait for signal then go to a next sequence.
I have the camera mounted to the robot next to the gripper.
All i want to do is simply use the camera to trigger the robot to go to a next step. Twice.

Sequence is:
1st position:

Robot moves into this pickup position,
The camera then detects something there or not.
I am using a “contrast” job function on the Cognex here, which detects the item or not.
If the item is there, the robot grips it and moves item to the next position.

2nd position:
Robot waits again, for the camera to tell it it’s safe to drop the item in when something is open.
Here i use a simple “pattern +” recognition on the Cognex camera.
If it sees the pattern is uncovered it is safe to drop the item.
The camera can detect its safe to proceed, but its not sending to the U5.

Problem
I have checked the documents, but still unclear how to best approach this simply.
Can anyone with help on how to setup comms and i/o at the COGNEX 7600c and the U5 to allow multiple jobs from the cameras detection to trigger the robot to move to the next sequence.
I dont need to do any complex grip positioning with the Cognex plugin as far as i know.
They are both networked on a switch.

Many thanks !

Steve

Do you have any discrete IO from the camera? I usually find if you’re just interested in a Go/No Go type of feedback, a discrete signal (or 2) is usually the most fool-proof way to go. I’m assuming the robot is triggering the camera when it’s ready for it to check if the area is clear. So just have the robot trigger the camera, then wait for the discrete “Good / Bad” signal from the camera and make a decision.

Hi Eric,
I have discrete io from the camera out, which i can pickup on the U5, but this only works on the first job [contrast]. Not on the second [pattern]. So i am using the same [contrast] camera job for each of the two ,go/no go, actions. The pattern job goes green on the camera, but its not either sending this or getting picked up by the U5, possibly as the contrast job is red at that point?
I have tried to get the second discreet signal pickedup on the U5, but its not working [in this case both contrast & pattern are on the same job in the camera].
The only other way i think might be to have two saved jobs and switch them using U5 input.

I would like to have the robot signal to the camera to start a job, or load one, but am not sure how, any advice?

Ideally i would like to be able to setup a camera job with multiple jobs in the same file, [contrast, pattern, etc], and have each of those trigget the robot at particular points, but i dont see the robot taking more than 1 discreet input. I assume that each of these would need to be a separate saved file and load them all in separatly during the sequence?

Sorry if I’m asking simple questions on this, but the tech manuals are not great at the basics on how to do this to get started.

You can use Modbus to send a value from the camera to the robot. Set the robot as a slave and it will execute different sequences depending on the value received from the camera via modbus
Also as far as I know there is a Cognex urcap as well but I’m not sure of all the capabilities
In the same way the robot can send signals via modbus to the camera

Im using a Cognex 7800 with a UR10e for some QC checks and positioning.

I ended up doing some URScript to send/receive telnet commands to do both of the options you have suggested (Load different jobs, as well as retrieve the value from different functions in one job). I didn’t use any of the discrete IO in the end, although they might have been simpler for good/bad data.

Happy to share the script I have used if it is useful.

When you say “job” pattern and “job” contrast, do you mean different projects? Or different tools in the same project?

You should be able to assign the result of each tool (not the overall job result) to different outputs.

If you don’t need to read a position, I/O is a straightforward and simple solution. For more, @mattd approach is the way to go.

Hi, thanks for all the help for a start everyone! Much appreciated.
What i mean is, i have had a single project job on the camera [saved to the camera ], with two tools inside it [contrast & pattern].
I have tried and failed to get the second job to send to the robot, this would be simple and an ideal solution. The camera tool passes it, but the robot never picks it up, or its not sent?
I am not sure how to set this up however. The camera outputs the Contrast.Pass to the camera, but never the Pattern.Pass outputs on the Discreet i/o.
I dont need any positioning, just a go/no go at each stage, but each ideally using a different camera tool. I would like to avoid loading jobs separately.
How should the camera [and robot U5] be setup to send multiple different discreet signals that the U5 can see and use from different camera tools?

On the camera you should have something like this:

  1. Two (or more) independant tools

  2. And in the I/O panel the result of each tool is linked to its own output.

Thats what i had setup. Then the U5 has corresponding Digital input names attached to wait commands, for a go/no go.
Problem was that the 2nd Tool [Pattern] was passing on the camera side, but the robot did not react.
I read in the cognex documentation somewhere that a Job [with multiple tools in it] will only pass or fail on the accumulation of the tools results, not sure if that applies here.
I was able to use either tool separately to tell the U5 it was good to move, but not together.
I am assuming this is all via Ethernet so the digital input wiring in the U5 box does not matter?
It only has digital input wiring for D0 and D1 channels setup.
I assume its normal to be able to use multiple Tools in a single job to trigger a U5 using different Result names?
Is it possible to add more output lines ?

Only if:

  1. Each tool has its parameter “Include in Job Pass” enabled.
  2. “Job.Pass” is used as the result.

If you use “Tool.Pass” it’s not related to the global job result.

With a different output in the camera and a different input on the robot? (to be sure it’s not a cable issue).

If you check with a multimeter, what do you measure?