integrated vision code help

Greetings, 
me and my colleague are doing school project. Our project is integrated vision on ABB IRB1200-5/0.9. So basically we want to make that our robot detects and pick the object and sort it. We already astablished connection between Cognex In-Sight 7000 Series Vision System and controller IRC5 Compact. Also in RobotStudio we calibrated vision system format and our objects using Patmax Pattern 1-10. We are using "MoveToDetectedObject" as our format for our project, but we don't know how to continue. We saved the job file and tried to run our robot, but nothing happens. Everytime we run the "PP to Routine"-->"MoveToDetectedObject" it doesn't even run to our "Home" position it just stops at "CamLoadJob Camera, myjob;". We checked for errors but the RobotStudio or the flexpendant didn't found any. We would appreciate any help/suggestions to our problem we have. If you have an example for how to correctly write the "MoveToDetectedObject" routine you can send me here or even on my mail.